- java.lang.Object
-
- org.datanucleus.metadata.MetaData
-
- org.datanucleus.metadata.OrderMetaData
-
- All Implemented Interfaces:
Serializable
,ColumnMetaDataContainer
public class OrderMetaData extends MetaData implements 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OrderMetaData.FieldOrder
Definition of ordering using a field.
-
Field Summary
Fields Modifier and Type Field Description protected String
columnName
The name of the column (if specified as input)protected List<ColumnMetaData>
columns
the columnsprotected OrderMetaData.FieldOrder[]
fieldOrders
Ordering of fields (when using "ordered List"), splitting the "ordering" apart by comma-separated parts.protected IndexedValue
indexed
The indexing value specified as input.protected IndexMetaData
indexMetaData
IndexMetaData.protected String
mappedBy
Name of the field in the element that is the ordering field.protected String
ordering
Ordering when using an "ordered list" where the elements are retrieved in a particular order.-
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_FETCH_FK_ONLY, 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 Constructor Description OrderMetaData()
OrderMetaData(OrderMetaData omd)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumn(ColumnMetaData colmd)
Add a new ColumnMetaData elementColumnMetaData[]
getColumnMetaData()
Accessor for columnMetaDataString
getColumnName()
OrderMetaData.FieldOrder[]
getFieldOrders()
IndexedValue
getIndexed()
IndexMetaData
getIndexMetaData()
String
getMappedBy()
String
getOrdering()
void
initialise(ClassLoaderResolver clr)
Method to initialise the object, creating internal convenience arrays.boolean
isIndexedList()
Convenience method to return if the List is an "indexed List" like in JDO2.ColumnMetaData
newColumnMetaData()
Method to create a new column metadata, set it, and return it.IndexMetaData
newIndexMetaData()
Method to create a new index metadata, set it, and return it.OrderMetaData
setColumnName(String column)
OrderMetaData
setIndexed(IndexedValue val)
OrderMetaData
setIndexMetaData(IndexMetaData indexMetaData)
OrderMetaData
setMappedBy(String mappedby)
OrderMetaData
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, setParent
-
-
-
-
Field Detail
-
columnName
protected String columnName
The name of the column (if specified as input)
-
columns
protected List<ColumnMetaData> columns
the columns
-
indexMetaData
protected IndexMetaData indexMetaData
IndexMetaData.
-
indexed
protected IndexedValue indexed
The indexing value specified as input.
-
mappedBy
protected String mappedBy
Name of the field in the element that is the ordering field.
-
ordering
protected String ordering
Ordering when using an "ordered list" where the elements are retrieved in a particular order.
-
fieldOrders
protected OrderMetaData.FieldOrder[] fieldOrders
Ordering of fields (when using "ordered List"), splitting the "ordering" apart by comma-separated parts.
-
-
Constructor Detail
-
OrderMetaData
public OrderMetaData(OrderMetaData omd)
Copy constructor.- Parameters:
omd
- The metadata to copy
-
OrderMetaData
public OrderMetaData()
-
-
Method Detail
-
initialise
public void initialise(ClassLoaderResolver clr)
Method to initialise the object, creating internal convenience arrays. Initialises all sub-objects.- Overrides:
initialise
in classMetaData
- Parameters:
clr
- Not used
-
setIndexed
public final OrderMetaData setIndexed(IndexedValue val)
-
getIndexed
public IndexedValue getIndexed()
-
setIndexMetaData
public final OrderMetaData setIndexMetaData(IndexMetaData indexMetaData)
-
newIndexMetaData
public IndexMetaData newIndexMetaData()
Method to create a new index metadata, set it, and return it.- Returns:
- The index metadata
-
getMappedBy
public String getMappedBy()
-
setMappedBy
public OrderMetaData setMappedBy(String mappedby)
-
addColumn
public void addColumn(ColumnMetaData colmd)
Description copied from interface:ColumnMetaDataContainer
Add a new ColumnMetaData element- Specified by:
addColumn
in interfaceColumnMetaDataContainer
- Parameters:
colmd
- The Column MetaData
-
newColumnMetaData
public ColumnMetaData newColumnMetaData()
Method to create a new column metadata, set it, and return it.- Returns:
- The column metadata
-
getColumnMetaData
public final ColumnMetaData[] getColumnMetaData()
Description copied from interface:ColumnMetaDataContainer
Accessor for columnMetaData- Specified by:
getColumnMetaData
in interfaceColumnMetaDataContainer
- Returns:
- Returns the columnMetaData.
-
getColumnName
public final String getColumnName()
-
setColumnName
public OrderMetaData setColumnName(String column)
-
getIndexMetaData
public final IndexMetaData 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
public String getOrdering()
-
setOrdering
public OrderMetaData setOrdering(String ordering)
-
getFieldOrders
public OrderMetaData.FieldOrder[] getFieldOrders()
-
-