Extension SDK 9.0.5

oracle.jdeveloper.cm.ds.db
Interface DBObjectBuilder

All Known Implementing Classes:
AbstractDBObjectBuilder

public interface DBObjectBuilder

The DBObjectBuilder interface provides a mechanism for constructing new instances representing database objects. A given DBObjectBuilder is associated with a specific type of object - tables, for example.

A DBObjectProvider can use a DBObjectBuilder to construct data model instances without needing to know how the data model is being determined. For example, a generic JDBC implementation of DBObjectBuilder for tables could use the information from DatabaseMetaData to create the model; an Oracle specific DBObjectBuilder could query the data dictionary directly; and an offline DBObjectBuilder could convert an XML file into the table data model.

See Also:
DBObjectProvider

Method Summary
 SchemaObject buildObject(DBObjectID id)
          Builds a new SchemaObject instance, using the specified ID.
 SchemaObject buildObject(Schema schema, java.lang.String name)
          Builds a new SchemaObject instance.
 java.lang.String getObjectType()
          Retrieves the type of object that this DBObjectBuilder instance creates.
 java.lang.Long getTimestamp(Schema schema, java.lang.String name)
          Retrieves the the timestamp for this object.
 java.lang.String[] listObjects(Schema schema, java.lang.String ref)
          Lists the names of the objects that can be provided by this builder.
 

Method Detail

getObjectType

public java.lang.String getObjectType()
Retrieves the type of object that this DBObjectBuilder instance creates.

Returns:
a string specifying the object type supported
See Also:
DBObject.getType()

listObjects

public java.lang.String[] listObjects(Schema schema,
                                      java.lang.String ref)
                               throws DBException
Lists the names of the objects that can be provided by this builder.

Parameters:
schema - the schema to look for objects in
ref - a string containing a pattern that can used to match names; a ref of null indicates that all objects should be returned
Returns:
an array of object names
Throws:
DBException - if an error is encountered getting the list

buildObject

public SchemaObject buildObject(Schema schema,
                                java.lang.String name)
                         throws DBException
Builds a new SchemaObject instance. A given DBObjectBuilder instance works with a specific type of SchemaObject; all SchemaObject instances created by a DBObjectBuilder will be of the same type.

Parameters:
schema - the schema containing the object
name - a string specifying the name of the new object
Returns:
a new SchemaObject instance representing the requested object, or null if no such object can be built
Throws:
DBException - if an error is encountered creating the object

buildObject

public SchemaObject buildObject(DBObjectID id)
                         throws DBException
Builds a new SchemaObject instance, using the specified ID.

Parameters:
id - the ID associated with the new instance
Returns:
a new SchemaObject instance representing the requested object, or null if no such object can be built
Throws:
DBException - if an error is encountered creating the object

getTimestamp

public java.lang.Long getTimestamp(Schema schema,
                                   java.lang.String name)
                            throws DBException
Retrieves the the timestamp for this object. The timestamp should reflect the last time the metadata for this object was modified. If the particular implementation does not support timestamps, then null should be returned.

Parameters:
schema - The Schema containing the object
name - The name of the object
Returns:
The timestamp for the object, or null if this implementation does not support timestamps
Throws:
DBException - if an error is encountered retrieving the timestamp

Extension SDK

 

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