Class SmartTypeDefinition
- java.lang.Object
-
- io.vertigo.core.node.definition.AbstractDefinition
-
- io.vertigo.datamodel.smarttype.definitions.SmartTypeDefinition
-
- All Implemented Interfaces:
io.vertigo.core.node.definition.Definition
public final class SmartTypeDefinition extends io.vertigo.core.node.definition.AbstractDefinition
A smarttype exists to enrich the primitive datatypes, giving them super powers. A smarttype has - a class that represent the value - an ability to be transformed in and from a primitive datatype Examples : A mail is not defined by a simple "String", but by a smartType called 'Mail'. Weights, currencies, codes, labels... An application is built with some dozens of smartType.- Author:
- pchretien
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SmartTypeDefinition.Scope
-
Constructor Summary
Constructors Constructor Description SmartTypeDefinition(String name, SmartTypeDefinition.Scope scope, String valueObjectClassName, List<AdapterConfig> adapterConfigs, FormatterConfig formatterConfig, List<ConstraintConfig> constraintConfigs, Properties properties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SmartTypeDefinitionBuilder
builder(String name, io.vertigo.core.lang.BasicType dataType)
static SmartTypeDefinitionBuilder
builder(String name, Class clazz)
AdapterConfig
getAdapterConfig(String type)
Map<String,AdapterConfig>
getAdapterConfigs()
io.vertigo.core.lang.BasicType
getBasicType()
List<ConstraintConfig>
getConstraintConfigs()
FormatterConfig
getFormatterConfig()
Returns the formatter of the domain.Class
getJavaClass()
Properties
getProperties()
SmartTypeDefinition.Scope
getScope()
String
getValueObjectClassName()
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SmartTypeDefinition
public SmartTypeDefinition(String name, SmartTypeDefinition.Scope scope, String valueObjectClassName, List<AdapterConfig> adapterConfigs, FormatterConfig formatterConfig, List<ConstraintConfig> constraintConfigs, Properties properties)
-
-
Method Detail
-
getScope
public SmartTypeDefinition.Scope getScope()
- Returns:
- the smartType scope
-
getValueObjectClassName
public String getValueObjectClassName()
-
getJavaClass
public Class getJavaClass()
-
getBasicType
public io.vertigo.core.lang.BasicType getBasicType()
-
getAdapterConfigs
public Map<String,AdapterConfig> getAdapterConfigs()
-
getAdapterConfig
public AdapterConfig getAdapterConfig(String type)
-
getProperties
public Properties getProperties()
-
getFormatterConfig
public FormatterConfig getFormatterConfig()
Returns the formatter of the domain.- Returns:
- the formatter.
-
getConstraintConfigs
public List<ConstraintConfig> getConstraintConfigs()
-
builder
public static SmartTypeDefinitionBuilder builder(String name, io.vertigo.core.lang.BasicType dataType)
-
builder
public static SmartTypeDefinitionBuilder builder(String name, Class clazz)
-
-