public abstract class DBObjectLister
extends java.lang.Object
Extensions to the API can register DBObjectListers using the
DBObjectRegistry.
If the same DBObjectLister is registered for multiple object types, and
a list query is made against the provider for more than one of those
types, the DBObjectLister should only be called once to list all the
registered types.
| Modifier and Type | Class and Description |
|---|---|
static class |
DBObjectLister.ObjectInfo
Encapsulates the information required about a listed object.
|
| Modifier | Constructor and Description |
|---|---|
protected |
DBObjectLister(DBObjectProvider pro)
Creates a new DBObjectLister.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
If two DBObjectListener implementations are equal, then a list query
for multiple types will be made only once.
|
java.lang.Long |
getExternalTimestamp(SystemObject obj)
Gets the timestamp for the given object from the underlying metadata.
|
protected DBObjectProvider |
getProvider()
Gets the provider we are listing objects for.
|
int |
hashCode()
The default hashCode implementation for DBObjectLister matches the
equals implementation and uses the object's class as the identifier.
|
abstract java.util.Collection<DBObjectLister.ObjectInfo> |
listObjects(DBObjectCriteria criteria)
List the objects that the given criteria has restricted the list to.
|
boolean |
supportsTimestamps(java.lang.String objectType)
Tests whether this lister supports timestamps for the given object
type.
|
protected DBObjectLister(DBObjectProvider pro)
pro - the provider we are listing objects for.protected DBObjectProvider getProvider()
public abstract java.util.Collection<DBObjectLister.ObjectInfo> listObjects(DBObjectCriteria criteria) throws DBException
criteria - use to determine type/name/schema criteria for the listingDBExceptionpublic boolean supportsTimestamps(java.lang.String objectType)
getExternalTimestamp(SystemObject) must also be overridden to
return the timestamp.
In addition the listObjects(oracle.javatools.db.DBObjectCriteria) implementation should include
timestamps for the objects listed.
objectType - the object typepublic java.lang.Long getExternalTimestamp(SystemObject obj) throws DBException
supportsTimestamps(String) returns
true for the object's type.DBExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the other object to comparepublic int hashCode()
hashCode in class java.lang.Objectequals(Object)