Package org.datanucleus.metadata
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 class
Definition of ordering using a field. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
The 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 IndexedValue
The indexing value specified as input.protected IndexMetaData
IndexMetaData.protected String
Name of the field in the element that is the ordering field.protected String
Ordering when using an "ordered list" where the elements are retrieved in a particular order.private static final long
Fields inherited from class org.datanucleus.metadata.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 TypeMethodDescriptionvoid
addColumn
(ColumnMetaData colmd) Add a new ColumnMetaData elementfinal ColumnMetaData[]
Accessor for columnMetaDatafinal String
final IndexMetaData
void
Method to initialise the object, creating internal convenience arrays.boolean
Convenience 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 OrderMetaData
setIndexed
(IndexedValue val) final OrderMetaData
setIndexMetaData
(IndexMetaData indexMetaData) setMappedBy
(String mappedby) setOrdering
(String ordering) Methods inherited from class org.datanucleus.metadata.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
Copy constructor.- Parameters:
omd
- The metadata to copy
-
OrderMetaData
public OrderMetaData()
-
-
Method Details
-
initialise
Method to initialise the object, creating internal convenience arrays. Initialises all sub-objects.- Overrides:
initialise
in 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:ColumnMetaDataContainer
Add a new ColumnMetaData element- Specified by:
addColumn
in 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:ColumnMetaDataContainer
Accessor for columnMetaData- Specified by:
getColumnMetaData
in 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
-