Class DtField
- java.lang.Object
-
- io.vertigo.datamodel.structure.definitions.DtField
-
public final class DtField extends Object
This class defines the structure of a field. A field represents a named and typed data A field - has a name - has a domain - has a fieldType - has a label - can be required - can be persistent - can be dynamic- Author:
- fconstantin, pchretien , npiedeloup
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DtField.FieldType
This enum lists all types that can be used by a field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.vertigo.core.lang.Cardinality
getCardinality()
DataAccessor
getDataAccessor()
Returns the way to access the data.DtDefinition
getFkDtDefinition()
io.vertigo.core.locale.MessageText
getLabel()
String
getName()
String
getResourceKey()
SmartTypeDefinition
getSmartTypeDefinition()
Class
getTargetJavaClass()
Returns the class that holds the value of the field.DtField.FieldType
getType()
boolean
isDtList()
boolean
isPersistent()
Gestion de la persistance.
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
Field definition Prefix.- See Also:
- Constant Field Values
-
-
Method Detail
-
getResourceKey
public String getResourceKey()
- Returns:
- the key of the resource (i18n)
-
getName
public String getName()
- Returns:
- the name of the field
-
getCardinality
public io.vertigo.core.lang.Cardinality getCardinality()
- Returns:
- the cardinality of the field (one, optional, many)
-
getType
public DtField.FieldType getType()
- Returns:
- the type of the field
-
getSmartTypeDefinition
public SmartTypeDefinition getSmartTypeDefinition()
- Returns:
- the smarttype of the field
-
getLabel
public io.vertigo.core.locale.MessageText getLabel()
- Returns:
- the label of the field
-
isPersistent
public boolean isPersistent()
Gestion de la persistance.- Returns:
- Si le champ est persisté.
-
isDtList
public boolean isDtList()
-
getFkDtDefinition
public DtDefinition getFkDtDefinition()
- Returns:
- DtDefinition de la ForeignKey (caractère obligatoire lié au type)
-
getDataAccessor
public DataAccessor getDataAccessor()
Returns the way to access the data.- Returns:
- the data accessor.
-
getTargetJavaClass
public Class getTargetJavaClass()
Returns the class that holds the value of the field. If cardinality is many it's either a list or a dtList, if not then it's the base type of the domain.- Returns:
- the data accessor.
-
-