Class ItoADecorator

  • All Implemented Interfaces:
    IAttributeDecorator

    public class ItoADecorator
    extends java.lang.Object
    implements IAttributeDecorator
    Decorates the attribute with the given attribute name in the given document with help of standart itoa routine. Number of characters is given in the rule parameter. Example: decorate(doc, "count", "3"), with value of attribute count being 7 in the given document will result in "007". This decorator is useful to make integer values stored as strings sortable.
    Version:
    $Id: $Id
    Author:
    another
    • Constructor Summary

      Constructors 
      Constructor Description
      ItoADecorator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String decorate​(DataObject doc, java.lang.String attributeName, java.lang.String rule)
      Returns the decorated form.
      • Methods inherited from class java.lang.Object

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

      • ItoADecorator

        public ItoADecorator()
    • Method Detail

      • decorate

        public java.lang.String decorate​(DataObject doc,
                                         java.lang.String attributeName,
                                         java.lang.String rule)
        Returns the decorated form.
        Specified by:
        decorate in interface IAttributeDecorator
        Parameters:
        doc - target document.
        attributeName - name of the attribute for decoration.
        rule - evtl decoration rule (if configured in view definition file).
        Returns:
        a String object.