Record Class SecurableAndGrantee
java.lang.Object
java.lang.Record
org.apache.polaris.persistence.nosql.metastore.privs.SecurableAndGrantee
public record SecurableAndGrantee(long securableCatalogId, long securableId, int securableTypeCode, long granteeCatalogId, long granteeId, int granteeTypeCode)
extends Record
Holds IDs needed during ACL/grants loading, before those are exploded into many
PolarisGrantRecords.-
Constructor Summary
ConstructorsConstructorDescriptionSecurableAndGrantee(long securableCatalogId, long securableId, int securableTypeCode, long granteeCatalogId, long granteeId, int granteeTypeCode) Creates an instance of aSecurableAndGranteerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static SecurableAndGranteeforTriplet(long catalogId, org.apache.polaris.persistence.nosql.coretypes.acl.AclObj aclObj, org.apache.polaris.persistence.nosql.coretypes.acl.GrantTriplet triplet) longReturns the value of thegranteeCatalogIdrecord component.longReturns the value of thegranteeIdrecord component.intReturns the value of thegranteeTypeCoderecord component.org.apache.polaris.core.entity.PolarisGrantRecordgrantRecordForPrivilege(int privilegeCode) final inthashCode()Returns a hash code value for this object.longReturns the value of thesecurableCatalogIdrecord component.longReturns the value of thesecurableIdrecord component.intReturns the value of thesecurableTypeCoderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SecurableAndGrantee
public SecurableAndGrantee(long securableCatalogId, long securableId, int securableTypeCode, long granteeCatalogId, long granteeId, int granteeTypeCode) Creates an instance of aSecurableAndGranteerecord class.- Parameters:
securableCatalogId- the value for thesecurableCatalogIdrecord componentsecurableId- the value for thesecurableIdrecord componentsecurableTypeCode- the value for thesecurableTypeCoderecord componentgranteeCatalogId- the value for thegranteeCatalogIdrecord componentgranteeId- the value for thegranteeIdrecord componentgranteeTypeCode- the value for thegranteeTypeCoderecord component
-
-
Method Details
-
forTriplet
public static SecurableAndGrantee forTriplet(long catalogId, org.apache.polaris.persistence.nosql.coretypes.acl.AclObj aclObj, org.apache.polaris.persistence.nosql.coretypes.acl.GrantTriplet triplet) -
grantRecordForPrivilege
public org.apache.polaris.core.entity.PolarisGrantRecord grantRecordForPrivilege(int privilegeCode) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
securableCatalogId
public long securableCatalogId()Returns the value of thesecurableCatalogIdrecord component.- Returns:
- the value of the
securableCatalogIdrecord component
-
securableId
public long securableId()Returns the value of thesecurableIdrecord component.- Returns:
- the value of the
securableIdrecord component
-
securableTypeCode
public int securableTypeCode()Returns the value of thesecurableTypeCoderecord component.- Returns:
- the value of the
securableTypeCoderecord component
-
granteeCatalogId
public long granteeCatalogId()Returns the value of thegranteeCatalogIdrecord component.- Returns:
- the value of the
granteeCatalogIdrecord component
-
granteeId
public long granteeId()Returns the value of thegranteeIdrecord component.- Returns:
- the value of the
granteeIdrecord component
-
granteeTypeCode
public int granteeTypeCode()Returns the value of thegranteeTypeCoderecord component.- Returns:
- the value of the
granteeTypeCoderecord component
-