@API(value=MAINTAINED) public class RecordTypeBuilder extends RecordTypeIndexesBuilder implements RecordTypeOrBuilder
RecordType
.
A record type consists of:
Descriptors.Descriptor
.Modifier and Type | Class and Description |
---|---|
static class |
RecordTypeBuilder.NonbuildableException
Exception thrown when a
RecordTypeBuilder is not yet in a state where it can be built. |
indexes, multiTypeIndexes, name, recordTypeKey
Constructor and Description |
---|
RecordTypeBuilder(Descriptors.Descriptor descriptor) |
RecordTypeBuilder(Descriptors.Descriptor descriptor,
RecordTypeBuilder other)
Copy constructor for
RecordTypeBuilder that copies all fields except the descriptor. |
Modifier and Type | Method and Description |
---|---|
RecordType |
build(RecordMetaData metaData) |
Descriptors.Descriptor |
getDescriptor()
Get the descriptor of the underlying message type.
|
KeyExpression |
getPrimaryKey()
Gets the primary key expression for this record type.
|
Integer |
getSinceVersion()
Gets a metadata version, which shows when this record type got introduced in the metadata.
|
void |
setPrimaryKey(KeyExpression primaryKey) |
RecordTypeBuilder |
setRecordTypeKey(Object recordTypeKey) |
void |
setSinceVersion(Integer sinceVersion) |
getIndexes, getMultiTypeIndexes, getName, getRecordTypeKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIndexes, getMultiTypeIndexes, getName, getRecordTypeKey
public RecordTypeBuilder(@Nonnull Descriptors.Descriptor descriptor)
public RecordTypeBuilder(@Nonnull Descriptors.Descriptor descriptor, @Nonnull RecordTypeBuilder other)
RecordTypeBuilder
that copies all fields except the descriptor.descriptor
- the descriptor of the new record typeother
- the record type builder to copy frompublic RecordTypeBuilder setRecordTypeKey(@Nullable Object recordTypeKey)
setRecordTypeKey
in class RecordTypeIndexesBuilder
@Nonnull public Descriptors.Descriptor getDescriptor()
RecordTypeOrBuilder
getDescriptor
in interface RecordTypeOrBuilder
@Nullable public KeyExpression getPrimaryKey()
RecordTypeOrBuilder
getPrimaryKey
in interface RecordTypeOrBuilder
public void setPrimaryKey(@Nonnull KeyExpression primaryKey)
@Nullable public Integer getSinceVersion()
RecordTypeOrBuilder
getSinceVersion
in interface RecordTypeOrBuilder
null
if this information is not available)public RecordType build(@Nonnull RecordMetaData metaData)