Class RecordType

    • Method Detail

      • getIndexes

        @Nonnull
        public List<Index> getIndexes()
        Description copied from interface: RecordTypeOrBuilder
        Get the list of indexes that are on this record and only this record. This does not include indexes that are on multiple types even if one of them is on this type.
        Specified by:
        getIndexes in interface RecordTypeOrBuilder
        Returns:
        the list of indexes only on this type
      • getMultiTypeIndexes

        @Nonnull
        public List<Index> getMultiTypeIndexes()
        The Indexes that this record type is on that also contain other record types. This does not include indexes that cover all record types
        Specified by:
        getMultiTypeIndexes in interface RecordTypeOrBuilder
        Returns:
        a list of all indexes that include this record type along with other types.
      • getPrimaryKey

        @Nonnull
        public KeyExpression getPrimaryKey()
        Description copied from interface: RecordTypeOrBuilder
        Gets the primary key expression for this record type. Records of this type are inserted based on the value of this key expression when evaluated on the record.
        Specified by:
        getPrimaryKey in interface RecordTypeOrBuilder
        Returns:
        the primary key expression for this record type
      • getSinceVersion

        @Nullable
        public Integer getSinceVersion()
        Description copied from interface: RecordTypeOrBuilder
        Gets a metadata version, which shows when this record type got introduced in the metadata. This information is used to skip index rebuild for indices on new record types.
        Specified by:
        getSinceVersion in interface RecordTypeOrBuilder
        Returns:
        metadata version when this type is introduced (null if this information is not available)
      • hasExplicitRecordTypeKey

        public boolean hasExplicitRecordTypeKey()
        Get whether this record type sets an explicit value for getRecordTypeKey(). If there is no explicit value, then #getRecordTypeKey will use the union message field number.
        Returns:
        true if there is an explicit record type key value
      • getExplicitRecordTypeKey

        @Nullable
        public Object getExplicitRecordTypeKey()
        Get any explicit record type key value.
        Returns:
        the explicit record type key value or null if getRecordTypeKey() would return a union field number
      • getRecordTypeKeyTuple

        @Nonnull
        public Tuple getRecordTypeKeyTuple()
        Get a Tuple containing only the record type key. The record type key is not generally required to be Tuple-encodable, so for some record type keys, the following might throw an error:
        
            Tuple.from(recordType.getRecordTypeKey()).pack()
         

        This function will first convert the record type key into a type that the Tuple layer can encode before returning the Tuple to the user. This method should therefore be preferred over calling getRecordTypeKey() when this key is about to be used to read or write data from the database.

        Returns:
        a Tuple containing the record type key
      • primaryKeyHasRecordTypePrefix

        public boolean primaryKeyHasRecordTypePrefix()
        Determine whether this record type has a RecordTypeKeyExpression prefix in the primary key.
        Returns:
        true if start of the primary key is the unique record type key
      • isSynthetic

        @API(EXPERIMENTAL)
        public boolean isSynthetic()
        Get whether this record type represents synthetic records. A synthetic record is one that is not actually stored, although it can may be indexed.
        Returns:
        true if this record type represents synthetic records, false if it represents records that are actually stored