to.etc.domui.component.meta.impl
Class DisplayPropertyMetaModel

java.lang.Object
  extended by to.etc.domui.component.meta.impl.DisplayPropertyMetaModel

public class DisplayPropertyMetaModel
extends java.lang.Object

Implementation for a Display Property metamodel. The Display Property data overrides the default metadata for a property in a given display context.

Author:
Frits Jalvingh Created on Aug 6, 2009

Constructor Summary
DisplayPropertyMetaModel()
           
DisplayPropertyMetaModel(ClassMetaModel cmm, MetaComboProperty p)
           
DisplayPropertyMetaModel(ClassMetaModel cmm, MetaDisplayProperty p)
           
 
Method Summary
static java.util.List<DisplayPropertyMetaModel> decode(ClassMetaModel cmm, MetaComboProperty[] mar)
          Convert a list of combobox display properties to their metamodel equivalents.
static java.util.List<DisplayPropertyMetaModel> decode(ClassMetaModel cmm, MetaDisplayProperty[] mar)
          Converts a list of MetaDisplayProperty annotations into their metamodel equivalents.
<X,TT extends IConverter<X>>
java.lang.String
getAsString(java.lang.Object root)
          Returns the attribute as a string value.
 IConverter<?> getConverter()
           
 int getDisplayLength()
           
 java.lang.String getJoin()
          If this is joined display property, this returns the string to put between the joined values.
 java.lang.String getLabel()
          If the label for this display property is overridden this returns the value (not the key) for the overridden label.
 java.lang.String getName()
          Returns the property name this pertains to.
 java.lang.String getRenderHint()
           
 SortableType getSortable()
           
 void setConverter(IConverter<?> converter)
           
 void setDisplayLength(int displayLength)
           
 void setJoin(java.lang.String join)
           
 void setName(java.lang.String name)
           
 void setRenderHint(java.lang.String renderHint)
           
 void setSortable(SortableType sortable)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisplayPropertyMetaModel

public DisplayPropertyMetaModel()

DisplayPropertyMetaModel

public DisplayPropertyMetaModel(ClassMetaModel cmm,
                                MetaDisplayProperty p)

DisplayPropertyMetaModel

public DisplayPropertyMetaModel(ClassMetaModel cmm,
                                MetaComboProperty p)
Method Detail

decode

public static java.util.List<DisplayPropertyMetaModel> decode(ClassMetaModel cmm,
                                                              MetaDisplayProperty[] mar)
Converts a list of MetaDisplayProperty annotations into their metamodel equivalents.

Parameters:
cmm -
mar -
Returns:

decode

public static java.util.List<DisplayPropertyMetaModel> decode(ClassMetaModel cmm,
                                                              MetaComboProperty[] mar)
Convert a list of combobox display properties to their metamodel equivalents.

Parameters:
cmm -
mar -
Returns:

getName

public java.lang.String getName()
Returns the property name this pertains to. This can be a property path expression.

Returns:

setName

public void setName(java.lang.String name)

getJoin

public java.lang.String getJoin()
If this is joined display property, this returns the string to put between the joined values. Returns null for unjoined properties.

Returns:

setJoin

public void setJoin(java.lang.String join)

getLabel

public java.lang.String getLabel()
If the label for this display property is overridden this returns the value (not the key) for the overridden label. If this display property does not override the label it returns null. When the key does not exist in the bundle this returns the key error string (???+key+???).

Returns:

getAsString

public <X,TT extends IConverter<X>> java.lang.String getAsString(java.lang.Object root)
                             throws java.lang.Exception
Returns the attribute as a string value.

Parameters:
root -
Returns:
Throws:
java.lang.Exception

getRenderHint

public java.lang.String getRenderHint()

setRenderHint

public void setRenderHint(java.lang.String renderHint)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getConverter

public IConverter<?> getConverter()

setConverter

public void setConverter(IConverter<?> converter)

getSortable

public SortableType getSortable()

setSortable

public void setSortable(SortableType sortable)

getDisplayLength

public int getDisplayLength()

setDisplayLength

public void setDisplayLength(int displayLength)