Class SyntheticRecordTypeBuilder<C extends SyntheticRecordTypeBuilder.Constituent>
- java.lang.Object
-
- com.apple.foundationdb.record.metadata.RecordTypeIndexesBuilder
-
- com.apple.foundationdb.record.metadata.SyntheticRecordTypeBuilder<C>
-
- Type Parameters:
C
- type of constituent record types
- Direct Known Subclasses:
JoinedRecordTypeBuilder
@API(EXPERIMENTAL) public abstract class SyntheticRecordTypeBuilder<C extends SyntheticRecordTypeBuilder.Constituent> extends RecordTypeIndexesBuilder
A builder forSyntheticRecordType
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SyntheticRecordTypeBuilder.Constituent
A constituent type within a joined record type.
-
Field Summary
-
Fields inherited from class com.apple.foundationdb.record.metadata.RecordTypeIndexesBuilder
indexes, multiTypeIndexes, name, recordTypeKey
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SyntheticRecordTypeBuilder(String name, Object recordTypeKey, RecordMetaDataBuilder metaDataBuilder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected C
addConstituent(C constituent)
Add a new constituent.C
addConstituent(RecordTypeBuilder recordType)
Add a new constituent with a correlation name that is the same as the record type name.protected C
addConstituent(String constituent)
Add a new constituent with a correlation name that is the same as the record type name.C
addConstituent(String name, RecordTypeBuilder recordType)
Add a new constituent by name.C
addConstituent(String name, String recordType)
Add a new constituent by name.abstract SyntheticRecordType<?>
build(RecordMetaData metaData, Descriptors.FileDescriptor fileDescriptor)
void
buildDescriptor(DescriptorProtos.FileDescriptorProto.Builder fileDescriptorProto)
protected KeyExpression
buildPrimaryKey()
List<C>
getConstituents()
Get the constitutents of this synthetic record type.protected abstract C
newConstituent(String name, RecordTypeBuilder recordType)
SyntheticRecordTypeBuilder<C>
setRecordTypeKey(Object recordTypeKey)
-
Methods inherited from class com.apple.foundationdb.record.metadata.RecordTypeIndexesBuilder
getIndexes, getMultiTypeIndexes, getName, getRecordTypeKey
-
-
-
-
Method Detail
-
setRecordTypeKey
public SyntheticRecordTypeBuilder<C> setRecordTypeKey(@Nullable Object recordTypeKey)
- Overrides:
setRecordTypeKey
in classRecordTypeIndexesBuilder
-
getConstituents
@Nonnull public List<C> getConstituents()
Get the constitutents of this synthetic record type.- Returns:
- list of constituents
-
newConstituent
@Nonnull protected abstract C newConstituent(@Nonnull String name, @Nonnull RecordTypeBuilder recordType)
-
addConstituent
@Nonnull protected C addConstituent(@Nonnull C constituent)
Add a new constituent.- Parameters:
constituent
- the new constituent- Returns:
- the newly added constituent
-
addConstituent
@Nonnull public C addConstituent(@Nonnull String name, @Nonnull RecordTypeBuilder recordType)
Add a new constituent by name.- Parameters:
name
- the correlation name for the new constituentrecordType
- the record type for the new constituent- Returns:
- the newly added constituent
-
addConstituent
@Nonnull public C addConstituent(@Nonnull String name, @Nonnull String recordType)
Add a new constituent by name.- Parameters:
name
- the correlation name for the new constituentrecordType
- the name of the record type for the new constituent- Returns:
- the newly added constituent
-
addConstituent
@Nonnull public C addConstituent(@Nonnull RecordTypeBuilder recordType)
Add a new constituent with a correlation name that is the same as the record type name.- Parameters:
recordType
- the record type for the new constituent- Returns:
- the newly added constituent
-
addConstituent
@Nonnull protected C addConstituent(@Nonnull String constituent)
Add a new constituent with a correlation name that is the same as the record type name.- Parameters:
constituent
- name of the record type for the new constituent- Returns:
- the newly added constituent
-
build
@Nonnull public abstract SyntheticRecordType<?> build(@Nonnull RecordMetaData metaData, @Nonnull Descriptors.FileDescriptor fileDescriptor)
-
buildDescriptor
public void buildDescriptor(@Nonnull DescriptorProtos.FileDescriptorProto.Builder fileDescriptorProto)
-
buildPrimaryKey
@Nonnull protected KeyExpression buildPrimaryKey()
-
-