public class ExpandedDisplayProperty<T> extends Object implements PropertyMetaModel<T>
NO_VALIDATORS| Modifier | Constructor and Description |
|---|---|
protected |
ExpandedDisplayProperty(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) |
| Modifier and Type | Method and Description |
|---|---|
static List<ExpandedDisplayProperty<?>> |
expandDisplayProperties(List<DisplayPropertyMetaModel> dpl,
ClassMetaModel cmm,
IValueAccessor<?> rootAccessor)
Enter with a list of display thingies; returns the fully-expanded list of thingeridoos.
|
static List<ExpandedDisplayProperty<?>> |
expandProperties(Class<?> clz,
String[] properties) |
static List<ExpandedDisplayProperty<?>> |
expandProperties(ClassMetaModel cmm,
String[] properties) |
static ExpandedDisplayProperty<?> |
expandProperty(ClassMetaModel cmm,
String property)
Get the display expansion for a single property.
|
static <X> ExpandedDisplayProperty<?> |
expandProperty(PropertyMetaModel<X> pmm)
Get the display expansion for a single property.
|
static List<ExpandedDisplayProperty<?>> |
flatten(List<ExpandedDisplayProperty<?>> in) |
static void |
flatten(List<ExpandedDisplayProperty<?>> res,
ExpandedDisplayProperty<?> xd) |
Class<T> |
getActualType()
Returns the actual type of the property's value.
|
<A> A |
getAnnotation(Class<A> annclass)
Expanded properties do not have annotations.
|
List<Object> |
getAnnotations()
Expanded properties do not have annotations.
|
IConverter<T> |
getBestConverter() |
ClassMetaModel |
getClassModel()
This returns the ClassMetaModel for the ROOT of this property(!).
|
String[] |
getColumnNames()
Returns empty by definition.
|
Class<? extends IComboDataSet<?>> |
getComboDataSet()
If this should be represented by a combo this can be set to represent the default combo dataset.
|
List<DisplayPropertyMetaModel> |
getComboDisplayProperties()
For a relation, this is the list of properties that should be shown.
|
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.
|
Class<? extends INodeContentRenderer<?>> |
getComboNodeRenderer()
When set this renderer should be used to render the nodes in the combobox.
|
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.
|
PropertyControlFactory |
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.
|
String |
getDefaultHint()
Returns the default hint text (which pops up when the mouse is held over the control that inputs this
item).
|
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.
|
String |
getDomainValueLabel(Locale loc,
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).
|
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.
|
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".
|
List<SearchPropertyMetaModel> |
getLookupFieldKeySearchProperties()
When used in a
LookupInput field, this fields are used to create the keyword search inputs. |
List<SearchPropertyMetaModel> |
getLookupFieldSearchProperties()
When used in a
LookupInput field, this fields are used to create the search inputs. |
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.
|
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.
|
List<DisplayPropertyMetaModel> |
getLookupTableProperties()
When used in a
LookupInput field, this fields are used to show the result of a Search in the DataTable. |
String |
getName()
Returns the name of the property.
|
YesNoType |
getNowrap() |
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.
|
String |
getPresentationString(Object root) |
IQueryManipulator<T> |
getQueryManipulator()
For Lookup and Combo fields, this can return a QueryManipulator instance that will alter the base
query for the thing to show.
|
YesNoType |
getReadOnly()
Reports whether a property is readonly.
|
String |
getRegexpUserString()
Use the string to use as the pattern indicator in regexp-validator error messages.
|
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).
|
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(Object in) |
ClassMetaModel |
getValueModel()
If applicable, the value type's class model.
|
boolean |
isPrimaryKey()
Returns T if we know this property to be the PK.
|
boolean |
isReadOnly() |
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(String propertyName) |
void |
setRenderHint(String renderHint) |
void |
setSortable(SortableType sortableType) |
void |
setValue(Object target,
Object value) |
String |
toString() |
protected ExpandedDisplayProperty(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)
public static ExpandedDisplayProperty<?> expandProperty(ClassMetaModel cmm, String property)
ExpandedDisplayPropertyList.clz - property - public static <X> ExpandedDisplayProperty<?> expandProperty(PropertyMetaModel<X> pmm)
ExpandedDisplayPropertyList.pmm - The metamodel for the property to expand.public static List<ExpandedDisplayProperty<?>> expandProperties(Class<?> clz, String[] properties)
public static List<ExpandedDisplayProperty<?>> expandProperties(ClassMetaModel cmm, String[] properties)
public static List<ExpandedDisplayProperty<?>> expandDisplayProperties(List<DisplayPropertyMetaModel> dpl, ClassMetaModel cmm, IValueAccessor<?> rootAccessor)
dpl - cmm - rootAccessor - @Nonnull public Class<T> getActualType()
PropertyMetaModelgetActualType in interface PropertyMetaModel<T>public final void setValue(Object target, Object value) throws Exception
setValue in interface IValueAccessor<T>Exceptionpublic T getValue(Object in) throws Exception
getValue in interface IValueTransformer<T>Exceptionpublic ClassMetaModel getValueModel()
PropertyMetaModelgetValueModel in interface PropertyMetaModel<T>public Type getGenericActualType()
getGenericActualType in interface PropertyMetaModel<T>PropertyMetaModel.getGenericActualType()@Nonnull public String getDefaultLabel()
PropertyMetaModelgetDefaultLabel in interface PropertyMetaModel<T>public IConverter<T> getConverter()
PropertyMetaModelgetConverter in interface PropertyMetaModel<T>public int getDisplayLength()
PropertyMetaModelgetDisplayLength in interface PropertyMetaModel<T>public void setDisplayLength(int displayLength)
@Nonnull public SortableType getSortable()
PropertyMetaModelgetSortable in interface PropertyMetaModel<T>public void setSortable(SortableType sortableType)
@Nonnull public String getName()
PropertyMetaModelgetName in interface PropertyMetaModel<T>public void setName(String propertyName)
public IConverter<T> getBestConverter()
public String getPresentationString(Object root) throws Exception
Exceptionpublic static List<ExpandedDisplayProperty<?>> flatten(List<ExpandedDisplayProperty<?>> in)
public static void flatten(List<ExpandedDisplayProperty<?>> res, ExpandedDisplayProperty<?> xd)
@Nonnull public ClassMetaModel getClassModel()
getClassModel in interface PropertyMetaModel<T>PropertyMetaModel.getClassModel()public Class<? extends IComboDataSet<?>> getComboDataSet()
PropertyMetaModelgetComboDataSet in interface PropertyMetaModel<T>@Nonnull public List<DisplayPropertyMetaModel> getComboDisplayProperties()
PropertyMetaModelgetComboDisplayProperties in interface PropertyMetaModel<T>public Class<? extends ILabelStringRenderer<?>> getComboLabelRenderer()
PropertyMetaModelgetComboLabelRenderer in interface PropertyMetaModel<T>public Class<? extends INodeContentRenderer<?>> getComboNodeRenderer()
PropertyMetaModelgetComboNodeRenderer in interface PropertyMetaModel<T>public String getComponentTypeHint()
PropertyMetaModelgetComponentTypeHint in interface PropertyMetaModel<T>public String getDefaultHint()
PropertyMetaModelgetDefaultHint in interface PropertyMetaModel<T>public String getDomainValueLabel(Locale loc, Object val)
PropertyMetaModelgetDomainValueLabel in interface PropertyMetaModel<T>public Object[] getDomainValues()
PropertyMetaModelgetDomainValues in interface PropertyMetaModel<T>public int getLength()
PropertyMetaModelgetLength in interface PropertyMetaModel<T>@Nonnull public List<DisplayPropertyMetaModel> getLookupSelectedProperties()
PropertyMetaModelgetLookupSelectedProperties in interface PropertyMetaModel<T>@Nonnull public List<SearchPropertyMetaModel> getLookupFieldSearchProperties()
PropertyMetaModelLookupInput field, this fields are used to create the search inputs.getLookupFieldSearchProperties in interface PropertyMetaModel<T>@Nonnull public List<SearchPropertyMetaModel> getLookupFieldKeySearchProperties()
PropertyMetaModelLookupInput field, this fields are used to create the keyword search inputs.getLookupFieldKeySearchProperties in interface PropertyMetaModel<T>@Nonnull public List<DisplayPropertyMetaModel> getLookupTableProperties()
PropertyMetaModelLookupInput field, this fields are used to show the result of a Search in the DataTable.getLookupTableProperties in interface PropertyMetaModel<T>public Class<? extends INodeContentRenderer<?>> getLookupSelectedRenderer()
PropertyMetaModelgetLookupSelectedRenderer in interface PropertyMetaModel<T>public int getPrecision()
PropertyMetaModelgetPrecision in interface PropertyMetaModel<T>@Nonnull public YesNoType getReadOnly()
PropertyMetaModelgetReadOnly in interface PropertyMetaModel<T>@Nonnull public PropertyRelationType getRelationType()
PropertyMetaModelgetRelationType in interface PropertyMetaModel<T>public int getScale()
PropertyMetaModelgetScale in interface PropertyMetaModel<T>public PropertyControlFactory getControlFactory()
PropertyMetaModelgetControlFactory in interface PropertyMetaModel<T>@Nonnull public TemporalPresentationType getTemporal()
PropertyMetaModelgetTemporal in interface PropertyMetaModel<T>@Nonnull public NumericPresentation getNumericPresentation()
PropertyMetaModelgetNumericPresentation in interface PropertyMetaModel<T>@Nonnull public PropertyMetaValidator[] getValidators()
PropertyMetaModelgetValidators in interface PropertyMetaModel<T>public boolean isPrimaryKey()
PropertyMetaModelisPrimaryKey in interface PropertyMetaModel<T>public boolean isRequired()
PropertyMetaModelisRequired in interface PropertyMetaModel<T>public boolean isTransient()
PropertyMetaModelisTransient in interface PropertyMetaModel<T>@Nonnull public YesNoType getNowrap()
getNowrap in interface PropertyMetaModel<T>public String getRenderHint()
public void setRenderHint(String renderHint)
public String getRegexpUserString()
PropertyMetaModelgetRegexpUserString in interface PropertyMetaModel<T>public String getRegexpValidator()
PropertyMetaModelgetRegexpValidator in interface PropertyMetaModel<T>@Nullable public <A> A getAnnotation(@Nonnull Class<A> annclass)
getAnnotation in interface PropertyMetaModel<T>PropertyMetaModel.getAnnotation(java.lang.Class)@Nonnull public List<Object> getAnnotations()
getAnnotations in interface PropertyMetaModel<T>PropertyMetaModel.getAnnotations()@Nonnull public String[] getColumnNames()
getColumnNames in interface PropertyMetaModel<T>PropertyMetaModel.getColumnNames()public IQueryManipulator<T> getQueryManipulator()
PropertyMetaModelgetQueryManipulator in interface PropertyMetaModel<T>public boolean isReadOnly()
isReadOnly in interface IValueAccessor<T>Copyright © 2017 etc.to. All rights reserved.