Class ViewImpl
java.lang.Object
org.datanucleus.store.rdbms.table.AbstractTable
org.datanucleus.store.rdbms.table.ViewImpl
- All Implemented Interfaces:
Table
,org.datanucleus.store.schema.table.Table
- Direct Known Subclasses:
ClassView
Representation of a View in a datastore (RDBMS).
-
Field Summary
Fields inherited from class org.datanucleus.store.rdbms.table.AbstractTable
columns, columnsByIdentifier, dba, existsInDatastore, identifier, state, storeMgr, TABLE_STATE_INITIALIZED, TABLE_STATE_INITIALIZED_MODIFIED, TABLE_STATE_NEW, TABLE_STATE_PK_INITIALIZED, TABLE_STATE_VALIDATED
-
Constructor Summary
ConstructorsConstructorDescriptionViewImpl
(DatastoreIdentifier name, RDBMSStoreManager storeMgr) Constructor, taking the table identifier. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addColumnInternal
(Column col) Method to add a Column to the View.Internal method to generate the SQL statements for dropping the view.boolean
validate
(Connection conn, boolean validateColumnStructure, boolean autoCreate, Collection<Throwable> autoCreateErrors) Method to validate the view in the datastore.Methods inherited from class org.datanucleus.store.rdbms.table.AbstractTable
addColumn, allowDDLOutput, assertIsInitialized, assertIsInitializedModified, assertIsPKInitialized, assertIsPKUninitialized, assertIsUninitialized, assertIsValidated, create, drop, equals, executeDdlStatement, executeDdlStatementList, exists, getCatalogName, getClassMetaData, getColumn, getColumnForName, getColumnForPosition, getColumns, getDatastoreIdentifierFullyQualified, getDiscriminatorMetaData, getIdentifier, getMemberColumnMappingForEmbeddedMember, getMemberColumnMappingForMember, getMemberColumnMappings, getName, getNumberOfColumns, getSchemaName, getSQLCreateStatements, getStoreManager, getSurrogateColumn, getSurrogateMapping, getVersionMetaData, hasColumn, hasColumnName, hashCode, isInitialized, isInitializedModified, isPKInitialized, isValidated, postInitialize, preInitialize, tableExistsInDatastore, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.datanucleus.store.rdbms.table.Table
getIdMapping, getMemberMapping, initialize
-
Constructor Details
-
ViewImpl
Constructor, taking the table identifier.- Parameters:
name
- The identifier for the table.storeMgr
- The Store Manager
-
-
Method Details
-
validate
public boolean validate(Connection conn, boolean validateColumnStructure, boolean autoCreate, Collection<Throwable> autoCreateErrors) throws SQLException Method to validate the view in the datastore. Validates the existence of the view, and then the specifications of the Columns.- Parameters:
conn
- The JDBC ConnectionvalidateColumnStructure
- Whether to validate down to column structure, or just their existenceautoCreate
- Whether to update the view to fix errors (not used).autoCreateErrors
- Errors found during the auto-create process- Returns:
- Whether the database was modified
- Throws:
SQLException
- Thrown when an error occurs in the JDBC calls
-
getSQLDropStatements
Internal method to generate the SQL statements for dropping the view.- Specified by:
getSQLDropStatements
in classAbstractTable
- Returns:
- The List of SQL statements.
-
addColumnInternal
Method to add a Column to the View.- Overrides:
addColumnInternal
in classAbstractTable
- Parameters:
col
- The column
-