Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

oracle.javatools.db.property
Class AbstractPropertyManager

java.lang.Object
  extended by oracle.javatools.db.property.AbstractPropertyManager
All Implemented Interfaces:
PropertyManager
Direct Known Subclasses:
TokenDDLGenerator

public abstract class AbstractPropertyManager
extends java.lang.Object
implements PropertyManager


Constructor Summary
protected AbstractPropertyManager(DBObjectProvider pro)
           
 
Method Summary
 PropertyAction canChangeProperty(DBObject original, DBObject update, java.lang.Object propObj)
          Queries the support for setting or changing the given property for a create or update.
protected  boolean canChangeWithAlter(DBObject orig, DBObject update, java.lang.String prop)
          Returns true if the given property can be changed using an alter on the given original and updated objects.
protected  boolean canChangeWithReplace(DBObject orig, DBObject update, java.lang.String prop)
          Returns true if the given property can be changed using a drop/recreate on the given original and updated objects.
protected  boolean canCreate(DBObject newObj, java.lang.String prop)
          Return true if the given property can be set on the given new object.
protected  boolean canCreate(java.lang.String type, java.lang.String prop)
          Tests whether the given property is supported for create on the given object type.
 PropertyAction canUpdateObject(DBObject orig, DBObject update)
          Convenience method that uses PropertyManager.canChangeProperty(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject, java.lang.Object) on all the differences in the given object to tell whether the update on the given objects can be done using a CREATE, ALTER or REPLACE as appropriate.
 PropertyAction canUpdateObject(ResultSet rs)
          Convenience method that uses PropertyManager.canChangeProperty(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject, java.lang.Object) on all the differences in the given ResultSet to tell whether the update on the given objects can be done using a CREATE, ALTER or REPLACE as appropriate.
protected  java.util.logging.Logger getLogger()
           
protected  DBObjectProvider getProvider()
           
protected  java.lang.Class<? extends DBObjectProvider> getProviderClass()
           
 boolean supportsProperty(java.lang.String type, java.lang.Object propObj)
          Tests whether the given property is supported for the given object type.
protected  boolean supportsProperty(java.lang.String type, java.lang.String prop, java.lang.Class<? extends DBObjectProvider> proClz)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.javatools.db.property.PropertyManager
supportsAction
 

Constructor Detail

AbstractPropertyManager

protected AbstractPropertyManager(DBObjectProvider pro)
Method Detail

getLogger

protected java.util.logging.Logger getLogger()

getProvider

protected DBObjectProvider getProvider()

getProviderClass

protected java.lang.Class<? extends DBObjectProvider> getProviderClass()

supportsProperty

public boolean supportsProperty(java.lang.String type,
                                java.lang.Object propObj)
Description copied from interface: PropertyManager
Tests whether the given property is supported for the given object type.

Specified by:
supportsProperty in interface PropertyManager
Parameters:
type - the object type (e.g. Table.TYPE ).
propObj - the property name (will use .toString())
Returns:
true if the property is valid for the given object type in the provider for this property manager

supportsProperty

protected boolean supportsProperty(java.lang.String type,
                                   java.lang.String prop,
                                   java.lang.Class<? extends DBObjectProvider> proClz)

canChangeProperty

public final PropertyAction canChangeProperty(DBObject original,
                                              DBObject update,
                                              java.lang.Object propObj)
Description copied from interface: PropertyManager
Queries the support for setting or changing the given property for a create or update. If the original object is null then the request is to test whether the given property is settable on a new object. If the original object is not null the request is to test whether the given property can be changed, and if so whether the change can be applied by an update/alter or whether a replace/recreate is needed.

Specified by:
canChangeProperty in interface PropertyManager
Parameters:
original - the original object (null for a create query)
update - the updated (or new) object
propObj - the property to query (will use .toString())
Returns:
an appropriate property action indicating the level of support for that property if supported, or null if the property is not supported.

canCreate

protected boolean canCreate(DBObject newObj,
                            java.lang.String prop)
Return true if the given property can be set on the given new object. By default this calls canCreate(String,String) with the object type.


canCreate

protected boolean canCreate(java.lang.String type,
                            java.lang.String prop)
Tests whether the given property is supported for create on the given object type.


canChangeWithAlter

protected boolean canChangeWithAlter(DBObject orig,
                                     DBObject update,
                                     java.lang.String prop)
Returns true if the given property can be changed using an alter on the given original and updated objects.


canChangeWithReplace

protected boolean canChangeWithReplace(DBObject orig,
                                       DBObject update,
                                       java.lang.String prop)
Returns true if the given property can be changed using a drop/recreate on the given original and updated objects.


canUpdateObject

public final PropertyAction canUpdateObject(DBObject orig,
                                            DBObject update)
Description copied from interface: PropertyManager
Convenience method that uses PropertyManager.canChangeProperty(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject, java.lang.Object) on all the differences in the given object to tell whether the update on the given objects can be done using a CREATE, ALTER or REPLACE as appropriate.

Specified by:
canUpdateObject in interface PropertyManager
Parameters:
orig - the original object (null for a create query)
update - the updated (or new) object
Returns:
an appropriate property action indicating the level support if the update is supported, or null if the update is not supported.

canUpdateObject

public final PropertyAction canUpdateObject(ResultSet rs)
Description copied from interface: PropertyManager
Convenience method that uses PropertyManager.canChangeProperty(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject, java.lang.Object) on all the differences in the given ResultSet to tell whether the update on the given objects can be done using a CREATE, ALTER or REPLACE as appropriate.

Specified by:
canUpdateObject in interface PropertyManager
Parameters:
rs - the changes to test
Returns:
an appropriate property action indicating the level support if the update is supported, or null if the update is not supported.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

Copyright © 1997, 2009, Oracle. All rights reserved.