Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.iapi.sql.dictionary
Class ViewDescriptor  view ViewDescriptor download ViewDescriptor.java

java.lang.Object
  extended byorg.apache.derby.iapi.sql.dictionary.TupleDescriptor
      extended byorg.apache.derby.iapi.sql.dictionary.ViewDescriptor
All Implemented Interfaces:
org.apache.derby.catalog.Dependable, org.apache.derby.iapi.sql.depend.Dependent, org.apache.derby.iapi.sql.depend.Provider, UniqueTupleDescriptor

public class ViewDescriptor
extends TupleDescriptor
implements UniqueTupleDescriptor, org.apache.derby.iapi.sql.depend.Dependent, org.apache.derby.iapi.sql.depend.Provider

This is the implementation of ViewDescriptor. Users of View descriptors should only use the following methods:

  1. getUUID
  2. setUUID
  3. getViewText
  4. setViewName
  5. getCheckOptionType
  6. getCompSchemaId

Version:
0.1

Field Summary
private  int checkOption
           
private  org.apache.derby.catalog.UUID compSchemaId
           
static int NO_CHECK_OPTION
           
private  org.apache.derby.catalog.UUID uuid
           
private  java.lang.String viewName
           
private  java.lang.String viewText
           
 
Fields inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
COLUMN_LIST, CONGLOMERATE_LIST, CONSTRAINT_LIST, TRIGGER_LIST
 
Fields inherited from interface org.apache.derby.catalog.Dependable
ALIAS, COLUMNS_IN_TABLE, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PREPARED_STATEMENT, SCHEMA, STORED_PREPARED_STATEMENT, TABLE, TRIGGER, VIEW
 
Constructor Summary
ViewDescriptor(DataDictionary dataDictionary, org.apache.derby.catalog.UUID viewID, java.lang.String viewName, java.lang.String viewText, int checkOption, org.apache.derby.catalog.UUID compSchemaId)
          Constructor for a ViewDescriptor.
 
Method Summary
private  void dropViewCascade(org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
          Drops the dependent view as part of a drop table cascade
 void dropViewWork(DataDictionary dd, org.apache.derby.iapi.sql.depend.DependencyManager dm, org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc, org.apache.derby.iapi.store.access.TransactionController tc, SchemaDescriptor sd, TableDescriptor td, boolean cascade)
           
 int getCheckOptionType()
          Gets an identifier telling what type of check option is on this view.
 java.lang.String getClassType()
          Get the provider's type.
 org.apache.derby.catalog.UUID getCompSchemaId()
          Get the compilation type schema id when this view was first bound.
 org.apache.derby.catalog.DependableFinder getDependableFinder()
          Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.
 org.apache.derby.catalog.UUID getObjectID()
          Get the provider's UUID
 java.lang.String getObjectName()
          Return the name of this Provider.
 org.apache.derby.catalog.UUID getUUID()
          Gets the UUID of the view.
 java.lang.String getViewText()
          Gets the text of the view definition.
 boolean isValid()
          Check that all of the dependent's dependencies are valid.
 void makeInvalid(int action, org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
          Mark the dependent as invalid (due to at least one of its dependencies being invalid).
 void makeValid(org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
          Attempt to revalidate the dependent.
 void prepareToInvalidate(org.apache.derby.iapi.sql.depend.Provider p, int action, org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
          Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).
 void setUUID(org.apache.derby.catalog.UUID uuid)
          Sets the UUID of the view.
 void setViewName(java.lang.String name)
          Sets the name of the view.
 java.lang.String toString()
          Prints the contents of the ViewDescriptor
 
Methods inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, getDescriptorName, getDescriptorType, isPersistent, setDataDictionary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.derby.catalog.Dependable
isPersistent
 

Field Detail

checkOption

private int checkOption

viewName

private java.lang.String viewName

viewText

private java.lang.String viewText

uuid

private org.apache.derby.catalog.UUID uuid

compSchemaId

private org.apache.derby.catalog.UUID compSchemaId

NO_CHECK_OPTION

public static final int NO_CHECK_OPTION
See Also:
Constant Field Values
Constructor Detail

ViewDescriptor

public ViewDescriptor(DataDictionary dataDictionary,
                      org.apache.derby.catalog.UUID viewID,
                      java.lang.String viewName,
                      java.lang.String viewText,
                      int checkOption,
                      org.apache.derby.catalog.UUID compSchemaId)
Constructor for a ViewDescriptor.

Method Detail

getUUID

public org.apache.derby.catalog.UUID getUUID()
Gets the UUID of the view.

Specified by:
getUUID in interface UniqueTupleDescriptor

setUUID

public void setUUID(org.apache.derby.catalog.UUID uuid)
Sets the UUID of the view.


getViewText

public java.lang.String getViewText()
Gets the text of the view definition.


setViewName

public void setViewName(java.lang.String name)
Sets the name of the view.


getCheckOptionType

public int getCheckOptionType()
Gets an identifier telling what type of check option is on this view.


getCompSchemaId

public org.apache.derby.catalog.UUID getCompSchemaId()
Get the compilation type schema id when this view was first bound.


getDependableFinder

public org.apache.derby.catalog.DependableFinder getDependableFinder()
Description copied from interface: org.apache.derby.catalog.Dependable
Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.

Specified by:
getDependableFinder in interface org.apache.derby.catalog.Dependable

getObjectName

public java.lang.String getObjectName()
Return the name of this Provider. (Useful for errors.)

Specified by:
getObjectName in interface org.apache.derby.catalog.Dependable

getObjectID

public org.apache.derby.catalog.UUID getObjectID()
Get the provider's UUID

Specified by:
getObjectID in interface org.apache.derby.catalog.Dependable

getClassType

public java.lang.String getClassType()
Get the provider's type.

Specified by:
getClassType in interface org.apache.derby.catalog.Dependable

isValid

public boolean isValid()
Check that all of the dependent's dependencies are valid.

Specified by:
isValid in interface org.apache.derby.iapi.sql.depend.Dependent

prepareToInvalidate

public void prepareToInvalidate(org.apache.derby.iapi.sql.depend.Provider p,
                                int action,
                                org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
                         throws org.apache.derby.iapi.error.StandardException
Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).

Specified by:
prepareToInvalidate in interface org.apache.derby.iapi.sql.depend.Dependent

makeInvalid

public void makeInvalid(int action,
                        org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
                 throws org.apache.derby.iapi.error.StandardException
Mark the dependent as invalid (due to at least one of its dependencies being invalid).

Specified by:
makeInvalid in interface org.apache.derby.iapi.sql.depend.Dependent

makeValid

public void makeValid(org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
               throws org.apache.derby.iapi.error.StandardException
Attempt to revalidate the dependent. For prepared statements, this could go through its dependencies and check that they are up to date; if not, it would recompile the statement. Any failure during this attempt should throw StandardException.unableToRevalidate().

Specified by:
makeValid in interface org.apache.derby.iapi.sql.depend.Dependent

toString

public java.lang.String toString()
Prints the contents of the ViewDescriptor


dropViewCascade

private void dropViewCascade(org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
                      throws org.apache.derby.iapi.error.StandardException
Drops the dependent view as part of a drop table cascade


dropViewWork

public void dropViewWork(DataDictionary dd,
                         org.apache.derby.iapi.sql.depend.DependencyManager dm,
                         org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc,
                         org.apache.derby.iapi.store.access.TransactionController tc,
                         SchemaDescriptor sd,
                         TableDescriptor td,
                         boolean cascade)
                  throws org.apache.derby.iapi.error.StandardException