org.outerj.daisy.repository
Class FieldHelper
java.lang.Object
org.outerj.daisy.repository.FieldHelper
public final class FieldHelper
- extends Object
Some helper methods that can be useful when working with Fields.
|
Method Summary |
static Object |
getFieldValueFromXml(ValueType valueType,
boolean multiValue,
boolean hierarchical,
org.outerx.daisy.x10.FieldValuesType xml)
Convenience method to get a value of a certain ValueType from a Field-as-XML. |
static Object |
getFieldValueFromXml(ValueType valueType,
boolean multiValue,
org.outerx.daisy.x10.FieldValuesType xml)
|
static Object[] |
getFieldValuesFromXml(ValueType valueType,
org.outerx.daisy.x10.FieldValuesType xml)
|
static String |
getFormattedValue(Object value,
ValueType valueType,
Locale locale,
Repository repository)
Convenience method to get a String representation of a value, taking into
account the locale (thus nicer then calling toString() on the value). |
static FieldHelper.XmlFieldValueGetter |
getXmlFieldValueGetter(ValueType valueType)
|
static FieldHelper.XmlFieldValueSetter |
getXmlFieldValueSetter(ValueType valueType)
|
FieldHelper
public FieldHelper()
getFormattedValue
public static String getFormattedValue(Object value,
ValueType valueType,
Locale locale,
Repository repository)
- Convenience method to get a String representation of a value, taking into
account the locale (thus nicer then calling toString() on the value).
getFieldValueFromXml
public static Object getFieldValueFromXml(ValueType valueType,
boolean multiValue,
boolean hierarchical,
org.outerx.daisy.x10.FieldValuesType xml)
- Convenience method to get a value of a certain ValueType from a Field-as-XML.
Useful if you're working with the XML representation of a field.
getFieldValueFromXml
public static Object getFieldValueFromXml(ValueType valueType,
boolean multiValue,
org.outerx.daisy.x10.FieldValuesType xml)
getFieldValuesFromXml
public static Object[] getFieldValuesFromXml(ValueType valueType,
org.outerx.daisy.x10.FieldValuesType xml)
getXmlFieldValueSetter
public static FieldHelper.XmlFieldValueSetter getXmlFieldValueSetter(ValueType valueType)
getXmlFieldValueGetter
public static FieldHelper.XmlFieldValueGetter getXmlFieldValueGetter(ValueType valueType)