Dependable
, Dependent
, Provider
public final class ViewDescriptor extends UniqueTupleDescriptor implements Dependent, Provider
Modifier and Type | Field | Description |
---|---|---|
private int |
checkOption |
|
private UUID |
compSchemaId |
|
static int |
NO_CHECK_OPTION |
|
private UUID |
uuid |
|
private java.lang.String |
viewName |
|
private java.lang.String |
viewText |
ACTIVATION, ALIAS, COLUMNS_IN_TABLE, COLUMNS_PERMISSION, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PERM, PREPARED_STATEMENT, ROLE_GRANT, ROUTINE_PERMISSION, SCHEMA, SEQUENCE, STORED_PREPARED_STATEMENT, TABLE, TABLE_PERMISSION, TRIGGER, VIEW
Constructor | Description |
---|---|
ViewDescriptor(DataDictionary dataDictionary,
UUID viewID,
java.lang.String viewName,
java.lang.String viewText,
int checkOption,
UUID compSchemaId) |
Constructor for a ViewDescriptor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
drop(LanguageConnectionContext lcc,
SchemaDescriptor sd,
TableDescriptor td) |
Drop this descriptor, if not already done.
|
private void |
drop(LanguageConnectionContext lcc,
SchemaDescriptor sd,
TableDescriptor td,
int action) |
Drop this descriptor, if not already done, due to action.
|
int |
getCheckOptionType() |
Gets an identifier telling what type of check option
is on this view.
|
java.lang.String |
getClassType() |
Get the provider's type.
|
UUID |
getCompSchemaId() |
Get the compilation type schema id when this view
was first bound.
|
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.
|
java.lang.String |
getName() |
|
UUID |
getObjectID() |
Get the provider's UUID
|
java.lang.String |
getObjectName() |
Return the name of this Provider.
|
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,
LanguageConnectionContext lcc) |
Mark the dependent as invalid (due to at least one of
its dependencies being invalid).
|
void |
prepareToInvalidate(Provider p,
int action,
LanguageConnectionContext lcc) |
Prepare to mark the dependent as invalid (due to at least one of
its dependencies being invalid).
|
void |
setUUID(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
|
isPersistent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getColumnDependableFinder, getDataDictionary, getDependableFinder, getDescriptorName, getDescriptorType, isPersistent, setDataDictionary
private final int checkOption
private java.lang.String viewName
private final java.lang.String viewText
private UUID uuid
private final UUID compSchemaId
public static final int NO_CHECK_OPTION
public ViewDescriptor(DataDictionary dataDictionary, UUID viewID, java.lang.String viewName, java.lang.String viewText, int checkOption, UUID compSchemaId)
dataDictionary
- The data dictionary that this descriptor lives inviewID
- The UUID for the viewviewName
- The name of the viewviewText
- The text of the query expression from the view definition.checkOption
- int check option typecompSchemaId
- the schemaid to compile inpublic UUID getUUID()
getUUID
in class UniqueTupleDescriptor
public void setUUID(UUID uuid)
uuid
- The UUID of the view.public java.lang.String getViewText()
public void setViewName(java.lang.String name)
name
- The name of the view.public int getCheckOptionType()
public UUID getCompSchemaId()
public DependableFinder getDependableFinder()
Dependable
getDependableFinder
in interface Dependable
Dependable.getDependableFinder()
public java.lang.String getObjectName()
getObjectName
in interface Dependable
public UUID getObjectID()
getObjectID
in interface Dependable
public java.lang.String getClassType()
getClassType
in interface Dependable
public boolean isValid()
public void prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc) throws StandardException
prepareToInvalidate
in interface Dependent
action
- The action causing the invalidationp
- the providerlcc
- The LanguageConnectionContextStandardException
- thrown if unable to make it invalidpublic void makeInvalid(int action, LanguageConnectionContext lcc) throws StandardException
makeInvalid
in interface Dependent
action
- The action causing the invalidationlcc
- The LanguageConnectionContextStandardException
- thrown if unable to make it invalidpublic java.lang.String toString()
toString
in class java.lang.Object
public void drop(LanguageConnectionContext lcc, SchemaDescriptor sd, TableDescriptor td) throws StandardException
lcc
- current language connection contextsd
- schema descriptortd
- table descriptor for this viewStandardException
- standard error policyprivate void drop(LanguageConnectionContext lcc, SchemaDescriptor sd, TableDescriptor td, int action) throws StandardException
DependencyManager.DROP_VIEW
, the descriptor is
dropped due to dropping some other object, e.g. a table column.lcc
- current language connection contextsd
- schema descriptortd
- table descriptor for this viewaction
- actionStandardException
- standard error policypublic java.lang.String getName()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.