Class 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 Detail

      • ViewImpl

        public ViewImpl​(DatastoreIdentifier name,
                        RDBMSStoreManager storeMgr)
        Constructor, taking the table identifier.
        Parameters:
        name - The identifier for the table.
        storeMgr - The Store Manager
    • Method Detail

      • preInitialize

        public void preInitialize​(org.datanucleus.ClassLoaderResolver clr)
        Pre-initialise. For things that must be initialised right after constructor.
        Parameters:
        clr - the ClassLoaderResolver
      • postInitialize

        public void postInitialize​(org.datanucleus.ClassLoaderResolver clr)
        Post initialise. For things that must be set after all classes have been initialised before.
        Parameters:
        clr - the ClassLoaderResolver
      • validate

        public boolean validate​(Connection conn,
                                boolean validateColumnStructure,
                                boolean autoCreate,
                                Collection autoCreateErrors)
                         throws SQLException
        Method to validate the view in the datastore. Validates the existence of the table, 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