See: Description
| Interface | Description |
|---|---|
| BinaryObject |
Interface for an object from the db that has a binary representation (e.g.
|
| ChildDBObject |
Interface that any DBObject should implement if it can exist as the child of another DBObject.
|
| ColumnConstraintReferenceID | Deprecated |
| Database |
Provides a interface for accessing a database.
|
| DBObject |
Base interface for all database objects.
|
| DBObjectBuilder<T extends DBObject> |
The
DBObjectBuilder interface provides a mechanism for constructing new instances representing database objects. |
| DBObjectFilter<T extends DBObject> |
Interface to use when searching DBObjects for a particular object, or objects.
|
| DBObjectID |
Interface representing an immutable object ID for a DBObject.
|
| DBObjectProvider |
The
DBObjectProvider interface provides clients with access to database objects. |
| DBObjectProviderFactory.Listener |
Listener interface that can be registered against this factory to be notified of provider create and uncache events.
|
| DBObjectProviderListener | Deprecated
- moved to
DBObjectProviderListener |
| DBObjectValidator<T extends DBObject> | Deprecated
replaced by oracle.javatools.db.validators.DBObjectValidator
|
| DBReferenceID | Deprecated |
| DeclarativePlSql | Deprecated
use
PlSqlSubProgram instead |
| JdbcDatabase |
Implementation of the
Database interface for JDBC Databases. |
| ProviderUsage |
Should be implemented by any DBObject that requires a DBObjectProvider to be set in order to operate.
|
| SchemaObject |
A
SchemaObject represents a database object that can exist within the context of a schema. |
| SchemaObjectExpander | Deprecated
replaced by
UpdateProcessor |
| SchemaObjectListener | Deprecated
replaced by DBObjectListener
|
| SourceObject |
Any object in the database that can contain a block of source code - for example java or PL/SQL.
|
| SystemObject |
A system object is available at the DBObjectProvider level through the list and get methods, and can be created/updated/deleted.
|
| TemplateExpander.Initialiser |
The template mechanism can be extended by Initialiser objects that can perform extra template work on newly templated objects before they're commited to the provider.
|
| Class | Description |
|---|---|
| AbstractBuildableObject |
Provides methods for lazy loading and building AbstractDBObjects.
|
| AbstractChildBuildableObject |
Abstract DBObject implementation that is buildable (support lazy loading) and is a ChildDBObject implementation.
|
| AbstractChildDBObject |
Extension of DBObject used by child object in the API.
|
| AbstractDatabase |
Base implementation of the
Database interface. |
| AbstractDBObject |
Provides an abstract implementation of the
DBObject interface. |
| AbstractDBObjectBuilder<T extends AbstractBuildableObject> |
Abstract implementation of DBObjectbuilder that provides core support for component building of objects.
|
| AbstractDBObjectID |
Abstract implementation of DBObjectID for subclassing by DBObjectID implementations.
|
| AbstractDBObjectProvider |
Provides a base implementation of the
DBObjectProvider interface. |
| AbstractIncrementer |
Abstract superclass of Sequence to allow for other implementations that use a Sequence (or similar) but not as a SchemaObject to re-use these properties.
|
| AbstractSchemaObject |
Provides a base implementation of the
SchemaObject interface. |
| AbstractSystemObject |
Abstract superclass for all SystemObject implementations.
|
| Alias |
Model of a database alias.
|
| AutoExtendProperties |
Model of properties for auto extend behavior used by
Tablespaces |
| BaseObjectID |
Base DBObjectID implementation that stores the object name and (optionally) schema name of the object.
|
| CascadeManager |
Provides facilities for listing references between DBObjects in a DBObjectProvider, and provides cascade logic for cascading delete of an object.
|
| CascadeManager.LookupCriteria |
Used to customise the lookup of references or referers through the CascadeManager.
|
| CheckConstraint |
A
CheckConstraint constrains a table or view based on a conditional expression. |
| Column |
Model of a database column.
|
| ColumnConstraint |
Abstract model of a Constraint that constrains Columns in the database.
|
| Constraint |
A
Constraint represents a constraint on a table or view. |
| ConstraintID | Deprecated |
| DatabaseDescriptor<T extends Database> |
Interface used to describe the behaviour of a Database.
|
| DatabaseFactory |
DatabaseFactory is a DBObjectProviderFactory.Creator implementation.
|
| DatabaseFactory.ConnectionCreator |
A connection creator should be registered for each connection store that exists.
|
| DatabaseFactory.ConnectionCreatorFactory |
Provide ConnectionCreatorFactory implementations to provide ConnectionCreators for different stores in the product.
|
| DatabaseFactory.DatabaseCreator |
Plugin to the DatabaseFactory for creating Databases and DatabaseDescriptors.
|
| DatabaseRegistry |
Registry of information about the Database implementations supported by the API.
|
| DBLog |
Log utilities for the core database functionality.
|
| DBObjectChange | Deprecated
- moved to oracle.javatools.db.event.DBObjectChange
|
| DBObjectCriteria<T extends SystemObject> |
A DBObjectCriteria is used when listing objects from a DBObjectProvider to specify the criteria by which the list should be restricted.
|
| DBObjectFactory |
Factory to control the creation of
SchemaObjects and ChildDBObjects which may be based on templates and/or have the initial values of properties defined by PropertyInitializers. |
| DBObjectFilter.IDFilter<T extends DBObject> |
DBObjectFilter implementation that accepts objects with a given ID, optionally performing a strict comparison.
|
| DBObjectIterator |
A class for iterating over owned object lists.
|
| DBObjectListener | Deprecated
- replaced with oracle.javatools.db.event.DBObjectListener
|
| DBObjectLister |
Plugin to DBObjectProvider to allow objects to be listed.
|
| DBObjectLister.ObjectInfo |
Encapsulates the information required about a listed object.
|
| DBObjectProviderAdapter | Deprecated
- moved to
DBObjectProviderListener |
| DBObjectProviderFactory |
Factory class for creating DBObjectProviders.
|
| DBObjectProviderFactory.Creator |
Factory creator class used to create provider instances when there isn't one already in the cache.
|
| DBObjectProviderID |
Immutable class that encapsulates the identifier and type for a DBObjectProvider.
|
| DBUtil |
Utility class associated with the DB package.
|
| Ddl | Deprecated
This was part of a defunct api and has been replaced by
DDL. |
| FileSpecification |
Model of
File Specification properties. |
| FKConstraint |
A
FKConstraint represents a Foreign Key Constraint. |
| Function | Deprecated
use
Function instead |
| GlobalSettings |
Class for api settings that govern the behaviour of the api at a global level.
|
| IdentifierBasedID |
The representation of an Object ID for an object in a provider that can be uniquely identified by an identifier (other than name).
|
| IdentityColumnProperties |
Properties of an Identity Column defining how the values of that column are generated.
|
| IDPolicy |
When a DBObject is copied, the copy can optionally use an IDPolicy.
|
| IDPolicy.DBLinkIDPolicy | |
| IDPolicy.DefaultIDPolicy |
IDPolicy that creates a TemporaryObjectID that does NOT point back to the original object for every object that has an ID.
|
| IDPolicy.SameIDPolicy |
IDPolicy that simply copies the objects ID to the copy.
|
| IDPolicy.TemporaryIDPolicy | Deprecated
moved to TemporaryObjectID.TemporaryIDPolicy
|
| Index |
Model of a database index.
|
| Java |
Abstract SchemaObject implementation for the different Java objects available in a database.
|
| JavaClass |
Model of a Java Class.
|
| JavaResource |
Model of a Java Resource object.
|
| JavaSource |
Model of a Java Source object.
|
| NameBasedID |
ID implementation that is name based.
|
| Package | Deprecated
use
Package instead |
| PKConstraint |
A
PKConstraint represents a Primary Key constraint. |
| PlSql | Deprecated
use
SourceObject instead |
| PlSqlAttribute | Deprecated
use
PlSqlAttribute instead |
| PlSqlMethod | Deprecated
use
PlSqlMethod instead |
| PlSqlParameter | Deprecated
use
PlSqlParameter instead |
| PlSqlSubprogram | Deprecated
use
PlSqlSubProgram instead |
| Procedure | Deprecated
use
Procedure instead |
| ReferenceID |
ID implementation used for a reference property - i.e.
|
| Relation |
A
Relation represents the basic entity of a relational database. |
| Schema |
Model of a database schema.
|
| SchemaObjectIterator |
An Iterator over all the SchemaObjects in a provider, or set of providers.
|
| SchemaObjectManager |
This class is for internal use only.
|
| Sequence |
Model of a database sequence.
|
| SpecPlSql | Deprecated
use
PlSqlSchemaObjectSpec instead |
| Synonym |
Model of a database synonym.
|
| Table |
Model of a database table.
|
| Tablespace |
Model of a Tablespace in a database.
|
| TemplateExpander |
An expander of schema objects that provides the Template support for a DBObjectProvider.
|
| TemporaryObjectID |
Implementation of the DBObjectID interface for objects that only exist in memory.
|
| TemporaryObjectID.CopyBackPolicy |
IDPolicy to use when copying the temp copy of an object back over its original object.
|
| TemporaryObjectID.TemporaryIDPolicy |
IDPolicy that creates a TemporaryObjectID for every object that has the original object set.
|
| Trigger | Deprecated
use
Trigger instead |
| UniqueConstraint |
A
UniqueConstraint prohibits multiple rows from having the same value in the same column or combination of columns but allows some values to be null. |
| View |
Represents a database View.
|
| ViewColumn | Deprecated
just use a simple Column instead
|
| Enum | Description |
|---|---|
| Constraint.DeferrableState | |
| DBUtil.IDQuery |
When querying for reference IDs of an object this enum is used to define whether to query for different kinds of reference.
|
| FileSpecification.FileStatus | |
| FKConstraint.ReferentialAction |
The action to take "ON DELETE" or "ON UPDATE" for a FK (where supported by the underlying Database).
|
| IdentityColumnProperties.GeneratedType |
Defines the condition for when a new value is generated for the column on insert.
|
| Index.IndexType |
Index type
|
| PlSqlMethod.CallSpecLanguage | |
| PlSqlMethod.MethodType | |
| PlSqlParameter.Mode | |
| Table.TableType |
Different types of Table supported in the API.
|
| Tablespace.FileType | |
| Tablespace.TablespaceType |
Different types of Tablespace supported in the API.
|
| Trigger.BaseType |
Base type for the Trigger (i.e.
|
| Trigger.Timing |
Timing of a trigger - at what point relative to the trigger event the trigger's code will be executed.
|
| View.Restriction |
The restriction on the query for this view
|
| Exception | Description |
|---|---|
| CancelledException |
This exception is thrown if a query to the database is cancelled mid-execution by an action of the user/api.
|
| CascadeManager.NoCascadeRequiredException | Deprecated |
| CascadeRequiredException |
Subclass of DBException that is thrown when an attempt to delete or update an object is made when there are dependent objects in the given DBObjectProvider.
|
| DBException |
An Exception that is thrown by a DB model operation.
|
| DBSQLException |
DBException subclass that is thrown when a SQLException is encountered while talking to the database.
|
| InvalidNameException |
ValidationException thrown when an object's name is invalid.
|
| MissingProviderException |
Thrown if you attempt to resolve the ID when the provider has not been set.
|
| NameInUseException |
ValidationException thrown when a name is already in use by an existing object in the DBObjectProvider.
|
| Annotation Type | Description |
|---|---|
| AbstractDBObjectBuilder.PropertyBuilder |
Annotation to mark methods that build components (properties) of a given object within this builder.
|
Schema mySchema = provider.getSchema( "MYSCHEMA" );
String[] tabNames = provider.listObjects( Table.TYPE, mySchema );
String[] tabNames = provider.listObjects( Table.TYPE, mySchema, 'A%' );
SchemaObject[] tabsAndViews = provider.listObjects(
new String[]{ Table.TYPE, View.TYPE },
mySchema );
Table fred = (Table)provider.getObject( Table.TYPE, mySchema, "EMP" );
Table fred = (Table)provider.getObject( Table.TYPE, mySchema, "FRED" ); // make a fresh copy of fred and setup temporary ids Table newFred = fred.copyTo( null, true ); // add a new column Column col = new Column( "NEW_COL" ); DataType dt = provider.getDataType( "NUMBER" ); col.setDataTypeUsage( dt.createDefaultUsage() ); col.setDefault( new Integer( 4 ) ); newFred.addColumn( col ); // update the provider provider.updateObject( fred, newFred );
The database API has its own event/listener model. This is used to listen for new/deleted schemas, new/delete objects and changes to existing objects. The message are all concerned with a SchemaObject not a DBObject (the distinction being a SchemaObject is a "top level" object such as a Table or View, a DBObject that isn't a SchemaObject is a child object such as a Column. Notifications of updates to a Column will come through listening to the owning Table.)
Attach an oracle.javatools.db.DBObjectProviderListener to your provider.
Attach a oracle.javatools.db.SchemaObjectListener to the given object.
Table fred = (Table)provider.getObject( Table.TYPE, mySchema, "FRED" ); fred.addObjectListener( myListener );
then when a the new column is added to fred by the above code the listener's update method is called:
public void schemaObjectUpdated(DBObjectChange change)
{ DBObject changed = change.getDBObject(); if( change.hasNameChanged() ) { // the table has change named ... we must update our own information. } for( final obj : change.getOwnedObjectsAdded() ) { Object obj = newKids.next(); if( obj instanceof Column ) { String name = ( (Column)obj ).getName(); // name is "NEW_COL"!! } } }