|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertyMetaModel<T>
Contains the metadata that is known for a field (property). Since the future of first-class Java properties is unclear (they would be way too helpful so naturally they get little attention) this uses class/string encoding to represent a property.
Method Summary | |
---|---|
java.lang.Class<T> |
getActualType()
Returns the actual type of the property's value. |
ClassMetaModel |
getClassModel()
The ClassModel that this property is a property of. |
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()
The abomination that is Java Generics requires a separate dysfunctional type system to represent generic typing, at the few places it is available. |
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. |
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). |
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. |
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 |
Methods inherited from interface to.etc.domui.util.IValueAccessor |
---|
setValue |
Methods inherited from interface to.etc.domui.util.IValueTransformer |
---|
getValue |
Method Detail |
---|
@Nonnull ClassMetaModel getClassModel()
@Nullable ClassMetaModel getValueModel()
@Nonnull java.lang.Class<T> getActualType()
@Nullable java.lang.reflect.Type getGenericActualType()
@Nullable java.lang.String getDefaultLabel()
@Nullable java.lang.String getDefaultHint()
int getLength()
int getPrecision()
int getScale()
int getDisplayLength()
@Nonnull java.lang.String getName()
@Nonnull SortableType getSortable()
@Nullable IConverter<T> getConverter()
boolean isRequired()
boolean isPrimaryKey()
@Nonnull PropertyRelationType getRelationType()
@Nullable java.lang.Object[] getDomainValues()
@Nullable java.lang.String getDomainValueLabel(java.util.Locale loc, java.lang.Object val)
loc
- val
-
@Nonnull TemporalPresentationType getTemporal()
@Nonnull NumericPresentation getNumericPresentation()
@Nullable java.lang.Class<? extends IComboDataSet<?>> getComboDataSet()
@Nullable java.lang.Class<? extends ILabelStringRenderer<?>> getComboLabelRenderer()
@Nullable java.lang.Class<? extends INodeContentRenderer<?>> getComboNodeRenderer()
@Nonnull java.util.List<DisplayPropertyMetaModel> getComboDisplayProperties()
@Nullable java.lang.String[][] getViewRoles()
{ {"admin"} , {"editroles", "user"} , {"tester"} };this means that the field is visible for a user with the roles:
"admin" OR "tester" OR ("editroles" AND "user")
@Nullable java.lang.String[][] getEditRoles()
getViewRoles()
for details.
@Nonnull YesNoType getReadOnly()
boolean isTransient()
@Nullable java.lang.String getComponentTypeHint()
@Nullable java.lang.Class<? extends INodeContentRenderer<?>> getLookupSelectedRenderer()
@Nonnull java.util.List<DisplayPropertyMetaModel> getLookupSelectedProperties()
@Nonnull java.util.List<DisplayPropertyMetaModel> getLookupTableProperties()
LookupInput
field, this fields are used to show the result of a Search in the DataTable.
@Nonnull java.util.List<SearchPropertyMetaModel> getLookupFieldSearchProperties()
LookupInput
field, this fields are used to create the search inputs.
@Nonnull java.util.List<SearchPropertyMetaModel> getLookupFieldKeySearchProperties()
LookupInput
field, this fields are used to create the keyword search inputs.
@Nullable PropertyMetaValidator[] getValidators()
@Nullable java.lang.String getRegexpValidator()
@Nullable java.lang.String getRegexpUserString()
@Nullable ControlFactory getControlFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |