Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

oracle.owb.metadatamgmt.changemgmt
Interface Snapshotable

All Known Subinterfaces:
AdvancedQueue, BaseLocation, BusinessArea, Component, Connector, Cube, Dimension, ExternalTable, FlatFile, FlatFileModule, Folder, Function, GatewayModule, IntelligenceModule, IOFunction, Location, Map, MaterializedView, Module, ObjectType, OracleModule, OWBCollection, Package, Procedure, ProcessFlow, ProcessFlowModule, ProcessFlowPackage, Project, QueryObject, Report, ReportGroup, ReportModule, RuntimeRepository, SAPModule, Sequence, Table, TransformationModule, View

public interface Snapshotable

Snapshotable This interface is implemented by all components on which Snapshot can be taken and enable user to operate on individual Component in Object to Snapshot paradigm (version/history of component paradigm), and treats Snapshot as another version/history of this component. In Object to Snapshot paradigm, each snapshot on component represents a history point.

Version:
1.0
Author:
Arun Manchanda(arun.manchanda@oracle.com)

Field Summary
static int MAX_DEPENDENCY_DEPTH
          Constant defined for maximum dependency depth.
static int MIN_DEPENDENCY_DEPTH
          Constant defined for minimum dependency depth.

 

Method Summary
 void compare(Snapshot srcSnap, Snapshot tgtSnap, java.lang.String diffFileName)
          This method computes difference between (tgtSnap - thisSnap) for this component.
 void compare(Snapshot srcSnap, Snapshot tgtSnap, java.lang.String diffFileName, int compareFilter, int objTypeFilter)
          This method computes difference between (tgtSnap - thisSnap) for this component.
 void compare(Snapshot srcSnap, java.lang.String diffFileName)
          This method computes difference between Current Component Definition and history point srcSnap.
 void compare(Snapshot srcSnap, java.lang.String diffFileName, int compareFilter, int objTypeFilter)
          This method computes difference between Current Component Definition and history point srcSnap.
 Snapshot createSnapshot(int type, java.lang.String desc)
          This method takes current definition of component and creates a new Snapshot.
 Snapshot createSnapshot(int type, java.lang.String name, java.lang.String desc)
          This method takes current definition of component and creates a new Snapshot.
 Snapshot createSnapshotWithDependeeComponents(int type, java.lang.String desc, int depth)
          This method takes current definition of component and creates a new Snapshot.
 Snapshot createSnapshotWithDependeeComponents(int type, java.lang.String name, java.lang.String desc, int depth)
          This method takes current definition of component and creates a new Snapshot.
 Snapshot[] getSnapshots()
          Gets all Snapshot objects containing this Snapshotable.

 

Field Detail

MIN_DEPENDENCY_DEPTH

public static final int MIN_DEPENDENCY_DEPTH
Constant defined for minimum dependency depth.
See Also:
Constant Field Values

MAX_DEPENDENCY_DEPTH

public static final int MAX_DEPENDENCY_DEPTH
Constant defined for maximum dependency depth.
See Also:
Constant Field Values
Method Detail

getSnapshots

public Snapshot[] getSnapshots()
                        throws MCMException
Gets all Snapshot objects containing this Snapshotable. If this Snapshotable represents a component, which is contained in folder, then if Snapshot exist on folder, then returned Snapshot from this Snapshotable would return Snapshot, whose all contents can traversed. For e.g. if this is Table T1 object contained in Oracle Schema M1, then if there is Snapshot PROD on M1 with cascade option, then T1 will have PROD label implicilty, so calling T1.getSnapshot() would return Snapshot PROD. This PROD Snapshot would have all the contents including T1 and its parent Oracle Schema. for e.g. Deleting PROD would delete snapshot of M1, if operation is is remove implicit PROD on T1, then Snapshot can be altered/updated to remove this Component. If this component is not containted in any snapshots, then empty array of Snapshot will be returned.
Returns:
Array of Snapshot objects belonging to this snapshot.
Throws:
MCMException - When any error occurs causing this operation to fail.

createSnapshot

public Snapshot createSnapshot(int type,
                               java.lang.String name,
                               java.lang.String desc)
                        throws java.lang.IllegalArgumentException,
