Interface PrimitiveDomainType

    • Method Detail

      • convertToString

        String convertToString​(Object value)
        Converts an object value of this type to a locale/system neutral String. Is used in XML conversion. The opposite of this method is the createFromString(String) method.
        Parameters:
        value - the value to convert to a string.
        Returns:
        the String representation, if the value is null then an empty String is returned
        Throws:
        IllegalArgumentException - if the conversion is not possible
      • createFromString

        Object createFromString​(String strValue)
        Converts a string back to an object value of the primitive type ({link #getPrimitiveType()}) represented by this DomainType. This method is the opposite of the convertToString(Object) method.
        Parameters:
        strValue - the string value to convert
        Returns:
        the object value, null is returned if an empty string or null are passed as parameter.
        Throws:
        IllegalArgumentException - if the conversion is not possible
      • getXMLSchemaType

        String getXMLSchemaType()
        Returns:
        the xml schema type which matches the primitive type, is used to create the XML Schema for the REST web services.
      • getHibernateType

        Class<?> getHibernateType()
        The type used in the hibernate mapping. Most of the time is the same as the getPrimitiveType(). Can be used to set a hibnernate user type class. See the hibernate documentation for more information on this.
        Returns:
        the class representing the hibernate type
      • getPrimitiveType

        Class<?> getPrimitiveType()
        The primitive type class (for example java.lang.Long) if this is a primitive type.
        Returns:
        the class representing the primitive type
      • getFormatId

        String getFormatId()
        Returns the id of the format definition to use for this domain type. Is normally only relevant for numeric domain types. The id is the prefix part of the name in the Format.xml file. So for example the id 'integer' maps to all the Format.xml entries with integer as a prefix.
        Returns:
        the name of the format definition in the format.xml, if not relevant then null is returned.