Class DomainSketch
- java.lang.Object
-
- io.vertigo.studio.notebook.AbstractSketch
-
- io.vertigo.studio.notebook.domain.DomainSketch
-
- All Implemented Interfaces:
Sketch
public final class DomainSketch extends AbstractSketch
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 Modifier and Type Class Description static class
DomainSketch.Scope
-
Field Summary
Fields Modifier and Type Field Description static String
PREFIX
-
Fields inherited from interface io.vertigo.studio.notebook.Sketch
REGEX_SKETCH_NAME
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.vertigo.core.lang.BasicType
getDataType()
Returns the dataType of the domain.SketchKey
getDtSketchKey()
Properties
getProperties()
DomainSketch.Scope
getScope()
String
getSmartTypeName()
String
getValueObjectClassName()
static DomainSketch
of(String name, Properties properties, io.vertigo.core.lang.BasicType dataType)
Static method factory for DomainBuilderstatic DomainSketch
of(String name, Properties properties, SketchKey dtSketchKey)
Static method factory for DomainBuilderstatic DomainSketch
of(String name, Properties properties, String valueObjectClassName)
Static method factory for DomainBuilder-
Methods inherited from class io.vertigo.studio.notebook.AbstractSketch
getKey, getLocalName, toString
-
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public static DomainSketch of(String name, Properties properties, SketchKey dtSketchKey)
Static method factory for DomainBuilder- Parameters:
name
- the name of the domaindtSketchKey
- the key of the dtSketch managed by the domain- Returns:
- DomainBuilder
-
of
public static DomainSketch of(String name, Properties properties, String valueObjectClassName)
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
public Properties getProperties()
- Returns:
- the properties
-
getDtSketchKey
public SketchKey getDtSketchKey()
-
getSmartTypeName
public String getSmartTypeName()
-
getScope
public DomainSketch.Scope getScope()
- Returns:
- the domain scope
-
getValueObjectClassName
public String getValueObjectClassName()
-
-