Skip navigation links

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

E13403-06


oracle.jdeveloper.offlinedb
Class OfflineDBObjectFactory

java.lang.Object
  extended by oracle.javatools.db.DBObjectFactory
      extended by oracle.jdeveloper.offlinedb.OfflineDBObjectFactory


public class OfflineDBObjectFactory
extends DBObjectFactory

Factory class with methods for creating DBObjects for use in the offline API. All new objects are given appropriate offline object ids.

Individual methods, rather than a generic newDBObject() method that uses reflection, are given to give type safety to API user code, and to make it a bit quicker as well.


Nested Class Summary
static class OfflineDBObjectFactory.IDScheme
          Deprecated. 

 

Constructor Summary
OfflineDBObjectFactory(OfflineDBObjectProvider pro)
          Constructor has package level access as API users should retrieve a factory from the provider, and not instantiate their own.

 

Method Summary
 void ensureID(java.util.Collection<? extends DBObject> objs, Difference rs)
          Checks that the given objects have an ID.
 DBObjectID ensureID(DBObject obj)
          Checks that the given object has an ID.
 DBObjectID ensureID(DBObject obj, boolean deep)
          Checks that the given object has an ID.
 DBObjectID ensureID(DBObject obj, boolean deep, boolean forceNames)
          Same as ensureID(DBObject,boolean) but optionally specify that this is only a load operation and therefore heavier ID processing (such as updating the name information in the IDs) can be skipped.
protected  DBObjectID findParentID(DBObjectID parentID)
           
 Column newColumn(Relation parent)
          Deprecated. 
 Column newColumn(java.lang.String name, Relation parent)
          Deprecated. 
 FKConstraint newFKConstraint(java.lang.String name, Relation parent)
          Deprecated. 
 DBObjectID newID(DBObject obj)
          Creates a new ID for the given object and sets it too.
 DBObjectID newID(DBObject obj, DBObjectID parent)
          Creates a new ID for the given object and sets it too.
 IdentifierBasedID newID(java.lang.String type)
          Deprecated. 
 DBObjectID newID(java.lang.String type, IdentifierBasedID parent)
          Deprecated. 
 CheckConstraint newObject(java.lang.String name, Relation parent)
          Deprecated. 
 PKConstraint newPKConstraint(java.lang.String name, Relation parent)
          Deprecated. 
 PlSql newPlSql(java.lang.String type)
          Deprecated. 
<T extends DBObject>
T
newSchemaObject(java.lang.Class<T> clz)
          Deprecated. use newObject instead
<T extends DBObject>
T
newSchemaObject(java.lang.Class<T> clz, Schema schema)
          Deprecated. use newObject instead
 UniqueConstraint newUniqueConstraint(java.lang.String name, Relation parent)
          Deprecated. 

 

Methods inherited from class oracle.javatools.db.DBObjectFactory
createID, ensureBaseInfo, ensureProvider, ensureSchema, getExternalDefaultValue, getInitialValue, getLogger, getProvider, isValidID, newObject, newObject, newObject, newObject, newObject

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

OfflineDBObjectFactory

public OfflineDBObjectFactory(OfflineDBObjectProvider pro)
Constructor has package level access as API users should retrieve a factory from the provider, and not instantiate their own.

Method Detail

newID

@Deprecated
public IdentifierBasedID newID(java.lang.String type)
Deprecated. 
Returns a DBObjectID for the given object type setup for the offline database provider this factory is associated with.

newID

@Deprecated
public DBObjectID newID(java.lang.String type,
                                   IdentifierBasedID parent)
Deprecated. 
Returns a DBObjectID for the given object type and parent set up for the offline database provider this factory is associated with.

newID

public DBObjectID newID(DBObject obj)
Creates a new ID for the given object and sets it too. Will overwrite any existing ID.

newID

public DBObjectID newID(DBObject obj,
                        DBObjectID parent)
Creates a new ID for the given object and sets it too. Will overwrite any existing ID.

newSchemaObject

@Deprecated
public <T extends DBObject> T newSchemaObject(java.lang.Class<T> clz)
Deprecated. use newObject instead

newSchemaObject

@Deprecated
public <T extends DBObject> T newSchemaObject(java.lang.Class<T> clz,
                                                         Schema schema)
Deprecated. use newObject instead
Returns a new SchemaObject of given class setup with a unique offline id.
Returns:
a new offline schema object, or null if an object of that class cannot be instantiated.

newPlSql

@Deprecated
public PlSql newPlSql(java.lang.String type)
Deprecated. 
Returns a new PL/SQL object according to the type passed in
Parameters:
type - the type, e.g. Procedure.TYPE
Returns:
null, if the type is not recognized

newColumn

@Deprecated
public Column newColumn(Relation parent)
Deprecated. 
Creates a new Column with a unique offline id.

newColumn

@Deprecated
public Column newColumn(java.lang.String name,
                                   Relation parent)
Deprecated. 
Creates a new Column with a unique offline id. The new column is automatically added to the Relation.

newUniqueConstraint

@Deprecated
public UniqueConstraint newUniqueConstraint(java.lang.String name,
                                                       Relation parent)
Deprecated. 
Creates a new UniqueConstraint for the given Relation (ensuring that the Relation has a valid ID).

newFKConstraint

@Deprecated
public FKConstraint newFKConstraint(java.lang.String name,
                                               Relation parent)
Deprecated. 
Creates a new FKConstraint for the given Relation (ensuring that the Relation has a valid ID). Since 10.1.3 the new constraint is automatically added to the Relation.

newPKConstraint

@Deprecated
public PKConstraint newPKConstraint(java.lang.String name,
                                               Relation parent)
Deprecated. 
Creates a new PKConstraint for the given Relation (ensuring that the Relation has a valid ID). Since 10.1.3 the new constraint is automatically added to the Relation.

newObject

@Deprecated
public CheckConstraint newObject(java.lang.String name,
                                            Relation parent)
Deprecated. 
Creates a new PKConstraint for the given Relation (ensuring that the Relation has a valid ID). Since 10.1.3 the new constraint is automatically added to the Relation.

ensureID

public DBObjectID ensureID(DBObject obj)
Checks that the given object has an ID. Does not check an object's children.

ensureID

public void ensureID(java.util.Collection<? extends DBObject> objs,
                     Difference rs)
Checks that the given objects have an ID. AUTOMATICALLY RECURSES TO THE OBJECT'S CHILDREN.
For internal use only. Application developers should not use this

ensureID

public DBObjectID ensureID(DBObject obj,
                           boolean deep)
Checks that the given object has an ID. Will optionally recurse to any child objects to check them as well.
1) check that any parent is correctly setup with an ID
2) check that the object's ID is valid
3) check that any reference IDs are valid (e.g. FK, Synonym)
4) optionally recurse to child objects
Returns null if the object is a sql fragment

ensureID

public DBObjectID ensureID(DBObject obj,
                           boolean deep,
                           boolean forceNames)
Same as ensureID(DBObject,boolean) but optionally specify that this is only a load operation and therefore heavier ID processing (such as updating the name information in the IDs) can be skipped.
Overrides:
ensureID in class DBObjectFactory
forceNames - if true this will additionally set the name based information on identifier based IDs. This is a potentially more time consuming operation as it may require dependent objects to be loaded.
Returns:
the id that the given object now has

findParentID

protected DBObjectID findParentID(DBObjectID parentID)
Overrides:
findParentID in class DBObjectFactory

Skip navigation links

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

E13403-06


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