|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.sysman.dbTarget.db.changemgr.emo.cpapi.ChangeItemInfo
oracle.sysman.dbTarget.db.changemgr.emo.cpapi.ChangeItem
public class ChangeItem
A ChangeItem represents the changes to be made with regard to a single database object at the destination database(s). It includes the defintion of the object or the changes to the object, and the methods that store and update those definitions.
The definitions are stored as SXML documents. SXML is an Oracle-defined XML format for representation of metadata. Diff SXML is SXML that contains attributes to indicate differences between two objects. For Modify change items, Diff SXML indicates the changes to be made to the database object.
Field Summary |
---|
Fields inherited from class oracle.sysman.dbTarget.db.changemgr.emo.cpapi.ChangeItemInfo |
---|
CLUSTER, CP_ADD, CP_DROP, CP_MODIFY, CP_MONITOR, CP_NO_ACTION, DB_LINK, FUNCTION, INDEX, MATERIALIZED_VIEW, MATERIALIZED_VIEW_LOG, MAX_DESCRIPTION_LENGTH, PACKAGE, PACKAGE_BODY, PACKAGE_SPEC, PROCEDURE, PROFILE, ROLE, ROLLBACK_SEGMENT, SEQUENCE, SYNONYM, TABLE, TABLESPACE, TRIGGER, TYPE, USER, VIEW |
Constructor Summary | |
---|---|
ChangeItem(int itemAction,
java.lang.String typeName,
java.lang.String objectName,
java.lang.String objectSchema,
java.lang.String description,
oracle.xml.parser.v2.XMLDocument origDefn,
oracle.xml.parser.v2.XMLDocument revisedDefn,
XMLAccessorClient client)
Creates a ChangeItem for a database object. |
Method Summary | |
---|---|
void |
convertChangeItem(int newAction,
oracle.xml.parser.v2.XMLDocument revisedDefn,
XMLAccessorClient client)
Converts a change item from one action type to another When converting CP_MONITOR to CP_MODIFY, compares the revised definition to the original definition stored with the change item, and stores the resulting Diff SXML document in the change item. |
java.util.Vector |
getAllowedNewActions()
Lists the Change Item action types to which this Change Item can be converted. |
java.lang.String |
getDDL(XMLAccessorClient client)
Returns DDL that represents the change(s) specified by this change item. |
oracle.xml.parser.v2.XMLDocument |
getDefinition()
Gets the SXML document contained in this change item. |
oracle.xml.parser.v2.XMLDocument |
getOriginalDefinition()
Gets the SXML document for the original definition of the object that is being modified by this change item. |
oracle.xml.parser.v2.XMLDocument |
getRevisedDefinition()
Gets the SXML document for the revised definition of the object that is being modified by this change item. |
boolean |
newActionAllowed(int newAction)
Indicates whether this ChangeItem's action can be converted to the specified different Change Item action. |
java.lang.String |
toString()
|
ApplyOneDiffResult[] |
updateDefinition(oracle.xml.parser.v2.XMLDocument revisedDefn,
XMLAccessorClient client)
Updates the object definition associated with this change item, using default conflict resolution rules. |
ApplyOneDiffResult[] |
updateDefinition(oracle.xml.parser.v2.XMLDocument revisedDefn,
XMLAccessorClient client,
ApplyDiffListener adl)
Updates the object definition associated with this change item. |
Methods inherited from class oracle.sysman.dbTarget.db.changemgr.emo.cpapi.ChangeItemInfo |
---|
getClientSourceDatabase, getDescription, getEntMgrSourceDatabase, getGlobalSourceDatabase, getItemAction, getItemDisplayName, getObjectName, getObjectSchema, getObjectType, getObjectTypeCode, setClientSourceDatabase, setDescription, setEntMgrSourceDatabase, setGlobalSourceDatabase, setItemAction, setObjectName, setObjectSchema, setObjectType |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ChangeItem(int itemAction, java.lang.String typeName, java.lang.String objectName, java.lang.String objectSchema, java.lang.String description, oracle.xml.parser.v2.XMLDocument origDefn, oracle.xml.parser.v2.XMLDocument revisedDefn, XMLAccessorClient client) throws ChangePlanAccessException
itemAction
- Change item's action.
(See the
setItemAction
method)typeName
- The object type name, one of:
objectName
- the object name (for materialized view
logs, the master table name)objectSchema
- the object schemadescription
- description of the change item
(limited to MAX_DESCRIPTION_LENGTH characters)origDefn
- the original SXML definition of the
object:
revisedDefn
- the revised SXML definition of the object;
optional for CP_MODIFY change items and
ignored for other action types. If
supplied, revisedDefn is compared to
origDefn; the differences between them
describe the changes to be made at the
destination database(s). If revisedDefn
is not supplied for CP_MODIFY change items,
the updateDefinition(oracle.xml.parser.v2.XMLDocument, oracle.sysman.dbTarget.db.changemgr.emo.docaccess.XMLAccessorClient)
method must be
used later to supply a revised definition.client
- XMLAccessorClient object, needed to support
object comparison
ChangePlanAccessException
- if the typeName does not
specify one of the schema object
types, or if the revisedDefn argument
is non-null for the CP_ADD or CP_DROP
action type.Method Detail |
---|
public oracle.xml.parser.v2.XMLDocument getDefinition()
public oracle.xml.parser.v2.XMLDocument getOriginalDefinition()
getDefinition()
.)
public oracle.xml.parser.v2.XMLDocument getRevisedDefinition()
getDefinition()
.) The difference between this method
and getDefinition is that, for CP_MODIFY change items,
this method returns SXML with no difference attributes.
public ApplyOneDiffResult[] updateDefinition(oracle.xml.parser.v2.XMLDocument revisedDefn, XMLAccessorClient client) throws ChangePlanAccessException
ChangePlanAccessException
public ApplyOneDiffResult[] updateDefinition(oracle.xml.parser.v2.XMLDocument revisedDefn, XMLAccessorClient client, ApplyDiffListener adl) throws ChangePlanAccessException
revisedDefn
- the revised SXML definition of the objectclient
- XMLAccessorClient objectadl
- an ApplyDiffListener instance. If
supplied, its applyDiffResult() method
is called to report and if necessary,
resolve conflicts for each difference
applied.
ChangePlanAccessException
public void convertChangeItem(int newAction, oracle.xml.parser.v2.XMLDocument revisedDefn, XMLAccessorClient client) throws ChangePlanAccessException
newAction
- One of:
revisedDefn
- the revised SXML definition of the object
(ignored when not converting to CP_MODIFY)client
- XMLAccessorClient object
ChangePlanAccessException
- if the newAction argument is not
appropriate for this type of change item.public boolean newActionAllowed(int newAction)
newAction
- One of:
public java.util.Vector getAllowedNewActions()
public java.lang.String getDDL(XMLAccessorClient client) throws ChangePlanAccessException
client
- XMLAccessorClient object
ChangePlanAccessException
- if the Add, Modify or Monitor change
item does not have an associated definition,
or if no XMLAccessorClient has been set for
the owning Change Plan.public java.lang.String toString()
toString
in class ChangeItemInfo
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |