Class UuidFieldDef
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.core.FoundationObject
com.northconcepts.datapipeline.foundations.schema.SchemaObject
com.northconcepts.datapipeline.foundations.schema.SchemaPart
com.northconcepts.datapipeline.foundations.schema.FieldDef
com.northconcepts.datapipeline.foundations.schema.UuidFieldDef
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,SchemaProblemsSupplier,JavaCodeGenerator,Serializable,Cloneable
- See Also:
-
Field Summary
Fields inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
internalId, internalName, log, TIMESTAMP_FORMATFields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanfromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).fromXmlElement(Element fieldDefElement) inthashCode()setAllowedValues(ValueMatch<?> allowedValues) Sets the optional set of values this field allows; they are enforced only whenFieldDef.isLimitToAllowedValues()is true.setArray(boolean array) Forces this field to be an array by setting theFieldDef.getMinimumElements()to zero (0) if bothFieldDef.getMinimumElements()andFieldDef.getMaximumElements()are null, otherwise, does nothing.setAttributes(Attributes attributes) Sets the user-defined key-value pairs attached to this field (null is treated as empty).setDefaultValueExpression(Expression defaultValueExpression) The calculated value to set in the data if the field is null or missing.setDescription(String description) setDisplayName(String displayName) Sets the user-friendly name for this field, used instead of the name in validation messages.protected UuidFieldDefsetEntityDef(EntityDef entityDef) Sets the parent entity; called byEntityDefwhen this field is added to it.setExample(String example) setLimitToAllowedValues(boolean limitToAllowedValues) Indicates if values must be one ofFieldDef.getAllowedValues()to pass validation (defaults to false).setMaximumElements(Integer maximumElements) Sets the maximum number of array elements allowed; a non-null value makes this field an array.setMinimumElements(Integer minimumElements) Sets the minimum number of array elements allowed; a non-null value makes this field an array.setPosition(Integer position) Sets the zero-based position of this field in the data or null to locate it by name; mapping renames the field found at this position to this field's name.setPrimaryKeyPosition(Integer primaryKeyPosition) Sets the zero-based position of this field in its entity's primary key or null if it is not part of the key.setPrimaryKeyType(PrimaryKeyType primaryKeyType) Sets the strategy used to generate this primary key field's values; a primary key position must also be set.setRequired(boolean required) Indicates if this field must be present and not null to pass validation (defaults to false).setStrictArrays(boolean strictArrays) Indicates if values must match this field's array setting exactly (defaults to true); when false, a single value and a one-element array are interchangeable.Sets the labels used to organize, filter, and classify this field (null is treated as empty).Sets the data type of this field; each subclass accepts only its own kind of type, such as numeric types forNumericFieldDef.toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.toXmlElement(Document document) Returns an element, created withdocument, describing this object; the default implementation throws aDataException.protected voidvalidateValueImpl(Object value, ValidationResult result) Applies the subclass-specific checks to a single (non-array) value, adding any errors to the result; called after the common type, array and allowed-value checks.Methods inherited from class com.northconcepts.datapipeline.foundations.schema.FieldDef
assertValid, fromJson, generateConstructor, generateJavaCode, getAllowedValues, getAttributes, getDefaultValueExpression, getDefaultValueExpressionAsString, getDescription, getDisplayName, getDisplayNameOrName, getEntityDef, getEntityQualifiedName, getExample, getIndexInEntityDef, getMaximumElements, getMinimumElements, getName, getNameForErrorMessage, getPosition, getPrimaryKeyPosition, getPrimaryKeyType, getQualifiedName, getSchemaDef, getSchemaDef, getSchemaPartContainer, getSchemaPartName, getSchemaPartType, getSchemaProblems, getTags, getType, isArray, isLimitToAllowedValues, isPrimaryKey, isRequired, isStrictArrays, mapValue, mapValueImpl, newInstanceFromRecord, newInstanceFromType, newInstanceFromXml, toJson, validateAllowedValues, validateField, validateField, validateField, validateField, validateValue, validateValueMethods inherited from class com.northconcepts.datapipeline.foundations.schema.SchemaPart
getSchemaName, getSchemaPartContainerName, getSchemaPartContainerTypeMethods inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
addExceptionProperties, assertValid, exception, exception, exception, getInternalId, getInternalName, resetInternalIdMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionPropertiesMethods inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
fromJson, toJson, toJsonMethods inherited from interface com.northconcepts.datapipeline.foundations.schema.SchemaProblemsSupplier
getSchemaProblems, getSchemaProblems
-
Constructor Details
-
UuidFieldDef
public UuidFieldDef() -
UuidFieldDef
-
-
Method Details
-
clone
-
validateValueImpl
Description copied from class:FieldDefApplies the subclass-specific checks to a single (non-array) value, adding any errors to the result; called after the common type, array and allowed-value checks.- Specified by:
validateValueImplin classFieldDef- Throws:
Throwable
-
setEntityDef
Description copied from class:FieldDefSets the parent entity; called byEntityDefwhen this field is added to it.- Overrides:
setEntityDefin classFieldDef
-
setName
-
setDisplayName
Description copied from class:FieldDefSets the user-friendly name for this field, used instead of the name in validation messages.- Overrides:
setDisplayNamein classFieldDef
-
setDescription
- Overrides:
setDescriptionin classFieldDef
-
setType
Description copied from class:FieldDefSets the data type of this field; each subclass accepts only its own kind of type, such as numeric types forNumericFieldDef. -
setRequired
Description copied from class:FieldDefIndicates if this field must be present and not null to pass validation (defaults to false).- Overrides:
setRequiredin classFieldDef
-
setMinimumElements
Description copied from class:FieldDefSets the minimum number of array elements allowed; a non-null value makes this field an array. Negative values are set to zero (0).- Overrides:
setMinimumElementsin classFieldDef
-
setMaximumElements
Description copied from class:FieldDefSets the maximum number of array elements allowed; a non-null value makes this field an array. Negative values are set to the max integer and zero (0) means the array must be empty.- Overrides:
setMaximumElementsin classFieldDef
-
setArray
Description copied from class:FieldDefForces this field to be an array by setting theFieldDef.getMinimumElements()to zero (0) if bothFieldDef.getMinimumElements()andFieldDef.getMaximumElements()are null, otherwise, does nothing. -
setStrictArrays
Description copied from class:FieldDefIndicates if values must match this field's array setting exactly (defaults to true); when false, a single value and a one-element array are interchangeable.- Overrides:
setStrictArraysin classFieldDef
-
setAllowedValues
Description copied from class:FieldDefSets the optional set of values this field allows; they are enforced only whenFieldDef.isLimitToAllowedValues()is true.- Overrides:
setAllowedValuesin classFieldDef
-
setLimitToAllowedValues
Description copied from class:FieldDefIndicates if values must be one ofFieldDef.getAllowedValues()to pass validation (defaults to false).- Overrides:
setLimitToAllowedValuesin classFieldDef
-
setPrimaryKeyPosition
Description copied from class:FieldDefSets the zero-based position of this field in its entity's primary key or null if it is not part of the key.- Overrides:
setPrimaryKeyPositionin classFieldDef
-
setPrimaryKeyType
Description copied from class:FieldDefSets the strategy used to generate this primary key field's values; a primary key position must also be set.- Overrides:
setPrimaryKeyTypein classFieldDef
-
setPosition
Description copied from class:FieldDefSets the zero-based position of this field in the data or null to locate it by name; mapping renames the field found at this position to this field's name.- Overrides:
setPositionin classFieldDef
-
setDefaultValueExpression
Description copied from class:FieldDefThe calculated value to set in the data if the field is null or missing.- Overrides:
setDefaultValueExpressionin classFieldDef
-
setExample
- Overrides:
setExamplein classFieldDef
-
setAttributes
Description copied from class:FieldDefSets the user-defined key-value pairs attached to this field (null is treated as empty).- Overrides:
setAttributesin classFieldDef
-
setTags
Description copied from class:FieldDefSets the labels used to organize, filter, and classify this field (null is treated as empty). -
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable- Overrides:
toRecordin classFieldDef
-
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classFieldDef- Parameters:
source-- Returns:
- this instance.
-
toXmlElement
Description copied from interface:XmlSerializableReturns an element, created withdocument, describing this object; the default implementation throws aDataException.- Specified by:
toXmlElementin interfaceXmlSerializable- Overrides:
toXmlElementin classFieldDef
-
fromXmlElement
- Specified by:
fromXmlElementin interfaceXmlSerializable- Overrides:
fromXmlElementin classFieldDef
-
hashCode
public int hashCode() -
equals
-