Top Description Constructors Methods
org.apache.derby.impl.sql

public Class LanguageDbPropertySetter

extends Object
implements PropertySetCallback
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.services.property.PropertySetCallback
Imports
org.apache.derby.iapi.services.property.PropertySetCallback, .PropertyUtil, org.apache.derby.shared.common.reference.Property, .SQLState, org.apache.derby.iapi.services.daemon.Serviceable, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.services.context.Context, .ContextService, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.iapi.sql.dictionary.DataDictionary, org.apache.derby.iapi.store.access.TransactionController, java.io.Serializable, java.util.Dictionary

A class to handle setting language database properties

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Serviceable
apply(String
Property key for the property being set
key
,
Serializable
proposed new value for the property being set or null if the property is being dropped.
value
,
Dictionary<K, V>
Property set before the change. SettingProperty may read but must never change p.
p
)

Implements org.apache.derby.iapi.services.property.PropertySetCallback.apply.

Apply a property change.

private static Context
getContext(final String contextID)

Must be private so that user code can't call this entry point.

public void
init(boolean
true if only per-database properties are to be looked at
dbOnly
,
Dictionary<K, V>
the complete set of per-database properties.
p
)

Implements org.apache.derby.iapi.services.property.PropertySetCallback.init.

Initialize the properties for this callback.

public Serializable
map(String
Property key for the property being set
key
,
Serializable
proposed new value for the property being set or null if the property is being dropped.
value
,
Dictionary<K, V>
Property set before the change. SettingProperty may read but must never change p.
p
)

Implements org.apache.derby.iapi.services.property.PropertySetCallback.map.

Map a proposed new value for a property to an official value.

public boolean
validate(String
Property key for the property being set
key
,
Serializable
proposed new value for the property being set or null if the property is being dropped.
value
,
Dictionary<K, V>
Property set before the change. SettingProperty may read but must never change p.
p
)

Implements org.apache.derby.iapi.services.property.PropertySetCallback.validate.

Validate a property change.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LanguageDbPropertySetterback to summary
public LanguageDbPropertySetter()

Method Detail

applyback to summary
public Serviceable apply(String key, Serializable value, Dictionary<K, V> p)

Implements org.apache.derby.iapi.services.property.PropertySetCallback.apply.

Doc from org.apache.derby.iapi.services.property.PropertySetCallback.apply.

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.

Parameters
key:String

Property key for the property being set

value:Serializable

proposed new value for the property being set or null if the property is being dropped.

p:Dictionary<K, V>

Property set before the change. SettingProperty may read but must never change p.

Returns:Serviceable

post commit work for the property change.

getContextback to summary
private static Context getContext(final String contextID)

Must be private so that user code can't call this entry point.

initback to summary
public void init(boolean dbOnly, Dictionary<K, V> p)

Implements org.apache.derby.iapi.services.property.PropertySetCallback.init.

Doc from org.apache.derby.iapi.services.property.PropertySetCallback.init.

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.

Parameters
dbOnly:boolean

true if only per-database properties are to be looked at

p:Dictionary<K, V>

the complete set of per-database properties.

mapback to summary
public Serializable map(String key, Serializable value, Dictionary<K, V> p)

Implements org.apache.derby.iapi.services.property.PropertySetCallback.map.

Doc from org.apache.derby.iapi.services.property.PropertySetCallback.map.

Map a proposed new value for a property to an official value. Will only be called after apply() has been called.

Parameters
key:String

Property key for the property being set

value:Serializable

proposed new value for the property being set or null if the property is being dropped.

p:Dictionary<K, V>

Property set before the change. SettingProperty may read but must never change p.

Returns:Serializable

new value for the change

validateback to summary
public boolean validate(String key, Serializable value, Dictionary<K, V> p) throws StandardException

Implements org.apache.derby.iapi.services.property.PropertySetCallback.validate.

Doc from org.apache.derby.iapi.services.property.PropertySetCallback.validate.

Validate a property change.

Parameters
key:String

Property key for the property being set

value:Serializable

proposed new value for the property being set or null if the property is being dropped.

p:Dictionary<K, V>

Property set before the change. SettingProperty may read but must never change p.

Returns:boolean

true if this object was interested in this property, false otherwise.

Exceptions
StandardException:
Thrown on error.