|
common-util | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlocal.tomas.hibernate.CommonHibernatePersistence
public abstract class CommonHibernatePersistence
Abstract base class for persistence handlers.
| Field Summary | |
|---|---|
protected Map<String,String> |
configOverrides
Configuration overrides mapping attributes to values. |
protected javax.persistence.EntityManagerFactory |
emf
Entity manager factory |
| Constructor Summary | |
|---|---|
protected |
CommonHibernatePersistence(org.apache.commons.configuration.Configuration conf,
String emfName)
Create instance. |
| Method Summary | |
|---|---|
String |
getCurrentVersion(String name)
Get current version. |
protected org.hibernate.cfg.Configuration |
getHibernateConfiguration()
Get Hibernate configuration. |
void |
postInitVersion(String name,
String toVersion)
Called after initializing version. |
void |
postUpdateVersion(String name,
String fromVersion,
String toVersion)
Called after updating to version. |
void |
preInitVersion(String name,
String toVersion)
Called before initializing version. |
void |
preUpdateVersion(String name,
String fromVersion,
String toVersion)
Called before updating to version. |
void |
setVersion(String name,
String newVersion)
Set Version of entiry. |
protected void |
supplyHibernateConfiguration(org.hibernate.cfg.Configuration cfg)
Supply hibernate configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,String> configOverrides
protected javax.persistence.EntityManagerFactory emf
| Constructor Detail |
|---|
protected CommonHibernatePersistence(org.apache.commons.configuration.Configuration conf,
String emfName)
throws HibernatePersistenceException
conf - configuration of this instanceemfName - entity manager factory name
HibernatePersistenceException| Method Detail |
|---|
public String getCurrentVersion(String name)
throws local.tomas.util.versioning.VersionException
getCurrentVersion in interface local.tomas.util.versioning.VersionInterfacename - entity name
local.tomas.util.versioning.VersionException
public void setVersion(String name,
String newVersion)
throws local.tomas.util.versioning.VersionException
setVersion in interface local.tomas.util.versioning.VersionInterfacename - entity namenewVersion - new version of entity
local.tomas.util.versioning.VersionException
public void preInitVersion(String name,
String toVersion)
throws local.tomas.util.versioning.VersionException
preInitVersion in interface local.tomas.util.versioning.VersionInterfacename - entity nametoVersion - version to be initialized
local.tomas.util.versioning.VersionException
public void postInitVersion(String name,
String toVersion)
throws local.tomas.util.versioning.VersionException
postInitVersion in interface local.tomas.util.versioning.VersionInterfacename - entity nametoVersion - version initialized
local.tomas.util.versioning.VersionException
public void preUpdateVersion(String name,
String fromVersion,
String toVersion)
throws local.tomas.util.versioning.VersionException
preUpdateVersion in interface local.tomas.util.versioning.VersionInterfacename - entity namefromVersion - original versiontoVersion - target version
local.tomas.util.versioning.VersionException
public void postUpdateVersion(String name,
String fromVersion,
String toVersion)
throws local.tomas.util.versioning.VersionException
postUpdateVersion in interface local.tomas.util.versioning.VersionInterfacename - entity namefromVersion - original versiontoVersion - version reached
local.tomas.util.versioning.VersionExceptionprotected org.hibernate.cfg.Configuration getHibernateConfiguration()
protected void supplyHibernateConfiguration(org.hibernate.cfg.Configuration cfg)
cfg - hibernate configuration
|
common-util | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||