|
||||||||
| 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 String |
ATTR_CONNECTION_PROPERTIES
Attribute name for connection settings for Apache OpenJPA & DBCP. |
static String |
ATTR_GENERATE_SCHEMA
Attribute name for connection settings. |
static String |
ATTR_GENERATE_SCHEMA_VALUE
Attribute name for connection settings. |
static String |
ATTR_NAME
Attribute name for attribute "name" of property. |
static String |
ATTR_VALUE
Attribute name for attribute "value" of property. |
static String |
TAG_PERSISTENCE_UNIT
Tag constant. |
static String |
TAG_PROPERTIES
Tag constant. |
static String |
TAG_PROPERTY
Tag constant. |
| Constructor Summary | |
|---|---|
CmsPersistenceUnitConfiguration(String unitName,
String fileName)
Public constructor which initialize the object. |
|
| Method Summary | |
|---|---|
String |
getPropertyValue(String name,
String defaultValue)
Returns a property value for the given property name. |
void |
removeProperty(String name)
Removes property with given name. |
void |
save()
Saves the original configuration file. |
void |
setPropertyValue(String name,
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 String ATTR_CONNECTION_PROPERTIES
public static final String ATTR_GENERATE_SCHEMA
public static final String ATTR_GENERATE_SCHEMA_VALUE
public static final String ATTR_NAME
public static final String ATTR_VALUE
public static final String TAG_PERSISTENCE_UNIT
public static final String TAG_PROPERTIES
public static final String TAG_PROPERTY
| Constructor Detail |
|---|
public CmsPersistenceUnitConfiguration(String unitName,
String fileName)
unitName - persistence unit name to be managedfileName - configuration file name| Method Detail |
|---|
public String getPropertyValue(String name,
String defaultValue)
name - the name of the propertydefaultValue - the default value if there was no property configured with the given name
public void removeProperty(String name)
name - value of the name attributepublic void save()
public void setPropertyValue(String name,
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 | |||||||