|
Oracle Warehouse Builder Java API Reference 10g Release 1 (10.1) B12155-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.owb.metadatamgmt.changemgmt.SnapshotFactory
This is singleton instance to manage Snapshot
. This factory provides accessor methods to get to all snapshots currently existing in repository. The Factory also provides methods to create snapshots, for given Snapshotable
components existing in repository.
Field Summary | |
static int |
AFTER_DATE Date marker to get Snapshots after certain date. |
static int |
BEFORE_DATE Date marker to get Snapshots before certain date. |
static int |
ON_DATE Date marker to get Snapshots on certain date. |
Method Summary | |
Snapshot |
createSnapshot(Snapshotable[] comps, int type, java.lang.String name, java.lang.String desc) Creates Snapshot of components, Any invalid component on which Snapshot can not be taken would fail whole operation. |
Snapshot |
createSnapshot(Snapshotable object, int type, java.lang.String name, java.lang.String desc) Creates Snapshot for a given component. |
Snapshot |
createSnapshotWithDependeeComponents(Snapshotable[] comps, int type, java.lang.String name, java.lang.String desc, int depth) This method takes current definition of component and creates a new Snapshot. |
static SnapshotFactory |
getInstance() Gets factory instance of snapshot factory. |
Snapshot[] |
getSnapshot() Gets all Snapshot objects existing in repository. |
Snapshot[] |
getSnapshot(java.util.Date fromDate, java.util.Date toDate, java.lang.String[] userName) Gets all Snapshot within a time period, All Snapshot created between fromDate toDate. |
Snapshot[] |
getSnapshot(java.util.Date date, int action, java.lang.String[] userName) Gets all Snapshot with respect to time stamp. |
Snapshot |
getSnapshot(java.lang.String name) Gets Snapshot object with given name This traversal implies Snapshot to Object paradigm. |
Snapshot[] |
getSnapshot(java.lang.String[] users) Gets all Snapshot instances created by specified user. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BEFORE_DATE
public static final int AFTER_DATE
public static final int ON_DATE
Method Detail |
public static final SnapshotFactory getInstance()
public Snapshot createSnapshot(Snapshotable[] comps, int type, java.lang.String name, java.lang.String desc) throws java.lang.IllegalArgumentException, SnapshotNameConflictException, SnapshotLockException, SnapshotCreationException, MCMException
Snapshot
of components, Any invalid component on which Snapshot can not be taken would fail whole operation. This method enables client to take Snapshot on collection of components together as one unit. For e.g. two maps and its dependee diemsnions can be put together in one snapshot. This snapshot would be treated as one collection of all components, which can be restored, deleted as one single unit. Since this method takes in an array of components , then passing in one object handle would make it behave like Snapshotable.createSnapshot
which works on one component alone. Snapshot behaves like one label to collect multiple objects in it, or if Snapshot is taken on single component then Snapshot name identifies a history point for that component alone, which is analogous to having a version of that component. These two concepts coexist and can be used interchangbly. To illustrate, this with example, consider a snapshot called PRODUCTION on mapping A, This PRODUCTION label on mapping A behaves like a version of mapping taken at certain point in history. Snapshot with same name PRODUCTION is taken on Table Object B. Then another snapshot is taken on mapping A called SHIPPED. Snapshots can be traversed in two paradigms, namely Component to Snapshot and vice-versa . When object (mapping A for e.g.) traverse to all its snapshot , it can traverse to PRODUCTION and SHIPPED Snapshots. This is called Component to Snapshot traversal.If traversal is made from Snapshot to Component, for e.g. `show contents of snapshot named PRODUCTION` , then two object mapping A and table B act as one collection and all operations on this Snapshot
object would be perform on this collection/set of components together. Creating table B with snapshot name PRODUCTION behaves like altering snapshot PRODUCTION and adding object B to this Snapshot (Snapshot to Component paradigm).comps
- Array of Snapshotable
instance of components.type
- Type of snapshot, constant defined in Snapshot
, The only valid value is Snapshot.FULL and Snapshot.SIGNATURE. Type flag is applied to all components, wherever it is applicable.name
- Name of Snapshot, This name idenfies a history point for a component or collection of components.desc
- Description of snapshot.Snapshot
instance representing operation success.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.public Snapshot createSnapshot(Snapshotable object, int type, java.lang.String name, java.lang.String desc) throws java.lang.IllegalArgumentException, SnapshotNameConflictException, SnapshotLockException, SnapshotCreationException, MCMException
Snapshot
for a given component.object
- Snapshotable Component.type
- Type of snapshot, constant defined in Snapshot
, The only valid value is Snapshot.FULL and Snapshot.SIGNATURE.name
- Name of Snapshot, This name idenfies a history point for a component.desc
- Description of snapshot, can be null also.Snapshot
instance representing operation success.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.public Snapshot createSnapshotWithDependeeComponents(Snapshotable[] comps, int type, java.lang.String name, java.lang.String desc, int depth) throws java.lang.IllegalArgumentException, SnapshotNameConflictException, SnapshotLockException, SnapshotCreationException, MCMException
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.comps
- Array of Snapshotable
instance of components.type
- - Type of snapshot, constant defined in Snapshot
Only valid options are Snapshot.FULL or Snapshot.SIGNATUREname
- 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.Snapshot
object.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.public Snapshot[] getSnapshot() throws MCMException
Snapshot
objects existing in repository. This implies Snapshot to Object paradigm traversal. If Snapshot name exist on multiple components then single Snapshot object is returned and its contents will be all those components.Snapshot
instances currently existing in repositoryMCMException
- When this operation can not be completed.public Snapshot getSnapshot(java.lang.String name) throws MCMException
Snapshot
object with given name This traversal implies Snapshot to Object paradigm. If Snapshot name exist on multiple components then single Snapshot object is returned and its contents will be all those components.name
- Name of Snapshot.Snapshot
instance for given name, currently existing in repositoryMCMException
- When this operation can not be completed.public Snapshot[] getSnapshot(java.lang.String[] users) throws MCMException
Snapshot
instances created by specified user.users
- All Snapshots created by specified users are returned.MCMException
- When this operation can not be completed.public Snapshot[] getSnapshot(java.util.Date date, int action, java.lang.String[] userName) throws java.lang.IllegalArgumentException, MCMException
Snapshot
with respect to time stamp.date
- Date object represent a point in time.action
- takes SnapshotFactory.BEFORE_DATE or SnapshotFactory.AFTER_DATEuserName
- Along with time stamp, userName becomes another filter. if userName is null , then all users Snapshots are returned.Snapshot
instancesjava.lang.IllegalArgumentException
- When invalid date action is used to filter Snapshots.MCMException
- When this operation can not be completed.public Snapshot[] getSnapshot(java.util.Date fromDate, java.util.Date toDate, java.lang.String[] userName) throws MCMException
Snapshot
within a time period, All Snapshot created between fromDate toDate.fromDate
- Date object representing FROM point in time.toDate
- Date object representing TO point in timeuserName
- Along with time stamp, userName becomes another filter. if userName is null , then userName is ignored.MCMException
- When this operation can not be completed.
|
Oracle Warehouse Builder Java API Reference 10g Release 1 (10.1) B12155-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |