public class DatabaseEntityManager extends Object implements TransactionEntityDataChangeListener
| Modifier and Type | Field and Description |
|---|---|
static boolean |
changeDatabaseIsolation |
protected static String |
DATABASE_ENTITY_MANAGER_CLASS |
protected static String |
ENTITY_PROVIDER_ENTITY |
protected static String |
ENTITY_PROVIDER_ENTITYALIAS_COLUMN |
protected static String |
ENTITY_PROVIDER_ENTITYCLASS_COLUMN |
protected static String |
ENTITY_PROVIDER_ENTITYNAME_COLUMN |
protected static String |
ENTITY_PROVIDER_ENTITYPROPERTIES_COLUMN |
protected String |
entityProviderEntity |
protected String |
entityProviderEntityAliasColumn |
protected String |
entityProviderEntityClassColumn |
protected String |
entityProviderEntityNameColumn |
protected String |
entityProviderEntityPropertiesColumn |
protected EntityReferenceLocator |
locator |
| Constructor and Description |
|---|
DatabaseEntityManager(Hashtable params,
EntityReferenceLocator locator) |
| Modifier and Type | Method and Description |
|---|---|
void |
dataChanged(DataChangeEvent e) |
void |
dataChanged(DataChangeEvent e,
Connection con) |
Entity |
getDatabaseEntity(String entityName,
DatabaseConnectionManager dbConnectionManager)
Creates a new entity using the information in the database.
|
protected Class |
getDatabaseEntityClass(String entityName,
String entityClassName)
Get the class for the specified entity.
|
protected Hashtable |
getDatabaseEntityInfo(String entityName)
Query the database to get the info for the specified entity name
|
static DatabaseEntityManager |
getDatabaseManagerInstance(Hashtable params,
EntityReferenceLocator locator) |
protected String |
getDefaultEntityClassName() |
protected String |
getEntitiesPackage() |
protected Entity |
getEntityReference(String entityName)
Returns a reference to an Entity with name
entityName. |
protected int |
getPort() |
protected void |
initDatabaseEntityListeners() |
protected Properties |
loadProperties(String properties)
Creates a properties object with the information in the parameter
|
protected static final String DATABASE_ENTITY_MANAGER_CLASS
protected static final String ENTITY_PROVIDER_ENTITY
protected static final String ENTITY_PROVIDER_ENTITYNAME_COLUMN
protected static final String ENTITY_PROVIDER_ENTITYPROPERTIES_COLUMN
protected static final String ENTITY_PROVIDER_ENTITYALIAS_COLUMN
protected static final String ENTITY_PROVIDER_ENTITYCLASS_COLUMN
protected String entityProviderEntity
protected String entityProviderEntityNameColumn
protected String entityProviderEntityPropertiesColumn
protected String entityProviderEntityAliasColumn
protected String entityProviderEntityClassColumn
protected EntityReferenceLocator locator
public static boolean changeDatabaseIsolation
public DatabaseEntityManager(Hashtable params, EntityReferenceLocator locator) throws Exception
Exceptionprotected void initDatabaseEntityListeners()
throws Exception
Exceptionpublic static DatabaseEntityManager getDatabaseManagerInstance(Hashtable params, EntityReferenceLocator locator) throws Exception
Exceptionpublic Entity getDatabaseEntity(String entityName, DatabaseConnectionManager dbConnectionManager) throws Exception
entityName - Name of the entitydbConnectionManager - Database connection manager for the specified entity (in case
of MultiConnectionManager)Exceptionprotected Hashtable getDatabaseEntityInfo(String entityName) throws Exception
entityName - name of the entityExceptionprotected Properties loadProperties(String properties) throws Exception
entityInfo - Information about the entityExceptionprotected Class getDatabaseEntityClass(String entityName, String entityClassName)
entityName - Name of the entity.entityClassName - Name of the class. This parameter can be null and then we use
the name of the entity or the default entity classprotected Entity getEntityReference(String entityName) throws Exception
entityName.
This method checks if locator for this entity is an instance
of ServerReferenceLocator. If true,
getEntityReferenceFromServer(String) is used instead
getEntityReference(String)
entityName - the entityNamecheckDatabase - entityNameException - if an error occursprotected int getPort()
protected String getEntitiesPackage()
protected String getDefaultEntityClassName()
public void dataChanged(DataChangeEvent e, Connection con)
dataChanged in interface TransactionEntityDataChangeListenerpublic void dataChanged(DataChangeEvent e)
dataChanged in interface EntityDataChangeListenerCopyright © 2016 Imatia Innovation S.L.. All rights reserved.