public class OEntityManager extends Object
Modifier | Constructor and Description |
---|---|
protected |
OEntityManager() |
Modifier and Type | Method and Description |
---|---|
protected Object |
createInstance(Class<?> iClass) |
Object |
createPojo(String iClassName)
Create a POJO by its class name.
|
void |
deregisterEntityClass(Class<?> iClass) |
void |
deregisterEntityClasses(String iPackageName) |
void |
deregisterEntityClasses(String iPackageName,
ClassLoader iClassLoader)
Scans all classes accessible from the context class loader which belong to the given package
and subpackages.
|
Class<?> |
getEntityClass(String iClassName)
Returns the Java class by its name
|
static OEntityManager |
getEntityManagerByDatabaseURL(String iURL) |
Collection<Class<?>> |
getRegisteredEntities() |
void |
registerEntityClass(Class<?> iClass) |
void |
registerEntityClass(Class<?> iClass,
boolean forceSchemaReload) |
void |
registerEntityClasses(Class<?> aClass,
boolean recursive)
Scans all classes accessible from the context class loader which belong to the given class and
all it's attributes - classes.
|
void |
registerEntityClasses(Collection<String> iClassNames)
Registers provided classes
|
void |
registerEntityClasses(Collection<String> iClassNames,
ClassLoader iClassLoader)
Registers provided classes
|
protected void |
registerEntityClasses(List<Class<?>> classes) |
void |
registerEntityClasses(String iPackageName)
Scans all classes accessible from the context class loader which belong to the given package
and subpackages.
|
void |
registerEntityClasses(String iPackageName,
ClassLoader iClassLoader)
Scans all classes accessible from the context class loader which belong to the given package
and subpackages.
|
void |
setClassHandler(OEntityManagerClassHandler iClassHandler)
Sets the received handler as default and merges the classes all together.
|
public static OEntityManager getEntityManagerByDatabaseURL(String iURL)
public Object createPojo(String iClassName) throws OConfigurationException
OConfigurationException
registerEntityClasses(String)
public Class<?> getEntityClass(String iClassName)
iClassName
- Simple class name without the packagepublic void deregisterEntityClass(Class<?> iClass)
public void deregisterEntityClasses(String iPackageName)
public void deregisterEntityClasses(String iPackageName, ClassLoader iClassLoader)
iPackageName
- The base packagepublic void registerEntityClass(Class<?> iClass)
public void registerEntityClass(Class<?> iClass, boolean forceSchemaReload)
public void registerEntityClasses(Collection<String> iClassNames)
iClassNames
- to be registeredpublic void registerEntityClasses(Collection<String> iClassNames, ClassLoader iClassLoader)
iClassNames
- to be registerediClassLoader
- public void registerEntityClasses(String iPackageName)
iPackageName
- The base packagepublic void registerEntityClasses(String iPackageName, ClassLoader iClassLoader)
iPackageName
- The base packageiClassLoader
- public void registerEntityClasses(Class<?> aClass, boolean recursive)
aClass
- The class to start fromrecursive
- Beginning from the class, it will register all classes that are direct or
indirect a attribute classpublic void setClassHandler(OEntityManagerClassHandler iClassHandler)
iClassHandler
- public Collection<Class<?>> getRegisteredEntities()
protected Object createInstance(Class<?> iClass) throws InstantiationException, IllegalAccessException, InvocationTargetException
Copyright © 2009–2020 OrientDB. All rights reserved.