Class DomainSketch
java.lang.Object
io.vertigo.studio.notebook.AbstractSketch
io.vertigo.studio.notebook.domain.DomainSketch
- All Implemented Interfaces:
Sketch
A domain exists to enrich the primitive datatypes, giving them super powers.
A domain has
- a validator (executed by a list of constraints)
- a formatter
A domain is a shared object ; by nature it is immutable.
A domain is a sketch, its prefix is "Do"
Examples :
A mail is not defined by a simple "String", but by a domain called 'Mail'.
Weights, currencies, codes, labels...
An application is built with some dozens of domains.
- Author:
- pchretien, mlaroche
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface io.vertigo.studio.notebook.Sketch
REGEX_SKETCH_NAME -
Method Summary
Modifier and TypeMethodDescriptionio.vertigo.core.lang.BasicTypeReturns the dataType of the domain.getScope()static DomainSketchof(String name, Properties properties, io.vertigo.core.lang.BasicType dataType) Static method factory for DomainBuilderstatic DomainSketchof(String name, Properties properties, SketchKey dtSketchKey) Static method factory for DomainBuilderstatic DomainSketchof(String name, Properties properties, String valueObjectClassName) Static method factory for DomainBuilderMethods inherited from class io.vertigo.studio.notebook.AbstractSketch
getKey, getLocalName, toString
-
Field Details
-
PREFIX
- See Also:
-
-
Method Details
-
of
public static DomainSketch of(String name, Properties properties, io.vertigo.core.lang.BasicType dataType) Static method factory for DomainBuilder- Parameters:
name- the name of the domaindataType- the dataType managed by the domain- Returns:
- DomainBuilder
-
of
Static method factory for DomainBuilder- Parameters:
name- the name of the domaindtSketchKey- the key of the dtSketch managed by the domain- Returns:
- DomainBuilder
-
of
Static method factory for DomainBuilder- Parameters:
name- the name of the domainvalueObjectClassName- the class of the valueObject- Returns:
- DomainBuilder
-
getDataType
public io.vertigo.core.lang.BasicType getDataType()Returns the dataType of the domain.- Returns:
- the dataType.
-
getProperties
- Returns:
- the properties
-
getDtSketchKey
-
getSmartTypeName
-
getScope
- Returns:
- the domain scope
-
getValueObjectClassName
-