Class ItoADecorator
- java.lang.Object
-
- net.anotheria.asg.util.decorators.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.Stringdecorate(DataObject doc, java.lang.String attributeName, java.lang.String rule)Returns the decorated form.
-
-
-
Method Detail
-
decorate
public java.lang.String decorate(DataObject doc, java.lang.String attributeName, java.lang.String rule)
Returns the decorated form.- Specified by:
decoratein interfaceIAttributeDecorator- Parameters:
doc- target document.attributeName- name of the attribute for decoration.rule- evtl decoration rule (if configured in view definition file).- Returns:
- a
Stringobject.
-
-