Class DataDescriptor

java.lang.Object
io.vertigo.datamodel.data.definitions.DataDescriptor
Record Components:
name - the name
smartTypeDefinition - the smartType
cardinality - the cardinality (one, optional, many)
Direct Known Subclasses:
DataField, TaskAttribute

public abstract class DataDescriptor extends Object
This class defines the structure of a node in a composite structure. This node can be a field, an attribute...
Author:
pchretien
  • Constructor Details

    • DataDescriptor

      protected DataDescriptor(String name, SmartTypeDefinition smartTypeDefinition, io.vertigo.core.lang.Cardinality cardinality)
  • Method Details

    • name

      public final String name()
    • cardinality

      public final io.vertigo.core.lang.Cardinality cardinality()
    • smartTypeDefinition

      public final SmartTypeDefinition smartTypeDefinition()
    • getTargetJavaClass

      public final Class<?> 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

      public final void checkType(Object value)
      Checks the type of the value
      Parameters:
      value - the value
    • validate

      public final void validate(Object value) throws ConstraintException
      Validates the value (the value type is also automatically checked before)
      Parameters:
      value - the value
      Throws:
      ConstraintException