@API(value=MAINTAINED) public class MetaDataValidator extends Object implements RecordMetaDataProvider
RecordMetaData
.MetaDataException
Modifier and Type | Field and Description |
---|---|
protected Map<Object,FormerIndex> |
assignedFormerPrefixes |
protected Map<Object,Index> |
assignedPrefixes |
protected IndexValidatorRegistry |
indexRegistry |
protected RecordMetaData |
metaData |
protected Map<Object,RecordType> |
recordTypeKeys |
Constructor and Description |
---|
MetaDataValidator(RecordMetaDataProvider metaData,
IndexValidatorRegistry indexRegistry) |
Modifier and Type | Method and Description |
---|---|
RecordMetaData |
getRecordMetaData()
Provide an instance of
RecordMetaData . |
void |
validate() |
protected void |
validateCurrentAndFormerIndexes() |
protected void |
validateFormerIndex(FormerIndex formerIndex) |
protected void |
validateIndex(Index index) |
List<Descriptors.FieldDescriptor> |
validateIndexForRecordType(Index index,
RecordType recordType) |
void |
validateIndexForRecordTypes(Index index,
IndexValidator indexValidator) |
protected void |
validatePrimaryKeyForRecordType(KeyExpression primaryKey,
RecordType recordType) |
protected void |
validateRecordType(RecordType recordType) |
protected void |
validateUnionDescriptor(Descriptors.Descriptor unionDescriptor) |
@Nonnull protected final RecordMetaData metaData
@Nonnull protected final IndexValidatorRegistry indexRegistry
@Nonnull protected final Map<Object,FormerIndex> assignedFormerPrefixes
@Nonnull protected final Map<Object,RecordType> recordTypeKeys
public MetaDataValidator(@Nonnull RecordMetaDataProvider metaData, @Nonnull IndexValidatorRegistry indexRegistry)
public void validate()
protected void validateUnionDescriptor(Descriptors.Descriptor unionDescriptor)
protected void validateRecordType(@Nonnull RecordType recordType)
protected void validatePrimaryKeyForRecordType(@Nonnull KeyExpression primaryKey, @Nonnull RecordType recordType)
protected void validateCurrentAndFormerIndexes()
protected void validateFormerIndex(@Nonnull FormerIndex formerIndex)
public void validateIndexForRecordTypes(@Nonnull Index index, @Nonnull IndexValidator indexValidator)
@Nonnull public List<Descriptors.FieldDescriptor> validateIndexForRecordType(@Nonnull Index index, @Nonnull RecordType recordType)
@Nonnull public RecordMetaData getRecordMetaData()
RecordMetaDataProvider
RecordMetaData
.
Implementors should assume that this method will be called frequently, so it may
be necessary to cache the result if generating the RecordMetaData
is expensive.getRecordMetaData
in interface RecordMetaDataProvider
RecordMetaData