SnapshotNameConflictException,
SnapshotLockException,
SnapshotCreationException,
MCMException
This method takes current definition of component and creates a new Snapshot. Pre-Requisites : Component available to lock with in this method
Parameters:
type - - Type of snapshot, constant defined in Snapshot Only valid options are Snapshot.FULL or Snapshot.SIGNATURE
name - Name of Snapshot.
desc - Description of snapshot.
Returns:
the created Snapshot object.
Throws:
java.lang.IllegalArgumentException - When invalid name or type is used.
SnapshotNameConflictException - When Snapshot object with given name already exists.
SnapshotLockException - When lock on component couldnt be obtained.
SnapshotCreationException - When Snapshot couldnt be created.
MCMException - Any other error causing this operation to fail.

createSnapshot

public Snapshot createSnapshot(int type,
                               java.lang.String desc)
                        throws java.lang.IllegalArgumentException,
SnapshotNameConflictException,
SnapshotLockException,
SnapshotCreationException,
MCMException
This method takes current definition of component and creates a new Snapshot. Pre-Requisites : Component available to lock with in this method Post : This method uses system generated name, which is also reserved, during current trasaction. Generated Snapshot name is relaesed upon rollback , else on commit point, its reservation is made permanent.
Parameters:
type - - Type of snapshot, constant defined in Snapshot Only valid options are Snapshot.FULL or Snapshot.SIGNATURE
desc - Description of snapshot.
Returns:
the created Snapshot object.
Throws:
java.lang.IllegalArgumentException - When invalid type is used.
SnapshotNameConflictException - When system hits errors generating snapshot name.
SnapshotLockException - When lock on component couldnt be obtained.
SnapshotCreationException - When Snapshot couldnt be created.
MCMException - Any other error causing this operation to fail.

createSnapshotWithDependeeComponents

public Snapshot createSnapshotWithDependeeComponents(int type,
                                                     java.lang.String name,
                                                     java.lang.String desc,
                                                     int depth)
                                              throws java.lang.IllegalArgumentException,
SnapshotNameConflictException,
SnapshotLockException,
SnapshotCreationException,
MCMException
This method takes current definition of component and creates a new Snapshot. This method also traverse the cross component associations, and takes all dependee components of this component to be part of Snapshot. For e.g. Mapping component operators points to real entities. So this method along with Mapping , takes all operator's bound real entities to be included in this Snapshot Pre-Requisites : Component available to lock with in this method, And Component's dependee's also should be available to lock.
Parameters:
type - - Type of snapshot, constant defined in Snapshot Only valid options are Snapshot.FULL or Snapshot.SIGNATURE
name - Name of Snapshot.
desc - Description of snapshot.
depth - - terminal binding level. For e.g. Table A's FK points to another Table B's UK and B has FK pointing to C's UK, and C's FK points to D's UK Then Snapshot on A with depth 2 will include A, B, C Snapshot on A with depth 1 with include A, B Max depth allowed is Snapshotable.MAX_DEPENDENCY_DEPTH, To sepecify all depdendencies Snapshotable.MAX_DEPENDENCY_DEPTH constant should be used.
Returns:
the created Snapshot object.
Throws:
java.lang.IllegalArgumentException - When invalid name or type is used.
SnapshotNameConflictException - When Snapshot object with given name already exists.
SnapshotLockException - When lock on component couldnt be obtained.
SnapshotCreationException - When Snapshot couldnt be created.
MCMException - Any other error causing this operation to fail.

createSnapshotWithDependeeComponents

public Snapshot createSnapshotWithDependeeComponents(int type,
                                                     java.lang.String desc,
                                                     int depth)
                                              throws java.lang.IllegalArgumentException,
SnapshotCreationException,
SnapshotLockException,
SnapshotNameConflictException,
MCMException
This method takes current definition of component and creates a new Snapshot. This method also traverse the cross component associations, and takes all dependee components of this component to be part of Snapshot. For e.g. Mapping component operators points to real entities. So this method along with Mapping , takes all operator's bound real entities to be included in this Snapshot Pre-Requisites : Component available to lock with in this method, And Component's dependee's also should be available to lock. Post : This method uses system generated name, which is also reserved, during current trasaction. Generated Snapshot name is relaesed upon rollback , else on commit point, its reservation is made permenent.
Parameters:
type - - Type of snapshot, constant defined in Snapshot Only valid options are Snapshot.FULL or Snapshot.SIGNATURE
desc - Description of snapshot.
depth - - terminal binding level. For e.g. Table A's FK points to another Table B's UK and B has FK pointing to C's UK, and C's FK points to D's UK Then Snapshot on A with depth 2 will include A, B, C Snapshot on A with depth 1 with include A, B Max depth allowed is 15. (so depth can be in between 1 and 15). To sepecify all depdendencies Snapshot.N_Level constant should be used.
Returns:
the created Snapshot object.
Throws:
java.lang.IllegalArgumentException - When invalid name or type is used.
SnapshotNameConflictException - When system hits errors generating snapshot name.
SnapshotLockException - When lock on component couldnt be obtained.
SnapshotCreationException - When Snapshot couldnt be created.
MCMException - Any other error causing this operation to fail.

