public class ClassMetaModelWrapper extends Object implements ClassMetaModel
| Modifier | Constructor and Description |
|---|---|
protected |
ClassMetaModelWrapper(ClassMetaModel parent) |
| Modifier and Type | Method and Description |
|---|---|
QCriteria<?> |
createCriteria()
If this is a persistent class, this should create a base QCriteria instance to do queries
on this class.
|
PropertyMetaModel<?> |
findProperty(String name)
Returns a property reference to the specified property by following the dotted path
starting at this class.
|
PropertyMetaModel<?> |
findSimpleProperty(String name)
Returns the named property on this class.
|
Class<?> |
getActualClass()
FIXME Questionable nullity
|
BundleRef |
getClassBundle()
Returns the message bundle for translations related to this class.
|
Class<? extends IComboDataSet<?>> |
getComboDataSet()
If this class is the UP in a relation this specifies that it must
be shown as a COMBOBOX containing choices.
|
List<DisplayPropertyMetaModel> |
getComboDisplayProperties()
If this object is shown in a combobox it needs to show the following
properties as the display value.
|
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, the entire content of a combobox's OPTION tag can be
generated by this content renderer.
|
String |
getComboSortProperty()
The property name to sort the combobox's presentation on.
|
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 this type.
|
SortableType |
getDefaultSortDirection()
When a
ClassMetaModel.getDefaultSortProperty() is defined, this defines the sort order to use
initially. |
String |
getDefaultSortProperty()
Contains the name of the property to use for sorting initially.
|
String |
getDomainLabel(Locale loc,
Object value)
For a Domain type (Enum, Boolean) this returns a label for a given domain value, or null if no label is defined.
|
Object[] |
getDomainValues()
If this class is an Enum or represents some enumerated value, this returns the possible value objects.
|
List<SearchPropertyMetaModel> |
getKeyWordSearchProperties()
Returns the SORTED list of key word search properties defined on this class.
|
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.
|
PropertyMetaModel<?> |
getPrimaryKey()
Returns the property containing the primary key for this object, if one can be found.
|
List<PropertyMetaModel<?>> |
getProperties() |
PropertyMetaModel<?> |
getProperty(String name)
Same as
ClassMetaModel.findProperty(String), but throws an exception if the property (or path) is not found, so
it never returns null. |
IQueryManipulator<?> |
getQueryManipulator()
For Lookup and Combo fields, this can return a QueryManipulator instance that will alter the base
query for the list-of-this to show.
|
List<SearchPropertyMetaModel> |
getSearchProperties()
Returns the SORTED list of search properties defined on this class.
|
List<DisplayPropertyMetaModel> |
getTableDisplayProperties()
If this object is shown in a Table it needs to show the following
properties there.
|
String |
getTableName()
If this is a persistent class that is directly mapped onto some table, this might return the table name.
|
String |
getUserEntityName()
Return a user-presentable entity name (singular) for this class.
|
String |
getUserEntityNamePlural()
Returns the name of this entity in user terms; the returned name is plural.
|
ClassMetaModel |
getWrappedModel() |
boolean |
isPersistentClass() |
void |
setWrappedModel(ClassMetaModel parent)
WATCH OUT: Should only be used when initializing outside the constructor; should not change after this
has been passed to user code.
|
protected ClassMetaModelWrapper(ClassMetaModel parent)
public String getComboSortProperty()
ClassMetaModelgetComboSortProperty in interface ClassMetaModelpublic IQueryManipulator<?> getQueryManipulator()
ClassMetaModelgetQueryManipulator in interface ClassMetaModelpublic ClassMetaModel getWrappedModel()
public void setWrappedModel(ClassMetaModel parent)
parent - public PropertyMetaModel<?> findProperty(@Nonnull String name)
ClassMetaModelfindProperty in interface ClassMetaModel@Nonnull public PropertyMetaModel<?> getProperty(@Nonnull String name)
ClassMetaModelClassMetaModel.findProperty(String), but throws an exception if the property (or path) is not found, so
it never returns null.getProperty in interface ClassMetaModelpublic PropertyMetaModel<?> findSimpleProperty(@Nonnull String name)
ClassMetaModelfindSimpleProperty in interface ClassMetaModel@Nonnull public Class<?> getActualClass()
ClassMetaModelgetActualClass in interface ClassMetaModel@Nonnull public BundleRef getClassBundle()
ClassMetaModelgetClassBundle in interface ClassMetaModelpublic Class<? extends IComboDataSet<?>> getComboDataSet()
ClassMetaModelgetComboDataSet in interface ClassMetaModel@Nonnull public List<DisplayPropertyMetaModel> getComboDisplayProperties()
ClassMetaModelgetComboDisplayProperties in interface ClassMetaModelpublic Class<? extends ILabelStringRenderer<?>> getComboLabelRenderer()
ClassMetaModelgetComboLabelRenderer in interface ClassMetaModelpublic Class<? extends INodeContentRenderer<?>> getComboNodeRenderer()
ClassMetaModelClassMetaModel.getComboDisplayProperties(),
ClassMetaModel.getComboLabelRenderer() properties are ignored.getComboNodeRenderer in interface ClassMetaModelpublic String getComponentTypeHint()
ClassMetaModelgetComponentTypeHint in interface ClassMetaModel@Nullable public SortableType getDefaultSortDirection()
ClassMetaModelClassMetaModel.getDefaultSortProperty() is defined, this defines the sort order to use
initially.getDefaultSortDirection in interface ClassMetaModelpublic String getDefaultSortProperty()
ClassMetaModelgetDefaultSortProperty in interface ClassMetaModelpublic String getDomainLabel(Locale loc, Object value)
ClassMetaModelgetDomainLabel in interface ClassMetaModelpublic Object[] getDomainValues()
ClassMetaModelgetDomainValues in interface ClassMetaModel@Nonnull public List<SearchPropertyMetaModel> getKeyWordSearchProperties()
ClassMetaModelLookupInput to define the "search-as-I-type" functionality.
The value gets set from either the MetaSearch or the MetaSearch
annotations.getKeyWordSearchProperties in interface ClassMetaModel@Nonnull public List<DisplayPropertyMetaModel> getLookupSelectedProperties()
ClassMetaModelgetLookupSelectedProperties in interface ClassMetaModelpublic Class<? extends INodeContentRenderer<?>> getLookupSelectedRenderer()
ClassMetaModelClassMetaModel.getLookupSelectedProperties().getLookupSelectedRenderer in interface ClassMetaModelpublic PropertyMetaModel<?> getPrimaryKey()
ClassMetaModelgetPrimaryKey in interface ClassMetaModel@Nonnull public List<PropertyMetaModel<?>> getProperties()
getProperties in interface ClassMetaModel@Nonnull public List<SearchPropertyMetaModel> getSearchProperties()
ClassMetaModelLookupInput
and LookupForm. The value gets set from either the MetaSearch or
the MetaSearch annotations.getSearchProperties in interface ClassMetaModel@Nonnull public List<DisplayPropertyMetaModel> getTableDisplayProperties()
ClassMetaModelLookupInput
search.getTableDisplayProperties in interface ClassMetaModelpublic String getTableName()
ClassMetaModelgetTableName in interface ClassMetaModelpublic String getUserEntityName()
ClassMetaModelgetUserEntityName in interface ClassMetaModelpublic String getUserEntityNamePlural()
ClassMetaModelgetUserEntityNamePlural in interface ClassMetaModelpublic boolean isPersistentClass()
isPersistentClass in interface ClassMetaModel@Nonnull public QCriteria<?> createCriteria() throws Exception
ClassMetaModelcreateCriteria in interface ClassMetaModelExceptionCopyright © 2017 etc.to. All rights reserved.