Class ConstantTransformer

    • Constructor Summary

      Constructors 
      Constructor Description
      ConstantTransformer()  
      ConstantTransformer​(java.lang.Object value)
      PUBLIC: Return a constant transformer for the constant value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object buildFieldValue​(java.lang.Object object, java.lang.String fieldName, Session session)
      INTERNAL: Always return the constant value.
      java.lang.Object getValue()
      PUBLIC: Return the value of the constant.
      void setValue​(java.lang.Object value)
      PUBLIC: Set the value of the constant.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        protected java.lang.Object value
    • Constructor Detail

      • ConstantTransformer

        public ConstantTransformer()
      • ConstantTransformer

        public ConstantTransformer​(java.lang.Object value)
        PUBLIC: Return a constant transformer for the constant value.
    • Method Detail

      • getValue

        public java.lang.Object getValue()
        PUBLIC: Return the value of the constant.
      • setValue

        public void setValue​(java.lang.Object value)
        PUBLIC: Set the value of the constant.
      • buildFieldValue

        public java.lang.Object buildFieldValue​(java.lang.Object object,
                                                java.lang.String fieldName,
                                                Session session)
        INTERNAL: Always return the constant value.
        Specified by:
        buildFieldValue in interface CoreFieldTransformer<Session>
        Specified by:
        buildFieldValue in interface FieldTransformer
        Overrides:
        buildFieldValue in class FieldTransformerAdapter
        Parameters:
        object - - an instance of the domain class which contains the attribute
        fieldName - - the name of the field being transformed. Used if the user wants to use this transformer for multiple fields.
        session - - the current session
        Returns:
        - The value to be written for the field associated with this transformer