to.etc.domui.component.meta
Interface ClassMetaModel

All Known Implementing Classes:
ClassMetaModelWrapper, DefaultClassMetaModel

public interface ClassMetaModel


Method Summary
 QCriteria<?> createCriteria()
          EXPERIMENTAL If this is a persistent class, this should create a base QCriteria instance to do queries on this class.
 PropertyMetaModel<?> findProperty(java.lang.String name)
          Returns a property reference to the specified property by following the dotted path starting at this class.
 PropertyMetaModel<?> findSimpleProperty(java.lang.String name)
          Returns the named property on this class.
 java.lang.Class<?> getActualClass()
          FIXME Questionable nullity
 BundleRef getClassBundle()
          Returns the message bundle for translations related to this class.
 java.lang.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.
 java.util.List<DisplayPropertyMetaModel> getComboDisplayProperties()
          If this object is shown in a combobox it needs to show the following properties as the display value.
 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, the entire content of a combobox's OPTION tag can be generated by this content renderer.
 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 this type.
 SortableType getDefaultSortDirection()
          When a getDefaultSortProperty() is defined, this defines the sort order to use initially.
 java.lang.String getDefaultSortProperty()
          Contains the name of the property to use for sorting initially.
 java.lang.String getDomainLabel(java.util.Locale loc, java.lang.Object value)
          For a Domain type (Enum, Boolean) this returns a label for a given domain value, or null if no label is defined.
 java.lang.Object[] getDomainValues()
          If this class is an Enum or represents some enumerated value, this returns the possible value objects.
 java.util.List<SearchPropertyMetaModel> getKeyWordSearchProperties()
          Returns the SORTED list of key word search properties defined on this class.
 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.
 PropertyMetaModel<?> getPrimaryKey()
          Returns the property containing the primary key for this object, if one can be found.
 java.util.List<PropertyMetaModel<?>> getProperties()
           
 java.util.List<SearchPropertyMetaModel> getSearchProperties()
          Returns the SORTED list of search properties defined on this class.
 java.util.List<DisplayPropertyMetaModel> getTableDisplayProperties()
          If this object is shown in a Table it needs to show the following properties there.
 java.lang.String getTableName()
          If this is a persistent class that is directly mapped onto some table, this might return the table name.
 java.lang.String getUserEntityName()
          Return a user-presentable entity name (singular) for this class.
 java.lang.String getUserEntityNamePlural()
          Returns the name of this entity in user terms; the returned name is plural.
 boolean isPersistentClass()
           
 

Method Detail

getActualClass

@Nonnull
java.lang.Class<?> getActualClass()
FIXME Questionable nullity

Returns:

getClassBundle

@Nullable
BundleRef getClassBundle()
Returns the message bundle for translations related to this class. This will never return null.

Returns:

getProperties

@Nonnull
java.util.List<PropertyMetaModel<?>> getProperties()

findSimpleProperty

@Nullable
PropertyMetaModel<?> findSimpleProperty(java.lang.String name)
Returns the named property on this class. This does not allow a property path (dotted names).

Parameters:
name -
Returns:

findProperty

@Nullable
PropertyMetaModel<?> findProperty(java.lang.String name)
Returns a property reference to the specified property by following the dotted path starting at this class. This returns a synthetic PropertyMetaModel which has all of the values for the last part in the path (the actual property reached), but with accessors that reach that property by following all intermediary objects.

Parameters:
name -
Returns:

isPersistentClass

boolean isPersistentClass()

getTableName

@Nullable
java.lang.String getTableName()
If this is a persistent class that is directly mapped onto some table, this might return the table name. This should NOT return a name for data that is strictly derived from a metamodel-based database because there all value records share the same table.

Returns:

getPrimaryKey

@Nullable
PropertyMetaModel<?> getPrimaryKey()
Returns the property containing the primary key for this object, if one can be found.

Returns:

getDomainValues

@Nullable
java.lang.Object[] getDomainValues()
If this class is an Enum or represents some enumerated value, this returns the possible value objects. If this is not a domain type this MUST return null.

Returns:

getDomainLabel

@Nullable
java.lang.String getDomainLabel(java.util.Locale loc,
                                         java.lang.Object value)
For a Domain type (Enum, Boolean) this returns a label for a given domain value, or null if no label is defined. When called for a non-domain type this will throw an exception.

Parameters:
loc -
value -
Returns:

getUserEntityName

@Nonnull
java.lang.String getUserEntityName()
Return a user-presentable entity name (singular) for this class. This defaults to the classname itself if unset.


getUserEntityNamePlural

@Nullable
java.lang.String getUserEntityNamePlural()
Returns the name of this entity in user terms; the returned name is plural.

Returns:

getComboDataSet

@Nullable
java.lang.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. It contains a generator for the values to show. This is a default for all relations in which this class is the parent; it can be overridden in individual relations.

Returns:

getComboLabelRenderer

@Nullable
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.

Returns:

getComboNodeRenderer

@Nullable
java.lang.Class<? extends INodeContentRenderer<?>> getComboNodeRenderer()
When set, the entire content of a combobox's OPTION tag can be generated by this content renderer. When set, the getComboDisplayProperties(), getComboLabelRenderer() properties are ignored.

Returns:

getComboDisplayProperties

@Nonnull
java.util.List<DisplayPropertyMetaModel> getComboDisplayProperties()
If this object is shown in a combobox it needs to show the following properties as the display value.

Returns:

getTableDisplayProperties

@Nonnull
java.util.List<DisplayPropertyMetaModel> getTableDisplayProperties()
If this object is shown in a Table it needs to show the following properties there. This value gets set from @MetaObject. These columns are also used when the table is shown as the result of a LookupInput search.

Returns:

getSearchProperties

@Nonnull
java.util.List<SearchPropertyMetaModel> getSearchProperties()
Returns the SORTED list of search properties defined on this class. These are used by default for all table based search operations like LookupInput and LookupForm. The value gets set from either the MetaSearch or the MetaSearch annotations.

Returns:

getKeyWordSearchProperties

@Nonnull
java.util.List<SearchPropertyMetaModel> getKeyWordSearchProperties()
Returns the SORTED list of key word search properties defined on this class. These are used by LookupInput to define the "search-as-I-type" functionality. The value gets set from either the MetaSearch or the MetaSearch annotations.

Returns:

getDefaultSortProperty

@Nullable
java.lang.String getDefaultSortProperty()
Contains the name of the property to use for sorting initially. It is used to define the initial sort order when a table is shown for the 1st time. It can be null in which case the table query defines the sort order.

Returns:

getDefaultSortDirection

@Nonnull
SortableType getDefaultSortDirection()
When a getDefaultSortProperty() is defined, this defines the sort order to use initially.

Returns:

getComponentTypeHint

@Nullable
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 this type. This is only used when this class is the parent in an UP relation, and the child needs to add a control to help it select one parent.

Returns:

getLookupSelectedRenderer

@Nullable
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. If null this will use getLookupSelectedProperties().

Returns:

getLookupSelectedProperties

@Nonnull
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.

Returns:

createCriteria

@Nonnull
QCriteria<?> createCriteria()
                            throws java.lang.Exception
EXPERIMENTAL If this is a persistent class, this should create a base QCriteria instance to do queries on this class. The QCriteria<T> instance returned must have a T that is equal to the value returned by this.getActualClass(). In addition it should have only restrictions that limit the result to valid instances of this class, nothing else! This usually means the restriction set is empty.

Needs evaluation.

Returns:
Throws:
java.lang.Exception