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

E13403-03

oracle.javatools.db
Class View

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractBuildableObject
          extended by oracle.javatools.db.AbstractSchemaObject
              extended by oracle.javatools.db.Relation
                  extended by oracle.javatools.db.View
All Implemented Interfaces:
DBObject, SchemaObject, SQLQueryOwner, SystemObject, Copyable, DynamicPropertySet

public class View
extends Relation
implements SQLQueryOwner

Represents a database View. Both declarative and non-declarative views are supported - the difference being their SQLQuery object (which is either just a wrapper for text, or a full parse tree depending on whether we can support the view syntax).

Since:
9.0.5

Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport
 
Field Summary
static java.lang.String CHECK_OPTION
           
static java.lang.String READ_ONLY
           
static java.lang.String TYPE
           
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
View()
          Creates a new View.
View(java.lang.String name, Schema schema)
          Constructs a new View in the specified schema with the specified name.
 
Method Summary
 DBObject copyTo(DBObject target, DBObject copyParent, IDPolicy idPolicy)
          Internal copy method used by the API to perform copy operations.
protected  void copyToImpl(View copy, DBObject copyParent, IDPolicy idPolicy)
           
 boolean equals(java.lang.Object target)
           
protected  boolean equalsImpl(View target)
           
protected  void getOwnedObjectsImpl(java.util.Collection<DBObject> objs, java.lang.String... types)
          Implementation first checks that the object has been built - then returns the collection from suprt.getOwnedObjectsImpl().
 java.lang.String getQueryRestriction()
          Gets the query restriction for this view.
 SQLQuery getSQLQuery()
          Returns this view's query.
 java.lang.String getType()
          Returns the type of this object.
 java.lang.String getViewText()
          Convinience method that returns the view's query in text format.
 boolean isDeclarative()
          Convinience method to check whether this view has a declarative query.
 boolean isForceOnCreate()
          Returns true if this view should include the FORCE option on create.
 void setForceOnCreate(boolean force)
          Sets whether this view should include the FORCE option on create.
 void setQueryRestriction(java.lang.String restriction)
          Sets the query restriction for this view.
 void setSQLQuery(SQLQuery query)
          Sets this view's query.
 void setViewText(java.lang.String text)
          Convinience method that sets the view's query to a NonDeclarativeSQLQuery from the given text.
 
Methods inherited from class oracle.javatools.db.Relation
addColumn, addColumn, addConstraint, getColumn, getColumns, getConstraint, getConstraints, removeColumn, removeConstraint, setColumns, setConstraints
 
Methods inherited from class oracle.javatools.db.AbstractSchemaObject
addObjectListener, copyToImpl, equalsImpl, getParent, getSchema, removeObjectListener, setSchema
 
Methods inherited from class oracle.javatools.db.AbstractBuildableObject
addObjectListener, checkInit, checkInit, checkInitEx, copyToImpl, equalsImpl, fireObjectUpdated, getProperties, getProperty, getProperty, getReferenceIDsImpl, needsInitialization, removeObjectListener, setProperties, setProperty
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyToImpl, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.javatools.db.DBObject
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getReferenceIDs, replaceReferenceIDs, setID, setName
 
Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, getProperty, setProperties, setProperty
 
Methods inherited from interface oracle.javatools.db.SystemObject
addObjectListener, fireObjectUpdated, removeObjectListener
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

READ_ONLY

public static final java.lang.String READ_ONLY
See Also:
Constant Field Values

CHECK_OPTION

public static final java.lang.String CHECK_OPTION
See Also:
Constant Field Values
Constructor Detail

View

public View()
Creates a new View.


View

public View(java.lang.String name,
            Schema schema)
Constructs a new View in the specified schema with the specified name.

Parameters:
name - a string containing the name of the view
schema - the schema containing the view
Method Detail

copyTo

public DBObject copyTo(DBObject target,
                       DBObject copyParent,
                       IDPolicy idPolicy)
Description copied from class: AbstractDBObject
Internal copy method used by the API to perform copy operations. All objects must implement this method if they are instantiable objects. Abstract objects (e.g. Relation) must NOT implement this method. The implementation should delegate to the copyToImpl method to copy the actual properties.

This method does not fix internal reference ids on copy. That is done by the calling DBObject.copyTo(DBObject, IDPolicy) method.

Specified by:
copyTo in class AbstractDBObject
See Also:
DBObject.copyTo(java.lang.Object), DBObject.copyTo(DBObject, boolean), AbstractDBObject.copyToImpl(oracle.javatools.db.AbstractDBObject, oracle.javatools.db.DBObject, oracle.javatools.db.IDPolicy)

copyToImpl

protected void copyToImpl(View copy,
                          DBObject copyParent,
                          IDPolicy idPolicy)

equals

public boolean equals(java.lang.Object target)
Overrides:
equals in class java.lang.Object

equalsImpl

protected boolean equalsImpl(View target)

getViewText

public java.lang.String getViewText()
Convinience method that returns the view's query in text format.


setViewText

public void setViewText(java.lang.String text)
Convinience method that sets the view's query to a NonDeclarativeSQLQuery from the given text.


getSQLQuery

public SQLQuery getSQLQuery()
Returns this view's query.

Specified by:
getSQLQuery in interface SQLQueryOwner

setSQLQuery

public void setSQLQuery(SQLQuery query)
Sets this view's query.

Specified by:
setSQLQuery in interface SQLQueryOwner

isDeclarative

public boolean isDeclarative()
Convinience method to check whether this view has a declarative query.

Specified by:
isDeclarative in interface SQLQueryOwner

getType

public java.lang.String getType()
Description copied from interface: DBObject
Returns the type of this object. Valid types include things like tables, views, synonyms, and columns.

Specified by:
getType in interface DBObject
Returns:
a string describing the type of object.

getOwnedObjectsImpl

protected void getOwnedObjectsImpl(java.util.Collection<DBObject> objs,
                                   java.lang.String... types)
Description copied from class: AbstractBuildableObject
Implementation first checks that the object has been built - then returns the collection from suprt.getOwnedObjectsImpl(). All overrides must call this first to ensure the object has been built.

Overrides:
getOwnedObjectsImpl in class Relation
Parameters:
objs - a Collection of the apppropriate children.
types - a vararg of the type(s) to search for
See Also:
AbstractDBObject.includesType(java.lang.String, java.lang.String...)

getQueryRestriction

public java.lang.String getQueryRestriction()
Gets the query restriction for this view. Can be null, READ_ONLY or CHECK_OPTION.


setQueryRestriction

public void setQueryRestriction(java.lang.String restriction)
Sets the query restriction for this view. Can be null, READ_ONLY or CHECK_OPTION.


isForceOnCreate

public boolean isForceOnCreate()
Returns true if this view should include the FORCE option on create.


setForceOnCreate

public void setForceOnCreate(boolean force)
Sets whether this view should include the FORCE option on create.


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

E13403-03

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