Skip navigation links
oracle.javatools.db
Class View
java.lang.Object
oracle.javatools.db.AbstractDBObject
oracle.javatools.db.AbstractBuildableObject
oracle.javatools.db.AbstractSystemObject
oracle.javatools.db.AbstractSchemaObject
oracle.javatools.db.Relation
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
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
|
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.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 |
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
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
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.
Skip navigation links
Copyright © 1997, 2015, Oracle. All rights reserved.