Package org.javalite.activejdbc
Enum Registry
- java.lang.Object
-
- java.lang.Enum<Registry>
-
- org.javalite.activejdbc.Registry
-
- All Implemented Interfaces:
Serializable,Comparable<Registry>
public enum Registry extends Enum<Registry>
- Author:
- Igor Polevoy, Eric Nielsen
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CacheManagercacheManager()ConfigurationgetConfiguration()protected List<String>getEdges(String join)Returns edges for a join.MetaModelgetMetaModel(Class<? extends Model> modelClass)MetaModelgetMetaModel(String table)Provides a MetaModel of a model representing a table.protected Class<? extends Model>getModelClass(String table, boolean suppressException)Returns model class for a table name, null if not found.StringgetModelFile()StatisticsQueuegetStatisticsQueue()protected StringgetTableName(Class<? extends Model> modelClass)static Registryinstance()protected StringmetadataToJSON()voidsetModelFile(String modelFile)Used to override the default model file, activejdbc_models.properties.static RegistryvalueOf(String name)Returns the enum constant of this type with the specified name.static Registry[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final Registry INSTANCE
-
-
Method Detail
-
values
public static Registry[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Registry c : Registry.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Registry valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
instance
public static Registry instance()
-
getStatisticsQueue
public StatisticsQueue getStatisticsQueue()
-
getConfiguration
public Configuration getConfiguration()
-
cacheManager
public static CacheManager cacheManager()
-
getMetaModel
public MetaModel getMetaModel(String table)
Provides a MetaModel of a model representing a table.- Parameters:
table- name of table represented by this MetaModel.- Returns:
- MetaModel of a model representing a table.
-
metadataToJSON
protected String metadataToJSON()
-
getModelClass
protected Class<? extends Model> getModelClass(String table, boolean suppressException)
Returns model class for a table name, null if not found.- Parameters:
table- table namesuppressException- true to suppress exception- Returns:
- model class for a table name, null if not found.s
-
getEdges
protected List<String> getEdges(String join)
Returns edges for a join. An edge is a table in a many to many relationship that is not a join. We have to go through all the associations here because join tables, (even if the model exists) will not have associations to the edges.- Parameters:
join- name of join table;- Returns:
- edges for a join
-
getModelFile
public String getModelFile()
-
setModelFile
public void setModelFile(String modelFile)
Used to override the default model file, activejdbc_models.properties. Please note: After initial registration of the model classes in ActiveJDBC this method will not function. That means in order to utilize this method, you must call it before doing any work with models. Usage of this method is only advised if you know what you're doing, and understand the risks of improperly using the method.- Parameters:
modelFile- The name of the file to use as your models properties file.
-
-