|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.PersistenceConfiguration
public abstract class PersistenceConfiguration
Class providing configuration for persistence. Persistence properties should be defined in the "plugin.xml" of the plugin that originates them. This class will read the available defined plugin properties (and their defaults, validators etc) and loaded up accordingly. Then any user-provided properties are superimposed over the top of these. Components can then access these properties using any of the convenience accessors for boolean, Boolean, long, int, Object, String types.
| Field Summary | |
|---|---|
protected boolean |
configurable
Flag for whether this object is still configurable. |
protected static Localiser |
LOCALISER
Localisation of messages. |
| Constructor Summary | |
|---|---|
PersistenceConfiguration()
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
assertConfigurable()
Asserts that a change to a configuration property is allowed. |
boolean |
equals(java.lang.Object obj)
Equality operator. |
java.lang.Boolean |
getBooleanObjectProperty(java.lang.String name)
Accessor for the specified property as a Boolean. |
boolean |
getBooleanProperty(java.lang.String name)
Accessor for the specified property as a boolean. |
java.util.Calendar |
getCalendarForDateTimezone()
Accessor for the Calendar to be used in handling all timezone issues with the datastore. |
int |
getIntProperty(java.lang.String name)
Accessor for the specified property as an int. |
long |
getLongProperty(java.lang.String name)
Accessor for the specified property as a long. |
java.util.Map |
getOptions()
Accessor for the options for this persistence configuration |
java.lang.ClassLoader |
getPrimaryClassLoader()
Accessor for the primary class loader |
java.lang.Object |
getProperty(java.lang.String name)
Accessor for the specified property as an Object. |
java.lang.String |
getStringProperty(java.lang.String name)
Accessor for the specified property as a String. |
java.util.Set |
getSupportedOptions()
Accessor for the names of the supported persistence properties. |
boolean |
hasProperty(java.lang.String name)
Accessor for whether a particular property is defined. |
boolean |
isJcaMode()
Accessor for the JCA mode. |
void |
setDefaultProperties(PluginManager pluginMgr)
Method to set the persistence property defaults based on what is defined for plugins. |
void |
setJCAMode(java.lang.Boolean jca)
Mutator for the JCA mode. |
void |
setOptions(java.util.Map props)
Set the options for this PersistenceManagerFactory based on the given map of properties. |
void |
setPrimaryClassLoader(java.lang.ClassLoader loader)
Mutator to set the primary class loader. |
void |
setPropertiesFile(java.lang.String value)
Accessor for the suffix for table identifiers |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Convenience method to set a persistence property. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER
protected transient boolean configurable
| Constructor Detail |
|---|
public PersistenceConfiguration()
| Method Detail |
|---|
public java.util.Map getOptions()
public java.util.Set getSupportedOptions()
public void setDefaultProperties(PluginManager pluginMgr)
pluginMgr - The plugin managerpublic boolean hasProperty(java.lang.String name)
name - Property name
public long getLongProperty(java.lang.String name)
name - Name of the property
PropertyTypeInvalidException - thrown when the property is not available as this typepublic int getIntProperty(java.lang.String name)
name - Name of the property
PropertyTypeInvalidException - thrown when the property is not available as this typepublic boolean getBooleanProperty(java.lang.String name)
name - Name of the property
PropertyTypeInvalidException - thrown when the property is not available as this typepublic java.lang.Boolean getBooleanObjectProperty(java.lang.String name)
name - Name of the property
PropertyTypeInvalidException - thrown when the property is not available as this typepublic java.lang.String getStringProperty(java.lang.String name)
name - Name of the property
PropertyTypeInvalidException - thrown when the property is not available as this typepublic java.lang.Object getProperty(java.lang.String name)
name - Name of the property
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - Object to compare against.
public java.util.Calendar getCalendarForDateTimezone()
public void setPrimaryClassLoader(java.lang.ClassLoader loader)
loader - Loaderpublic java.lang.ClassLoader getPrimaryClassLoader()
public void setJCAMode(java.lang.Boolean jca)
jca - true if using JCA connectorpublic boolean isJcaMode()
public void setPropertiesFile(java.lang.String value)
value - the suffix for table identifierspublic void setOptions(java.util.Map props)
props - The Properties to set the options from.
public void setProperty(java.lang.String name,
java.lang.Object value)
name - Name of the propertyvalue - Valueprotected void assertConfigurable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||