Interface AttributeService

All Superinterfaces:
Service

public interface AttributeService
extends Service
Service interface which converts back-and-forth between strongly-typed attribute value objects (like Double or Calendar) and strings which can be stored generically in the database.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String format​(java.lang.Object value, Field field)
    Convert an attribute value from a strongly typed object to a string
    java.lang.Object parse​(java.lang.String value, Field field)
    Convert an attribute value from a string to a strongly typed object
  • Method Details

    • format

      java.lang.String format​(java.lang.Object value, Field field)
      Convert an attribute value from a strongly typed object to a string

      Usage:
      To format the attribute value, Here are the examples to set different field types

       
        Double:             format(100.0, CoreFieldType.DOUBLE)
        Boolean:            format(Boolean.TRUE, CoreFieldType.BOOLEAN)
        
    • parse

      java.lang.Object parse​(java.lang.String value, Field field)
      Convert an attribute value from a string to a strongly typed object