Class SmartTypeDefinition
java.lang.Object
io.vertigo.core.node.definition.AbstractDefinition<SmartTypeDefinition>
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<SmartTypeDefinition>
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 -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSmartTypeDefinition(String name, SmartTypeDefinition.Scope scope, Class javaClass, List<AdapterConfig> adapterConfigs, FormatterConfig formatterConfig, List<ConstraintConfig> constraintConfigs, Properties properties) -
Method Summary
Modifier and TypeMethodDescriptionstatic SmartTypeDefinitionBuilderstatic SmartTypeDefinitionBuildergetAdapterConfig(String type) io.vertigo.core.lang.BasicTypeReturns the formatter of the domain.getJavaClass(io.vertigo.core.lang.Cardinality cardinality) getScope()Methods inherited from class io.vertigo.core.node.definition.AbstractDefinition
idMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.vertigo.core.node.definition.Definition
getName
-
Field Details
-
PREFIX
- See Also:
-
-
Constructor Details
-
SmartTypeDefinition
public SmartTypeDefinition(String name, SmartTypeDefinition.Scope scope, Class javaClass, List<AdapterConfig> adapterConfigs, FormatterConfig formatterConfig, List<ConstraintConfig> constraintConfigs, Properties properties)
-
-
Method Details
-
getScope
- Returns:
- the smartType scope
-
getJavaClass
-
getBasicType
public io.vertigo.core.lang.BasicType getBasicType() -
getAdapterConfigs
-
getAdapterConfig
-
getProperties
-
getFormatterConfig
Returns the formatter of the domain.- Returns:
- the formatter.
-
getConstraintConfigs
-
builder
public static SmartTypeDefinitionBuilder builder(String name, io.vertigo.core.lang.BasicType basicType) -
builder
-
getJavaClass
-