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

E13403-07

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.AbstractSystemObject
              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
          Allowed value for the "query restriction" property.
static java.lang.String READ_ONLY
          Allowed value for the "query restriction" property.
static java.lang.String TYPE
           
 
Fields inherited from class oracle.javatools.db.AbstractSystemObject
m_listeners
 
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
 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, getOwnedObjectsImpl, removeColumn, removeConstraint, setColumns, setConstraints
 
Methods inherited from class oracle.javatools.db.AbstractSchemaObject
addObjectListener, copyToImpl, equalsImpl, getProperty, getSchema, removeObjectListener, setProperty, setSchema
 
Methods inherited from class oracle.javatools.db.AbstractSystemObject
addObjectListener, fireObjectUpdated, getParent, removeObjectListener
 
Methods inherited from class oracle.javatools.db.AbstractBuildableObject
checkInit, checkInit, getProperties, getReferenceIDsImpl, needsInitialization
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, 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
Allowed value for the "query restriction" property.

See Also:
getQueryRestriction(), setQueryRestriction(java.lang.String), Constant Field Values

CHECK_OPTION

public static final java.lang.String CHECK_OPTION
Allowed value for the "query restriction" property.

See Also:
getQueryRestriction(), setQueryRestriction(java.lang.String), 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

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.

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.6.0)

E13403-07

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