Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.javatools.db.extension
Class DelegateDDLGenerator

java.lang.Object
  extended by oracle.javatools.db.extension.DelegateDDLGenerator
All Implemented Interfaces:
DDLGenerator, PropertyManager

public final class DelegateDDLGenerator
extends java.lang.Object
implements DDLGenerator

DDLGenerator implementation that delegates to another DDLGenerator for all normal object types. For any object type registered through the DBObjectRegistry the calls are instead delegated to the appropriately registered DDLGenerator implementation there instead.

Since:
11.1.1.4.0

Constructor Summary
DelegateDDLGenerator(DDLGenerator base, DatabaseDescriptor desc, DBObjectProvider pro)
           
 
Method Summary
 boolean canAlterProperty(DBObject original, DBObject update, java.lang.String prop)
          Convenience method to call PropertyManager.canChangeProperty(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject, java.lang.String) and check the return value is a PropertyAction with a type of ALTER.
 PropertyAction canChangeProperty(DBObject original, DBObject update, java.lang.String prop)
          Queries the support for setting or changing the given property for a create or update.
 PropertyAction canUpdateObject(DBObject original, DBObject update)
          Convenience method that uses PropertyManager.canChangeProperty(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject, java.lang.String) 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(Difference diff)
          Convenience method that uses PropertyManager.canChangeProperty(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject, java.lang.String) on all the differences in the given Difference to tell whether the update on the given objects can be done using a CREATE, ALTER or REPLACE as appropriate.
 DDL getCreateDDL(DDLOptions options, DBObject... objects)
          Gets CREATE statements for the given objects.
 DDL getDeleteDDL(DDLOptions options, DBObject... objects)
          Gets DROP statements for the given objects.
 DDL getUndeleteDDL(DDLOptions options, DBObject... objects)
          Gets statements to undelete (e.g.
 DDL getUpdateDDL(DDLOptions options, Difference diff)
          Gets ALTER statements for the given objects where possible, or DROP/CREATE, or CREATE AND REPLACE where appropriate/necessary.
 boolean supportsAction(java.lang.String type, PropertyAction.Type action)
          Asks whether a given action is supported for the specified object type in this provider.
 boolean supportsProperty(java.lang.String type, java.lang.String prop)
          Tests whether the given property is supported for the given object type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateDDLGenerator

public DelegateDDLGenerator(DDLGenerator base,
                            DatabaseDescriptor desc,
                            DBObjectProvider pro)
Method Detail

canAlterProperty

public boolean canAlterProperty(DBObject original,
                                DBObject update,
                                java.lang.String prop)
Description copied from interface: PropertyManager
Convenience method to call PropertyManager.canChangeProperty(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject, java.lang.String) and check the return value is a PropertyAction with a type of ALTER.

Specified by:
canAlterProperty in interface PropertyManager
Parameters:
original - the original object (null for a create query)
update - the updated (or new) object
prop - the property name / path to query
Returns:
true if the given property can be changed using ALTER.

canChangeProperty

public PropertyAction canChangeProperty(DBObject original,
                                        DBObject update,
                                        java.lang.String prop)
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
prop - the property name / path to query
Returns:
an appropriate property action indicating the level of support for that property if supported, or null if the property is not supported.

canUpdateObject

public PropertyAction canUpdateObject(DBObject original,
                                      DBObject update)
Description copied from interface: PropertyManager
Convenience method that uses PropertyManager.canChangeProperty(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject, java.lang.String) 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:
original - 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 PropertyAction canUpdateObject(Difference diff)
Description copied from interface: PropertyManager
Convenience method that uses PropertyManager.canChangeProperty(oracle.javatools.db.DBObject, oracle.javatools.db.DBObject, java.lang.String) on all the differences in the given Difference 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:
diff - 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.

getCreateDDL

public DDL getCreateDDL(DDLOptions options,
                        DBObject... objects)
Description copied from interface: DDLGenerator
Gets CREATE statements for the given objects.

Specified by:
getCreateDDL in interface DDLGenerator

getDeleteDDL

public DDL getDeleteDDL(DDLOptions options,
                        DBObject... objects)
Description copied from interface: DDLGenerator
Gets DROP statements for the given objects.

Specified by:
getDeleteDDL in interface DDLGenerator

getUndeleteDDL

public DDL getUndeleteDDL(DDLOptions options,
                          DBObject... objects)
Description copied from interface: DDLGenerator
Gets statements to undelete (e.g. FLASHBACK) the given objects.

Specified by:
getUndeleteDDL in interface DDLGenerator

getUpdateDDL

public DDL getUpdateDDL(DDLOptions options,
                        Difference diff)
Description copied from interface: DDLGenerator
Gets ALTER statements for the given objects where possible, or DROP/CREATE, or CREATE AND REPLACE where appropriate/necessary.

Specified by:
getUpdateDDL in interface DDLGenerator

supportsAction

public boolean supportsAction(java.lang.String type,
                              PropertyAction.Type action)
Description copied from interface: PropertyManager
Asks whether a given action is supported for the specified object type in this provider.

Specified by:
supportsAction in interface PropertyManager

supportsProperty

public boolean supportsProperty(java.lang.String type,
                                java.lang.String prop)
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 ).
prop - the property name / path.
Returns:
true if the property is valid for the given object type in the provider for this property manager

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

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