Skip navigation links
oracle.jdeveloper.offlinedb.userprops
Class UserPropertyInitializer
java.lang.Object
oracle.javatools.db.property.PropertyInitializer
oracle.jdeveloper.offlinedb.userprops.UserPropertyInitializer
-
public abstract class UserPropertyInitializer
- extends PropertyInitializer
Abstract adapter class for registering a PropertyInitializer
specifically to provide a dynamic defaults for user defined properties. Concrete subclasses of UserPropertyInitializer should be registered using OfflineDBPropertyInitializationManager#registerPropertyInitializer
.
Method Summary |
java.lang.Object |
getPropertyInitialValue(DBObject obj, java.lang.String propertyName)
|
java.lang.String[] |
getPropertyNames(java.lang.Class<? extends DBObject> clz)
|
protected abstract java.lang.String |
getUserPropertyDefault(DBObject obj, java.lang.String userPropertyName)
Concrete subclasses should return the default value of the user property with the given name for the given DBObject or throw a PropertyInitializer.InitializationVeto exception. |
protected abstract java.lang.String[] |
getUserPropertyNames(java.lang.Class<? extends DBObject> clz)
Concrete subclasses should return a String[] of user property names for objects of the given class for which they provide a default value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserPropertyInitializer
protected UserPropertyInitializer(DBObjectProvider pro)
- NB subclasses must provide a constructor that takes a DBObjectProvider
getPropertyNames
public final java.lang.String[] getPropertyNames(java.lang.Class<? extends DBObject> clz)
-
- Specified by:
getPropertyNames
in class PropertyInitializer
-
- Parameters:
clz
- the class of object for which supported properties are being requested.
- Returns:
- the names of properties for DBObjects of the the given class for which this PropertyInitializer will provide an initial value.
getPropertyInitialValue
public final java.lang.Object getPropertyInitialValue(DBObject obj,
java.lang.String propertyName)
throws PropertyInitializer.InitializationVeto
-
- Specified by:
getPropertyInitialValue
in class PropertyInitializer
-
- Returns:
- the initial value of the property of the given name for the given DBObject, or throw a PropertyInitializer.InitializationVeto exception.
- Throws:
PropertyInitializer.InitializationVeto
getUserPropertyNames
protected abstract java.lang.String[] getUserPropertyNames(java.lang.Class<? extends DBObject> clz)
- Concrete subclasses should return a String[] of user property names for objects of the given class for which they provide a default value.
getUserPropertyDefault
protected abstract java.lang.String getUserPropertyDefault(DBObject obj,
java.lang.String userPropertyName)
throws PropertyInitializer.InitializationVeto
- Concrete subclasses should return the default value of the user property with the given name for the given DBObject or throw a PropertyInitializer.InitializationVeto exception.
-
- Throws:
PropertyInitializer.InitializationVeto
Skip navigation links
Copyright © 1997, 2012, Oracle. All rights reserved.