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

public abstract class ViewImpl extends AbstractTable
Representation of a View in a datastore (RDBMS).
  • Constructor Details

    • ViewImpl

      public ViewImpl(DatastoreIdentifier name, RDBMSStoreManager storeMgr)
      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 Connection
      validateColumnStructure - Whether to validate down to column structure, or just their existence
      autoCreate - 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

      protected List<String> getSQLDropStatements()
      Internal method to generate the SQL statements for dropping the view.
      Specified by:
      getSQLDropStatements in class AbstractTable
      Returns:
      The List of SQL statements.
    • addColumnInternal

      protected void addColumnInternal(Column col)
      Method to add a Column to the View.
      Overrides:
      addColumnInternal in class AbstractTable
      Parameters:
      col - The column