Class OrderMetaData
java.lang.Object
org.datanucleus.metadata.MetaData
org.datanucleus.metadata.OrderMetaData
- All Implemented Interfaces:
Serializable, ColumnMetaDataContainer
Representation of Order MetaData - the ordering of the elements of a List.
This caters for 2 types of List.
- indexed list where we add a (surrogate) index column
- ordered list like in JPA where we use some ordering clause when retrieving (also as extension in JDO)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDefinition of ordering using a field. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe name of the column (if specified as input)protected List<ColumnMetaData> the columnsprotected OrderMetaData.FieldOrder[]Ordering of fields (when using "ordered List"), splitting the "ordering" apart by comma-separated parts.protected IndexedValueThe indexing value specified as input.protected IndexMetaDataIndexMetaData.protected StringName of the field in the element that is the ordering field.protected StringOrdering when using an "ordered list" where the elements are retrieved in a particular order.private static final longFields inherited from class MetaData
EXTENSION_CLASS_CREATETIMESTAMP, EXTENSION_CLASS_CREATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_CREATEUSER, EXTENSION_CLASS_CREATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_CREATEUSER_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_COLUMN_LENGTH, EXTENSION_CLASS_MULTITENANCY_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_JDBC_TYPE, EXTENSION_CLASS_MULTITENANT, EXTENSION_CLASS_READ_ONLY, EXTENSION_CLASS_SOFTDELETE, EXTENSION_CLASS_SOFTDELETE_COLUMN_NAME, EXTENSION_CLASS_UPDATETIMESTAMP, EXTENSION_CLASS_UPDATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_UPDATEUSER, EXTENSION_CLASS_UPDATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_UPDATEUSER_COLUMN_NAME, EXTENSION_CLASS_VERSION_FIELD_NAME, EXTENSION_CLASS_VIEW_DEFINITION, EXTENSION_CLASS_VIEW_IMPORTS, EXTENSION_INDEX_COLUMN_ORDERING, EXTENSION_MEMBER_CACHEABLE, EXTENSION_MEMBER_CALENDAR_ONE_COLUMN, EXTENSION_MEMBER_CASCADE_ATTACH, EXTENSION_MEMBER_CASCADE_DETACH, EXTENSION_MEMBER_CASCADE_PERSIST, EXTENSION_MEMBER_CASCADE_REFRESH, EXTENSION_MEMBER_COMPARATOR_NAME, EXTENSION_MEMBER_CONTAINER_ALLOW_NULLS, EXTENSION_MEMBER_CREATE_TIMESTAMP, EXTENSION_MEMBER_CREATE_USER, EXTENSION_MEMBER_ENUM_VALUE_GETTER, EXTENSION_MEMBER_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_INSERTABLE, EXTENSION_MEMBER_KEY_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_LIST_ORDERING, EXTENSION_MEMBER_RELATION_DISCRIM_COLUMN, EXTENSION_MEMBER_RELATION_DISCRIM_PK, EXTENSION_MEMBER_RELATION_DISCRIM_VALUE, EXTENSION_MEMBER_STRATEGY_WHEN_NOTNULL, EXTENSION_MEMBER_TYPE_CONVERTER_DISABLED, EXTENSION_MEMBER_TYPE_CONVERTER_NAME, EXTENSION_MEMBER_UPDATE_TIMESTAMP, EXTENSION_MEMBER_UPDATE_USER, EXTENSION_MEMBER_UPDATEABLE, EXTENSION_MEMBER_VALUE_IMPLEMENTATION_CLASSES, EXTENSION_VERSION_NUMBER_INITIAL_VALUE, extensions, metaDataState, parent, VENDOR_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(ColumnMetaData colmd) Add a new ColumnMetaData elementfinal ColumnMetaData[]Accessor for columnMetaDatafinal Stringfinal IndexMetaDatavoidMethod to initialise the object, creating internal convenience arrays.booleanConvenience method to return if the List is an "indexed List" like in JDO2.Method to create a new column metadata, set it, and return it.Method to create a new index metadata, set it, and return it.setColumnName(String column) final OrderMetaDatasetIndexed(IndexedValue val) final OrderMetaDatasetIndexMetaData(IndexMetaData indexMetaData) setMappedBy(String mappedby) setOrdering(String ordering) Methods inherited from class MetaData
addExtension, addExtensions, getExtensions, getMetaDataManager, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, isInitialised, isPopulated, isUsed, removeExtension, setExtensions, setInitialised, setParent, setPopulated, setUsed
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
columnName
The name of the column (if specified as input) -
columns
the columns -
indexMetaData
IndexMetaData. -
indexed
The indexing value specified as input. -
mappedBy
Name of the field in the element that is the ordering field. -
ordering
Ordering when using an "ordered list" where the elements are retrieved in a particular order. -
fieldOrders
Ordering of fields (when using "ordered List"), splitting the "ordering" apart by comma-separated parts.
-
-
Constructor Details
-
OrderMetaData
-
OrderMetaData
public OrderMetaData()
-
-
Method Details
-
initialise
Method to initialise the object, creating internal convenience arrays. Initialises all sub-objects.- Overrides:
initialisein classMetaData- Parameters:
clr- Not used
-
setIndexed
-
getIndexed
-
setIndexMetaData
-
newIndexMetaData
Method to create a new index metadata, set it, and return it.- Returns:
- The index metadata
-
getMappedBy
-
setMappedBy
-
addColumn
Description copied from interface:ColumnMetaDataContainerAdd a new ColumnMetaData element- Specified by:
addColumnin interfaceColumnMetaDataContainer- Parameters:
colmd- The Column MetaData
-
newColumnMetaData
Method to create a new column metadata, set it, and return it.- Returns:
- The column metadata
-
getColumnMetaData
Description copied from interface:ColumnMetaDataContainerAccessor for columnMetaData- Specified by:
getColumnMetaDatain interfaceColumnMetaDataContainer- Returns:
- Returns the columnMetaData.
-
getColumnName
-
setColumnName
-
getIndexMetaData
-
isIndexedList
public boolean isIndexedList()Convenience method to return if the List is an "indexed List" like in JDO2.- Returns:
- Whether the List is indexed (if false means that it is "ordered" (like in JPA1)
-
getOrdering
-
setOrdering
-
getFieldOrders
-