|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.configuration.CmsPersistenceUnitConfiguration
public class CmsPersistenceUnitConfiguration
Persistence configuration class.
This class allow to be managed (reading and writing) JPA persistence.xml configuration file.
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_CONNECTION_PROPERTIES
Attribute name for connection settings for Apache OpenJPA & DBCP. |
static java.lang.String |
ATTR_GENERATE_SCHEMA
Attribute name for connection settings. |
static java.lang.String |
ATTR_GENERATE_SCHEMA_VALUE
Attribute name for connection settings. |
static java.lang.String |
ATTR_NAME
Attribute name for attribute "name" of property. |
static java.lang.String |
ATTR_VALUE
Attribute name for attribute "value" of property. |
static java.lang.String |
TAG_PERSISTENCE_UNIT
Tag constant. |
static java.lang.String |
TAG_PROPERTIES
Tag constant. |
static java.lang.String |
TAG_PROPERTY
Tag constant. |
| Constructor Summary | |
|---|---|
CmsPersistenceUnitConfiguration(java.lang.String unitName,
java.lang.String fileName)
Public constructor which initialize the object. |
|
| Method Summary | |
|---|---|
java.lang.String |
getPropertyValue(java.lang.String name,
java.lang.String defaultValue)
Returns a property value for the given property name. |
void |
removeProperty(java.lang.String name)
Removes property with given name. |
void |
save()
Saves the original configuration file. |
void |
setPropertyValue(java.lang.String name,
java.lang.String value)
Sets property value with given name and value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ATTR_CONNECTION_PROPERTIES
public static final java.lang.String ATTR_GENERATE_SCHEMA
public static final java.lang.String ATTR_GENERATE_SCHEMA_VALUE
public static final java.lang.String ATTR_NAME
public static final java.lang.String ATTR_VALUE
public static final java.lang.String TAG_PERSISTENCE_UNIT
public static final java.lang.String TAG_PROPERTIES
public static final java.lang.String TAG_PROPERTY
| Constructor Detail |
|---|
public CmsPersistenceUnitConfiguration(java.lang.String unitName,
java.lang.String fileName)
unitName - persistence unit name to be managedfileName - configuration file name| Method Detail |
|---|
public java.lang.String getPropertyValue(java.lang.String name,
java.lang.String defaultValue)
name - the name of the propertydefaultValue - the default value if there was no property configured with the given name
public void removeProperty(java.lang.String name)
name - value of the name attributepublic void save()
public void setPropertyValue(java.lang.String name,
java.lang.String value)
name - value of the name attributevalue - value of the value attribute
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||