Class 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
    • 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 domain
        dataType - 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 domain
        dtSketchKey - 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 domain
        valueObjectClassName - 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()
      • getValueObjectClassName

        public String getValueObjectClassName()