compare

public void compare(Snapshot srcSnap,
                    java.lang.String diffFileName)
             throws CompareException,
MCMException
This method computes difference between Current Component Definition and history point srcSnap. This method by default applies MCMServiceHandler.COMPARE_FILTER_CHANGED_OBJECT_ONLY for compare filter and MCMServiceHandler.OBJECTS_TYPE_FILTER_ANY_OBJECTS for object type filter. Applying these default filters would imply, diff report will contain all changed objects and will include all logical and physical objects.
Parameters:
srcSnap - Source Snapshot with which this Component will be compared
diffFileName - File name where diff XML would be stored
Throws:
CompareException - When Comparison couldnt be completed.
MCMException - Any other error causing this operation to fail.

compare

public void compare(Snapshot srcSnap,
                    java.lang.String diffFileName,
                    int compareFilter,
                    int objTypeFilter)
             throws CompareException,
MCMException
This method computes difference between Current Component Definition and history point srcSnap. This method by default applies MCMServiceHandler.COMPARE_FILTER_CHANGED_OBJECTS_ONLY for compare filter and MCMServiceHandler.OBJECTS_TYPE_FILTER_ANY_OBJECTS for object type filter. Applying these default filters would imply, diff report will contain all changed objects and will include all logical and physical objects.
Parameters:
srcSnap - Source Snapshot with which this Component will be compared
diffFileName - File name where diff XML would be stored
compareFilter - Compare Filter
objTypeFilter - Object Type Filter
Throws:
CompareException - When Comparison couldnt be completed.
MCMException - Any other error causing this operation to fail.

compare

public void compare(Snapshot srcSnap,
Snapshot tgtSnap,
                    java.lang.String diffFileName,
                    int compareFilter,
                    int objTypeFilter)
             throws CompareException,
MCMException
This method computes difference between (tgtSnap - thisSnap) for this component. Both snapshots must exist on this component. Important disnction between this method in Snapshotable and Snapshot is , this method compares two version of a component and in Snapshot is like comparing two labels in conventional versioing systems.
Parameters:
srcSnap - Source Snapshot
tgtSnap - Target Snapshot
diffFileName - File name where diff XML would be stored
compareFilter - Valid filter values are defined in MCMServiceHandler for example MCMServiceHandler.COMPARE_FILTER_FOUND_OBJECTS_IN_TARGET_ONLY , MCMServiceHandler.COMPARE_FILTER_FOUND_OBJECTS_IN_SOURCE_ONLY ... All compare filters are prefixed with COMPARE_FILTER
objTypeFilter - - This filters is on object types in diff, Using this filter only Logical or Physical objects can be put in generated diff file. for e.g. MCMServiceHandler.OBJECT_TYPE_FILTER_LOGICAL_OBJECT_ONLY All object type filters are prefixed with OBJECT_TYPE_FILTER
Throws:
CompareException - When snapshots couldnt be compared.
MCMException - Any other error causing this operation to fail.

compare

public void compare(Snapshot srcSnap,
Snapshot tgtSnap,
                    java.lang.String diffFileName)
             throws CompareException,
MCMException
This method computes difference between (tgtSnap - thisSnap) for this component. Both snapshots must exist on this component. Important disnction between this method in Snapshotable and Snapshot is , this method compares two version of a component and in Snapshot is like comparing two labels in conventional versioing systems. This method by default applies MCMServiceHandler.COMPARE_FILTER_CHANGED_OBJECTS_ONLY for compare filter and MCMServiceHandler.OBJECTS_TYPE_FILTER_ANY_OBJECTS for object type filter. Applying these default filters would imply, diff report will contain all changed objects and will include all logical and physical objects.
Parameters:
srcSnap - Source Snapshot
tgtSnap - Target Snapshot
diffFileName - File name where diff XML would be stored
Throws:
CompareException - When snapshots couldnt be compared.
MCMException - Any other error causing this operation to fail.

Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

Copyright © 2003, Oracle. All Rights Reserved.