jerqi commented on code in PR #4055: URL: https://github.com/apache/gravitino/pull/4055#discussion_r1768481945
########## core/src/main/java/org/apache/gravitino/storage/relational/po/CombinedUserPO.java: ########## @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.gravitino.storage.relational.po; + +import com.google.common.base.Objects; + +/** + * CombinedUserPO add extra roleNames and roleIds for UserPO. This PO is only used for reading the + * data from multiple joined tables. The PO won't be written to database. So we don't need the inner + * class Builder. + */ +public class CombinedUserPO extends UserPO { + + private String roleNames; + private String roleIds; + + public String getRoleNames() { + return roleNames; + } + + public String getRoleIds() { + return roleIds; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CombinedUserPO)) { + return false; + } + CombinedUserPO combinedUserPO = (CombinedUserPO) o; + return Objects.equal(getUserId(), combinedUserPO.getUserId()) + && Objects.equal(getUserName(), combinedUserPO.getUserName()) + && Objects.equal(getMetalakeId(), combinedUserPO.getMetalakeId()) + && Objects.equal(getAuditInfo(), combinedUserPO.getAuditInfo()) + && Objects.equal(getCurrentVersion(), combinedUserPO.getCurrentVersion()) + && Objects.equal(getLastVersion(), combinedUserPO.getLastVersion()) + && Objects.equal(getDeletedAt(), combinedUserPO.getDeletedAt()) + && Objects.equal(getRoleIds(), combinedUserPO.getRoleIds()) + && Objects.equal(getRoleNames(), combinedUserPO.getRoleNames()); Review Comment: OK, I will do. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org