|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.PersistenceConfiguration
public class PersistenceConfiguration
Class providing configuration for persistence. Properties are defined in plugin.xml (aliases, default value, validators etc). Property values are stored in two maps.
| Field Summary | |
|---|---|
protected static Localiser |
LOCALISER
Localisation of messages. |
| Constructor Summary | |
|---|---|
PersistenceConfiguration()
Constructor. |
|
| Method Summary | |
|---|---|
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. |
boolean |
getBooleanProperty(java.lang.String name,
boolean resultIfNotSet)
Accessor for the specified property as a boolean. |
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<java.lang.String,java.lang.Object> |
getPersistenceProperties()
Accessor for the persistence properties. |
java.util.Map<java.lang.String,java.lang.Object> |
getPersistencePropertiesDefaults()
Accessor for the persistence properties default values. |
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<java.lang.String> |
getSupportedProperties()
Accessor for the names of the supported persistence properties. |
boolean |
hasProperty(java.lang.String name)
Accessor for whether a particular property is defined. |
void |
setDefaultProperties(java.util.Map props)
Method to set the persistence property defaults based on what is defined for plugins. |
void |
setDefaultProperties(PluginManager pluginMgr)
Method to set the persistence property defaults based on what is defined for plugins. |
void |
setPersistenceProperties(java.util.Map props)
Set the properties for this configuration. |
void |
setPropertiesUsingFile(java.lang.String filename)
Method to set the persistence properties using those defined in a file. |
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
| Constructor Detail |
|---|
public PersistenceConfiguration()
| Method Detail |
|---|
public java.util.Set<java.lang.String> getSupportedProperties()
public void setDefaultProperties(java.util.Map props)
props - Properties to use in the default setpublic void setDefaultProperties(PluginManager pluginMgr)
pluginMgr - The plugin managerpublic java.lang.Object getProperty(java.lang.String name)
name - Name of the property
public 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 type
public boolean getBooleanProperty(java.lang.String name,
boolean resultIfNotSet)
name - Name of the propertyresultIfNotSet - The value to return if no value for the specified property is found.
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 void setPropertiesUsingFile(java.lang.String filename)
filename - Name of the file containing the propertiespublic java.util.Map<java.lang.String,java.lang.Object> getPersistencePropertiesDefaults()
public java.util.Map<java.lang.String,java.lang.Object> getPersistenceProperties()
getPersistenceProperties()public void setPersistenceProperties(java.util.Map props)
props - The persistence propertiesgetPersistencePropertiesDefaults()
public void setProperty(java.lang.String name,
java.lang.Object value)
name - Name of the propertyvalue - Valuepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - Object to compare against.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||