|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.component.meta.impl.ExpandedDisplayProperty<T>
public class ExpandedDisplayProperty<T>
This describes a normalized expanded display property. This is the base version used for all single properties. When a property refers to another class which must be rendered as multiple columns then the derived class ExpandedDisplayPropertyList is used.
Constructor Summary | |
---|---|
protected |
ExpandedDisplayProperty(java.lang.Class<T> actual,
PropertyMetaModel<?> propertyMeta,
IValueAccessor<?> accessor)
Constructor for LIST types. |
protected |
ExpandedDisplayProperty(DisplayPropertyMetaModel displayMeta,
PropertyMetaModel<T> propertyMeta,
IValueAccessor<T> accessor)
|
protected |
ExpandedDisplayProperty(PropertyMetaModel<T> propertyMeta,
IValueAccessor<T> accessor)
|
Method Summary | ||
---|---|---|
static java.util.List<ExpandedDisplayProperty<?>> |
expandDisplayProperties(java.util.List<DisplayPropertyMetaModel> dpl,
ClassMetaModel cmm,
IValueAccessor<?> rootAccessor)
Enter with a list of display thingies; returns the fully-expanded list of thingeridoos. |
|
static java.util.List<ExpandedDisplayProperty<?>> |
expandProperties(java.lang.Class<?> clz,
java.lang.String[] properties)
|
|
static java.util.List<ExpandedDisplayProperty<?>> |
expandProperties(ClassMetaModel cmm,
java.lang.String[] properties)
|
|
static ExpandedDisplayProperty<?> |
expandProperty(ClassMetaModel cmm,
java.lang.String property)
Get the display expansion for a single property. |
|
static
|
expandProperty(PropertyMetaModel<X> pmm)
Get the display expansion for a single property. |
|
static java.util.List<ExpandedDisplayProperty<?>> |
flatten(java.util.List<ExpandedDisplayProperty<?>> in)
|
|
static void |
flatten(java.util.List<ExpandedDisplayProperty<?>> res,
ExpandedDisplayProperty<?> xd)
|
|
java.lang.Class<T> |
getActualType()
Returns the actual type of the property's value. |
|
|
getAnnotation(java.lang.Class<A> annclass)
Expanded properties do not have annotations. |
|
java.util.List<java.lang.Object> |
getAnnotations()
Expanded properties do not have annotations. |
|
IConverter<?> |
getBestConverter()
|
|
ClassMetaModel |
getClassModel()
This returns the ClassMetaModel for the ROOT of this property(!). |
|
java.lang.Class<? extends IComboDataSet<?>> |
getComboDataSet()
If this should be represented by a combo this can be set to represent the default combo dataset. |
|
java.util.List<DisplayPropertyMetaModel> |
getComboDisplayProperties()
For a relation, this is the list of properties that should be shown. |
|
java.lang.Class<? extends ILabelStringRenderer<?>> |
getComboLabelRenderer()
When this relation-property is presented as a single field this can contain a class to render that field as a string. |
|
java.lang.Class<? extends INodeContentRenderer<?>> |
getComboNodeRenderer()
When set this renderer should be used to render the nodes in the combobox. |
|
java.lang.String |
getComponentTypeHint()
When present this gives a hint to the component factories to help with choosing a proper component to select a single record of the type specified by this property. |
|
ControlFactory |
getControlFactory()
If a specific control factory is to be used to create controls for this item this returns that factory. |
|
IConverter<T> |
getConverter()
Returns the user-specified converter to use when converting this property's value to and from string. |
|
java.lang.String |
getDefaultHint()
Returns the default hint text (which pops up when the mouse is held over the control that inputs this item). |
|
java.lang.String |
getDefaultLabel()
Return any default label (the text to use before the control that inputs this property) for this property. |
|
int |
getDisplayLength()
Returns the #chars to be displayed by default for this item. |
|
java.lang.String |
getDomainValueLabel(java.util.Locale loc,
java.lang.Object val)
Retrieves the properly localized string representing a domain value in a type which has a fixed set of domain values (like enum or boolean). |
|
java.lang.Object[] |
getDomainValues()
If the type for this property has a fixed set of domain values (like boolean or enum) this contains all possible values for this property. |
|
java.lang.String[][] |
getEditRoles()
Defines the roles that a user must have to edit this field. |
|
java.lang.reflect.Type |
getGenericActualType()
Returns null always; this seems reasonable for a type like this. |
|
int |
getLength()
Return the defined length for the item PROVIDED IT WAS SET - THIS SUFFERS FROM AN UTTER FUCKUP IN THE JPA "STANDARD". |
|
java.util.List<SearchPropertyMetaModel> |
getLookupFieldKeySearchProperties()
When used in a LookupInput field, this fields are used to create the keyword search inputs. |
|
java.util.List<SearchPropertyMetaModel> |
getLookupFieldSearchProperties()
When used in a LookupInput field, this fields are used to create the search inputs. |
|
java.util.List<DisplayPropertyMetaModel> |
getLookupSelectedProperties()
When this class is to be selected as a parent in an UP relation using an InputLookup control this describes the properties to use to display the currently selected record in the edit page. |
|
java.lang.Class<? extends INodeContentRenderer<?>> |
getLookupSelectedRenderer()
When this class is to be selected as a parent in an UP relation using an InputLookup control this describes the renderer to use to display the currently selected record in the edit page. |
|
java.util.List<DisplayPropertyMetaModel> |
getLookupTableProperties()
When used in a LookupInput field, this fields are used to show the result of a Search in the DataTable. |
|
java.lang.String |
getName()
Returns the name of the property. |
|
NumericPresentation |
getNumericPresentation()
Used for numeric types, this returns how to present the number and defines the number's class, like a monetary amount. |
|
int |
getPrecision()
Return the specified precision of the numeric field. |
|
java.lang.String |
getPresentationString(java.lang.Object root)
|
|
YesNoType |
getReadOnly()
Reports whether a property is readonly. |
|
java.lang.String |
getRegexpUserString()
Use the string to use as the pattern indicator in regexp-validator error messages. |
|
java.lang.String |
getRegexpValidator()
Returns the regexp to use to validate input. |
|
PropertyRelationType |
getRelationType()
Tells if this property represents some kind of database relation (a "parent" property referring to the master of this child record, or a property representing the list of children). |
|
java.lang.String |
getRenderHint()
|
|
int |
getScale()
For numeric types, this returns any defined scale. |
|
SortableType |
getSortable()
Returns whether the property should be sortable when used in a default table, and defines the initial sort direction of the property. |
|
TemporalPresentationType |
getTemporal()
If this is defined as some Date type this further defines the domain (date only, date time etc). |
|
PropertyMetaValidator[] |
getValidators()
Get all validators to run on this property's input after conversion. |
|
T |
getValue(java.lang.Object in)
|
|
ClassMetaModel |
getValueModel()
If applicable, the value type's class model. |
|
java.lang.String[][] |
getViewRoles()
If this contains null the field can be seen by all users. |
|
boolean |
isPrimaryKey()
Returns T if we know this property to be the PK. |
|
boolean |
isRequired()
Whether the property is defined as requiring a value. |
|
boolean |
isTransient()
If marked as transient in the persistent class this returns true |
|
void |
setDisplayLength(int displayLength)
|
|
void |
setName(java.lang.String propertyName)
|
|
void |
setRenderHint(java.lang.String renderHint)
|
|
void |
setSortable(SortableType sortableType)
|
|
void |
setValue(java.lang.Object target,
java.lang.Object value)
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ExpandedDisplayProperty(java.lang.Class<T> actual, PropertyMetaModel<?> propertyMeta, IValueAccessor<?> accessor)
actual
- displayMeta
- propertyMeta
- accessor
- protected ExpandedDisplayProperty(PropertyMetaModel<T> propertyMeta, IValueAccessor<T> accessor)
protected ExpandedDisplayProperty(DisplayPropertyMetaModel displayMeta, PropertyMetaModel<T> propertyMeta, IValueAccessor<T> accessor)
Method Detail |
---|
public static ExpandedDisplayProperty<?> expandProperty(ClassMetaModel cmm, java.lang.String property)
ExpandedDisplayPropertyList
.
clz
- property
-
public static <X> ExpandedDisplayProperty<?> expandProperty(PropertyMetaModel<X> pmm)
ExpandedDisplayPropertyList
.
pmm
- The metamodel for the property to expand.public static java.util.List<ExpandedDisplayProperty<?>> expandProperties(java.lang.Class<?> clz, java.lang.String[] properties)
public static java.util.List<ExpandedDisplayProperty<?>> expandProperties(ClassMetaModel cmm, java.lang.String[] properties)
public static java.util.List<ExpandedDisplayProperty<?>> expandDisplayProperties(java.util.List<DisplayPropertyMetaModel> dpl, ClassMetaModel cmm, IValueAccessor<?> rootAccessor)
dpl
- cmm
- rootAccessor
-
public java.lang.Class<T> getActualType()
PropertyMetaModel
getActualType
in interface PropertyMetaModel<T>
public final void setValue(java.lang.Object target, java.lang.Object value) throws java.lang.Exception
setValue
in interface IValueAccessor<T>
java.lang.Exception
public T getValue(java.lang.Object in) throws java.lang.Exception
getValue
in interface IValueTransformer<T>
java.lang.Exception
public ClassMetaModel getValueModel()
PropertyMetaModel
getValueModel
in interface PropertyMetaModel<T>
public java.lang.reflect.Type getGenericActualType()
getGenericActualType
in interface PropertyMetaModel<T>
PropertyMetaModel.getGenericActualType()
public java.lang.String getDefaultLabel()
PropertyMetaModel
getDefaultLabel
in interface PropertyMetaModel<T>
public IConverter<T> getConverter()
PropertyMetaModel
getConverter
in interface PropertyMetaModel<T>
public int getDisplayLength()
PropertyMetaModel
getDisplayLength
in interface PropertyMetaModel<T>
public void setDisplayLength(int displayLength)
public SortableType getSortable()
PropertyMetaModel
getSortable
in interface PropertyMetaModel<T>
public void setSortable(SortableType sortableType)
public java.lang.String getName()
PropertyMetaModel
getName
in interface PropertyMetaModel<T>
public void setName(java.lang.String propertyName)
public IConverter<?> getBestConverter()
public java.lang.String getPresentationString(java.lang.Object root) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ExpandedDisplayProperty<?>> flatten(java.util.List<ExpandedDisplayProperty<?>> in)
public static void flatten(java.util.List<ExpandedDisplayProperty<?>> res, ExpandedDisplayProperty<?> xd)
public ClassMetaModel getClassModel()
getClassModel
in interface PropertyMetaModel<T>
PropertyMetaModel.getClassModel()
public java.lang.Class<? extends IComboDataSet<?>> getComboDataSet()
PropertyMetaModel
getComboDataSet
in interface PropertyMetaModel<T>
public java.util.List<DisplayPropertyMetaModel> getComboDisplayProperties()
PropertyMetaModel
getComboDisplayProperties
in interface PropertyMetaModel<T>
public java.lang.Class<? extends ILabelStringRenderer<?>> getComboLabelRenderer()
PropertyMetaModel
getComboLabelRenderer
in interface PropertyMetaModel<T>
public java.lang.Class<? extends INodeContentRenderer<?>> getComboNodeRenderer()
PropertyMetaModel
getComboNodeRenderer
in interface PropertyMetaModel<T>
public java.lang.String getComponentTypeHint()
PropertyMetaModel
getComponentTypeHint
in interface PropertyMetaModel<T>
public java.lang.String getDefaultHint()
PropertyMetaModel
getDefaultHint
in interface PropertyMetaModel<T>
public java.lang.String getDomainValueLabel(java.util.Locale loc, java.lang.Object val)
PropertyMetaModel
getDomainValueLabel
in interface PropertyMetaModel<T>
public java.lang.Object[] getDomainValues()
PropertyMetaModel
getDomainValues
in interface PropertyMetaModel<T>
public java.lang.String[][] getEditRoles()
PropertyMetaModel
PropertyMetaModel.getViewRoles()
for details.
getEditRoles
in interface PropertyMetaModel<T>
public int getLength()
PropertyMetaModel
getLength
in interface PropertyMetaModel<T>
public java.util.List<DisplayPropertyMetaModel> getLookupSelectedProperties()
PropertyMetaModel
getLookupSelectedProperties
in interface PropertyMetaModel<T>
public java.util.List<SearchPropertyMetaModel> getLookupFieldSearchProperties()
PropertyMetaModel
LookupInput
field, this fields are used to create the search inputs.
getLookupFieldSearchProperties
in interface PropertyMetaModel<T>
public java.util.List<SearchPropertyMetaModel> getLookupFieldKeySearchProperties()
PropertyMetaModel
LookupInput
field, this fields are used to create the keyword search inputs.
getLookupFieldKeySearchProperties
in interface PropertyMetaModel<T>
public java.util.List<DisplayPropertyMetaModel> getLookupTableProperties()
PropertyMetaModel
LookupInput
field, this fields are used to show the result of a Search in the DataTable.
getLookupTableProperties
in interface PropertyMetaModel<T>
public java.lang.Class<? extends INodeContentRenderer<?>> getLookupSelectedRenderer()
PropertyMetaModel
getLookupSelectedRenderer
in interface PropertyMetaModel<T>
public int getPrecision()
PropertyMetaModel
getPrecision
in interface PropertyMetaModel<T>
public YesNoType getReadOnly()
PropertyMetaModel
getReadOnly
in interface PropertyMetaModel<T>
public PropertyRelationType getRelationType()
PropertyMetaModel
getRelationType
in interface PropertyMetaModel<T>
public int getScale()
PropertyMetaModel
getScale
in interface PropertyMetaModel<T>
public ControlFactory getControlFactory()
PropertyMetaModel
getControlFactory
in interface PropertyMetaModel<T>
public TemporalPresentationType getTemporal()
PropertyMetaModel
getTemporal
in interface PropertyMetaModel<T>
public NumericPresentation getNumericPresentation()
PropertyMetaModel
getNumericPresentation
in interface PropertyMetaModel<T>
public PropertyMetaValidator[] getValidators()
PropertyMetaModel
getValidators
in interface PropertyMetaModel<T>
public java.lang.String[][] getViewRoles()
PropertyMetaModel
{ {"admin"} , {"editroles", "user"} , {"tester"} };this means that the field is visible for a user with the roles:
"admin" OR "tester" OR ("editroles" AND "user")
getViewRoles
in interface PropertyMetaModel<T>
public boolean isPrimaryKey()
PropertyMetaModel
isPrimaryKey
in interface PropertyMetaModel<T>
public boolean isRequired()
PropertyMetaModel
isRequired
in interface PropertyMetaModel<T>
public boolean isTransient()
PropertyMetaModel
isTransient
in interface PropertyMetaModel<T>
public java.lang.String getRenderHint()
public void setRenderHint(java.lang.String renderHint)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRegexpUserString()
PropertyMetaModel
getRegexpUserString
in interface PropertyMetaModel<T>
public java.lang.String getRegexpValidator()
PropertyMetaModel
getRegexpValidator
in interface PropertyMetaModel<T>
@Nullable public <A> A getAnnotation(java.lang.Class<A> annclass)
getAnnotation
in interface PropertyMetaModel<T>
PropertyMetaModel.getAnnotation(java.lang.Class)
public java.util.List<java.lang.Object> getAnnotations()
getAnnotations
in interface PropertyMetaModel<T>
PropertyMetaModel.getAnnotations()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |