public final class TableRegistry extends HashMap<String,TableMetaData>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
TableRegistry.CollectionTypeMap
Class which maps collection types to their table meta data.
|
(package private) static class |
TableRegistry.ObjectTypeMap
Class that maps object types to their table meta data.
|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
private TableRegistry.CollectionTypeMap |
collectionTypeMap
Map between collection types and meta data.
|
private static TableRegistry |
instance
The global, static instance of the registry.
|
private TableRegistry.ObjectTypeMap |
objectTypeMap
Map between object types and meta data.
|
Modifier | Constructor and Description |
---|---|
private |
TableRegistry()
Prevent direct class instantiation by users.
|
Modifier and Type | Method and Description |
---|---|
private static TableRegistry |
create()
Create a new table meta data registry.
|
List<TableMetaData> |
findByCollectionType(Class<?> collectionType)
Find meta data by collection type.
|
List<TableMetaData> |
findByObjectType(Class<? extends ConditionsObject> objectType)
Find meta data by object type.
|
TableMetaData |
findByTableName(String name)
Find meta data by table name.
|
static Set<Class<? extends ConditionsObject>> |
findConditionsObjectTypes()
Find all available classes that extend ConditionsObject.
|
static Class<? extends BaseConditionsObjectCollection<? extends ConditionsObject>> |
getCollectionType(Class<? extends ConditionsObject> type)
Get the class for the collection of the ConditionsObject type.
|
private static Set<String> |
getFieldNames(Class<? extends ConditionsObject> type)
Get the list of database field names for the class.
|
private static String[] |
getTableNames(Class<? extends ConditionsObject> type)
Get the list of table names for the class.
|
static TableRegistry |
getTableRegistry()
Get the global static instance of the registry.
|
String |
toString()
Convert this object to a string.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode
private static TableRegistry instance
private final TableRegistry.CollectionTypeMap collectionTypeMap
private final TableRegistry.ObjectTypeMap objectTypeMap
private TableRegistry()
Use the create()
method instead.
private static TableRegistry create()
public static Set<Class<? extends ConditionsObject>> findConditionsObjectTypes()
public static Class<? extends BaseConditionsObjectCollection<? extends ConditionsObject>> getCollectionType(Class<? extends ConditionsObject> type)
type
- the class of the ConditionsObjectprivate static Set<String> getFieldNames(Class<? extends ConditionsObject> type)
type
- the classprivate static String[] getTableNames(Class<? extends ConditionsObject> type)
type
- the classpublic static TableRegistry getTableRegistry()
public List<TableMetaData> findByCollectionType(Class<?> collectionType)
collectionType
- the collection typenull
if none exists.public List<TableMetaData> findByObjectType(Class<? extends ConditionsObject> objectType)
objectType
- the object typenull
if none exists.public TableMetaData findByTableName(String name)
name
- the table namenull
if none existspublic String toString()
toString
in class AbstractMap<String,TableMetaData>
Copyright © 2019. All rights reserved.