Package org.apache.derby.impl.sql
Class LanguageDbPropertySetter
- java.lang.Object
-
- org.apache.derby.impl.sql.LanguageDbPropertySetter
-
- All Implemented Interfaces:
PropertySetCallback
public class LanguageDbPropertySetter extends java.lang.Object implements PropertySetCallback
A class to handle setting language database properties
-
-
Constructor Summary
Constructors Constructor Description LanguageDbPropertySetter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Serviceable
apply(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
Apply a property change.private static Context
getContext(java.lang.String contextID)
Privileged lookup of a Context.void
init(boolean dbOnly, java.util.Dictionary p)
Initialize the properties for this callback.java.io.Serializable
map(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
Map a proposed new value for a property to an official value.boolean
validate(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
Validate a property change.
-
-
-
Method Detail
-
init
public void init(boolean dbOnly, java.util.Dictionary p)
Description copied from interface:PropertySetCallback
Initialize the properties for this callback. Called when addPropertySetNotification() is called with a non-null transaction controller. This allows code to set read its initial property values at boot time.Code within an init() method should use the 3 argument PropertyUtil method getPropertyFromSet() to obtain a property's value.
- Specified by:
init
in interfacePropertySetCallback
- Parameters:
dbOnly
- true if only per-database properties are to be looked atp
- the complete set of per-database properties.
-
validate
public boolean validate(java.lang.String key, java.io.Serializable value, java.util.Dictionary p) throws StandardException
Description copied from interface:PropertySetCallback
Validate a property change.- Specified by:
validate
in interfacePropertySetCallback
- Parameters:
key
- Property key for the property being setvalue
- proposed new value for the property being set or null if the property is being dropped.p
- Property set before the change. SettingProperty may read but must never change p.- Returns:
- true if this object was interested in this property, false otherwise.
- Throws:
StandardException
- Thrown on error.
-
apply
public Serviceable apply(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
Description copied from interface:PropertySetCallback
Apply a property change. Will only be called after validate has been called and only if validate returned true. If this method is called then the new value is the value to be used, ie. the property is not set in the overriding JVM system set.- Specified by:
apply
in interfacePropertySetCallback
- Parameters:
key
- Property key for the property being setvalue
- proposed new value for the property being set or null if the property is being dropped.p
- Property set before the change. SettingProperty may read but must never change p.- Returns:
- post commit work for the property change.
-
map
public java.io.Serializable map(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
Description copied from interface:PropertySetCallback
Map a proposed new value for a property to an official value. Will only be called after apply() has been called.- Specified by:
map
in interfacePropertySetCallback
- Parameters:
key
- Property key for the property being setvalue
- proposed new value for the property being set or null if the property is being dropped.p
- Property set before the change. SettingProperty may read but must never change p.- Returns:
- new value for the change
-
getContext
private static Context getContext(java.lang.String contextID)
Privileged lookup of a Context. Must be private so that user code can't call this entry point.
-
-