Interface RecordTypeOrBuilder
-
- All Known Implementing Classes:
JoinedRecordType
,RecordType
,RecordTypeBuilder
,SyntheticRecordType
@API(MAINTAINED) public interface RecordTypeOrBuilder
Common interface implemented by theRecordType
andRecordTypeBuilder
classes that contains accessors that they are both expected to have. This includes the data necessary to know what is in a record and what indexes are associated with it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Descriptors.Descriptor
getDescriptor()
Get the descriptor of the underlying message type.List<Index>
getIndexes()
Get the list of indexes that are on this record and only this record.List<Index>
getMultiTypeIndexes()
Gets the list of indexes that are on multiple record types one of which is this type.String
getName()
Get the name of the record type.KeyExpression
getPrimaryKey()
Gets the primary key expression for this record type.Object
getRecordTypeKey()
Gets theTuple
element value that will be used byRecordTypeKeyExpression
for this record type.Integer
getSinceVersion()
Gets a metadata version, which shows when this record type got introduced in the metadata.
-
-
-
Method Detail
-
getName
@Nonnull String getName()
Get the name of the record type. This is the same as the name of the underlying message type.- Returns:
- the message type name
-
getDescriptor
@Nonnull Descriptors.Descriptor getDescriptor()
Get the descriptor of the underlying message type. This specifies what fields the record will have and what their types should be.- Returns:
- the message type descriptor
-
getIndexes
@Nonnull List<Index> getIndexes()
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.- Returns:
- the list of indexes only on this type
-
getMultiTypeIndexes
@Nonnull List<Index> getMultiTypeIndexes()
Gets the list of indexes that are on multiple record types one of which is this type. This will not includeIndex
es that are on all record types (universal indexes) within a given metadata configuration.- Returns:
- the list of indexes on multiple types including this type
-
getPrimaryKey
@Nullable KeyExpression getPrimaryKey()
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.- Returns:
- the primary key expression for this record type
-
getSinceVersion
@Nullable Integer getSinceVersion()
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.- Returns:
- metadata version when this type is introduced (
null
if this information is not available)
-
getRecordTypeKey
@Nullable Object getRecordTypeKey()
Gets theTuple
element value that will be used byRecordTypeKeyExpression
for this record type. The value should be unique among record types and stable in the face of meta-data changes.- Returns:
- stable and unique key for record type
-
-