|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.db.DBObjectCriteria<T>
public class 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. It is a specialization of a DBObjectFilter, because as well as having a filter's accept
capability, information about each criterion is available (type, name, schema) so that the listing of objects can be done efficiently.
The base class supports the following criteria as they are supported by the fundamentals of the object listing - for example they can be used in the actual dictionary SQL queries against the database.
listObjects
documentation for the specific DBObjectProvider implementation for more information.DBObject.getType()
, DBObject.getName()
, SchemaObject.getSchema()
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface oracle.javatools.db.DBObjectFilter |
---|
DBObjectFilter.IDFilter<T extends DBObject> |
Field Summary | |
---|---|
static java.lang.String |
LIKE_WILDCARD |
static char |
LIKE_WILDCARD_CHAR |
Constructor Summary | |
---|---|
DBObjectCriteria(java.lang.Class<? extends T> clz, java.lang.String... types) Constructs a new criteria object for the given DBObject implementation. |
|
DBObjectCriteria(T obj) Constructs a new criteria object to match the given object by name, type and schema. |
Method Summary | |
---|---|
boolean |
accept(java.lang.String type, Schema schema, java.lang.String name) Tests whether this filter accepts the given values. |
boolean |
accept(T obj) Tests the given object to see if it matches all of the criteria and returns true if it does. |
void |
addFilter(DBObjectFilter<T> filter) Adds an extra filter to this object as an auxillary criterion. |
static DBObjectCriteria<SystemObject> |
createCriteria() Creates a new, blank criteria that isn't tied to a specific SystemObject subclass. |
static DBObjectCriteria<SystemObject> |
createCriteria(java.lang.String[] types, Schema schema, java.lang.String nameLike) Creates a new, blank criteria that isn't tied to a specific SystemObject subclass. |
static DBObjectCriteria<SystemObject> |
createCriteria(java.lang.String type, Schema schema, java.lang.String nameLike) Creates a new, blank criteria that isn't tied to a specific SystemObject subclass. |
static DBObjectCriteria<SystemObject> |
createCriteria(java.lang.String type, java.lang.String schemaName, java.lang.String nameLike) Creates a new, blank criteria that isn't tied to a specific SystemObject subclass. |
java.lang.String |
getNameLike() Gets the criterion for name restriction. |
java.lang.String |
getSchemaName() Gets the schema name criterion. |
java.lang.String[] |
getTypeArray() Gets the criterion for object type as an array of allowed type Strings. |
java.util.Collection<java.lang.String> |
getTypes() Gets the criterion for object type as a list of allowed type Strings. |
boolean |
hasExtraCriteria() Returns true if this criteria has had at least one extra criterion added via the addFilter method. |
boolean |
isAllowedName(java.lang.String name) Tests whether the given name matches the name like criterion. |
boolean |
isAllowedSchema(Schema schema) Tests whether the given schema matches the "schema name" criterion. |
boolean |
isAllowedSchemaName(java.lang.String schemaName) Tests whether the given schema name matches the "schema name" criterion. |
boolean |
isAllowedType(java.lang.String type) Tests if the given type string passes this criterion. |
boolean |
isNameWild() Tests whether the "name like" criterion will accept more than one specific string. |
boolean |
isUserOnly() Gets the value of the "user only" criterion. |
void |
setNameLike(java.lang.String nameLike) Sets the name criterion. |
void |
setSchema(Schema schema) Sets the schema name criterion using a Schema object. |
void |
setSchemaName(java.lang.String name) Sets the schema name criterion. |
void |
setTypes(java.util.Collection<java.lang.String> types) Sets the object types criterion. |
void |
setTypes(java.lang.String... types) Sets the object types criterion. |
void |
setUserOnly(boolean userOnly) Sets the "user only" criterion. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char LIKE_WILDCARD_CHAR
public static final java.lang.String LIKE_WILDCARD
Constructor Detail |
---|
public DBObjectCriteria(T obj) throws java.lang.NullPointerException
obj
- the object that the new criteria will match. Must not be null.java.lang.NullPointerException
- if the object passed in is nullpublic DBObjectCriteria(java.lang.Class<? extends T> clz, java.lang.String... types)
To construct a generic criteria use the static createCriteria
methods.
clz
- the class of object set restrict as a criteria.Method Detail |
---|
public final java.lang.String getNameLike()
public final void setNameLike(java.lang.String nameLike)
nameRef
- the parameter to LIKE for matching an object namegetNameLike()
public final boolean isNameWild()
public final boolean isAllowedName(java.lang.String name)
name
- the name to testpublic final java.util.Collection<java.lang.String> getTypes()
public final java.lang.String[] getTypeArray()
public final boolean isAllowedType(java.lang.String type)
type
- the type to testgetTypes()
public final void setTypes(java.util.Collection<java.lang.String> types)
types
- the allowed object typesgetTypes()
public final void setTypes(java.lang.String... types)
types
- the allowed object typesgetTypes()
public final java.lang.String getSchemaName()
public final void setSchemaName(java.lang.String name)
name
- the schema name for SchemaObjects to match. If null, schema objects from any schema are matched.getSchemaName()
public final void setSchema(Schema schema)
schema
- the schema for SchemaObjects to match. If null, the schema objects will not be restricted by schemagetSchemaName()
public final boolean isAllowedSchema(Schema schema)
schema
- the schema to testpublic final boolean isAllowedSchemaName(java.lang.String schemaName)
schemaName
- the schema name to testpublic final boolean isUserOnly()
public final void setUserOnly(boolean userOnly)
userOnly
- if true, the "user only" criterion will be enforcedpublic boolean accept(java.lang.String type, Schema schema, java.lang.String name)
type
- the object type to testschema
- the schema to testname
- the object name to testpublic boolean accept(T obj)
accept
in interface DBObjectFilter<T extends SystemObject>
obj
- the object to testpublic final void addFilter(DBObjectFilter<T> filter)
filter
- a new filter to check when accept
is called.public final boolean hasExtraCriteria()
addFilter
method.public static DBObjectCriteria<SystemObject> createCriteria()
public static DBObjectCriteria<SystemObject> createCriteria(java.lang.String type, Schema schema, java.lang.String nameLike)
type
- restrict objects by this typeschema
- restrict objects by this schemanameLike
- restrict object by names LIKE
this stringpublic static DBObjectCriteria<SystemObject> createCriteria(java.lang.String type, java.lang.String schemaName, java.lang.String nameLike)
type
- restrict objects by this typeschemaName
- restrict objects by this schemanameLike
- restrict object by names LIKE
this stringpublic static DBObjectCriteria<SystemObject> createCriteria(java.lang.String[] types, Schema schema, java.lang.String nameLike)
types
- restrict objects by these typesschema
- restrict objects by this schemanameLike
- restrict object by names LIKE
this string
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |