Class DataDescriptor
java.lang.Object
io.vertigo.datamodel.data.definitions.DataDescriptor
- Record Components:
name- the namesmartTypeDefinition- the smartTypecardinality- the cardinality (one, optional, many)
- Direct Known Subclasses:
DataField,TaskAttribute
This class defines the structure of a node in a composite structure.
This node can be a field, an attribute...
- Author:
- pchretien
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDataDescriptor(String name, SmartTypeDefinition smartTypeDefinition, io.vertigo.core.lang.Cardinality cardinality) -
Method Summary
Modifier and TypeMethodDescriptionfinal io.vertigo.core.lang.Cardinalityfinal voidChecks the type of the valuefinal Class<?> Returns the class of the value defined by this node If cardinality is many it's either a list or a dtList, if not then it's the base type of the smartType.final Stringname()final SmartTypeDefinitionfinal voidValidates the value (the value type is also automatically checked before)
-
Constructor Details
-
DataDescriptor
protected DataDescriptor(String name, SmartTypeDefinition smartTypeDefinition, io.vertigo.core.lang.Cardinality cardinality)
-
-
Method Details
-
name
-
cardinality
public final io.vertigo.core.lang.Cardinality cardinality() -
smartTypeDefinition
-
getTargetJavaClass
Returns the class of the value defined by this node If cardinality is many it's either a list or a dtList, if not then it's the base type of the smartType.- Returns:
- the java Class of the value defined by this node
-
checkType
Checks the type of the value- Parameters:
value- the value
-
validate
Validates the value (the value type is also automatically checked before)- Parameters:
value- the value- Throws:
ConstraintException
-