/** * Recreate the tables on the database. * This will drop the tables if they exist and recreate them. */ public void replaceTables(DatabaseSession session, SchemaManager schemaManager, boolean createSequenceTables) { replaceTables(session, schemaManager, createSequenceTables, false); }
/** * Recreate the tables on the database. * This will drop the tables if they exist and recreate them. */ public void replaceTables(DatabaseSession session, SchemaManager schemaManager) { replaceTables(session, schemaManager, true, true); }
/** * Recreate the tables on the database. * This will drop the tables if they exist and recreate them. */ public void replaceTables(DatabaseSession session, SchemaManager schemaManager) { replaceTables(session, schemaManager, true, true); }
/** * Recreate the tables on the database. * This will drop the tables if they exist and recreate them. */ public void replaceTables(DatabaseSession session, SchemaManager schemaManager, boolean createSequenceTables) { replaceTables(session, schemaManager, createSequenceTables, false); }
protected void replaceTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session) { replaceTables(session, schemaManager, false, false); }
protected void replaceTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session) { replaceTables(session, schemaManager, false, false); }
/** * Recreate the tables on the database. * This will drop the tables if they exist and recreate them. */ public void replaceTables(DatabaseSession session) { replaceTables(session, new SchemaManager(session)); }
/** * Recreate the tables on the database. * This will drop the tables if they exist and recreate them. */ public void replaceTables(DatabaseSession session) { replaceTables(session, new SchemaManager(session)); }
/** * Recreate the tables on the database. * This will drop the tables if they exist and recreate them. */ public void replaceTables(org.eclipse.persistence.sessions.DatabaseSession session) { replaceTables(session, new SchemaManager(session)); }
/** * Drop and recreate the default table schema for the TopLink project this session associated with. */ public void replaceDefaultTables(boolean keepSequenceTables, boolean generateFKConstraints) throws EclipseLinkException { boolean shouldLogExceptionStackTrace = getSession().getSessionLog().shouldLogExceptionStackTrace(); getSession().getSessionLog().setShouldLogExceptionStackTrace(false); try { TableCreator tableCreator = getDefaultTableCreator(generateFKConstraints); tableCreator.replaceTables(session, this, keepSequenceTables); } catch (DatabaseException exception) { // Ignore error } finally { getSession().getSessionLog().setShouldLogExceptionStackTrace(shouldLogExceptionStackTrace); } }
/** * Drop and recreate the default table schema for the TopLink project this session associated with. */ public void replaceDefaultTables() throws EclipseLinkException { boolean shouldLogExceptionStackTrace = getSession().getSessionLog().shouldLogExceptionStackTrace(); getSession().getSessionLog().setShouldLogExceptionStackTrace(false); try { TableCreator tableCreator = getDefaultTableCreator(true); tableCreator.replaceTables(session, this); } catch (DatabaseException exception) { // Ignore error } finally { getSession().getSessionLog().setShouldLogExceptionStackTrace(shouldLogExceptionStackTrace); } }
/** * Drop and recreate the default table schema for the project this session associated with. */ public void replaceDefaultTables(boolean createSequenceTables, boolean createSequences, boolean generateFKConstraints) throws EclipseLinkException { boolean shouldLogExceptionStackTrace = getSession().getSessionLog().shouldLogExceptionStackTrace(); this.session.getSessionLog().setShouldLogExceptionStackTrace(false); try { TableCreator tableCreator = getDefaultTableCreator(generateFKConstraints); tableCreator.replaceTables(this.session, this, createSequenceTables, createSequences); // Drop all the database schemas now if set to do so. This must be // called after all the constraints, tables etc. are dropped. dropDatabaseSchemas(); } catch (DatabaseException exception) { // Ignore error } finally { this.session.getSessionLog().setShouldLogExceptionStackTrace(shouldLogExceptionStackTrace); } // Reset database change events to new tables. if (this.session.getDatabaseEventListener() != null) { this.session.getDatabaseEventListener().remove(this.session); this.session.getDatabaseEventListener().register(this.session); } }
/** * Drop and recreate the default table schema for the project this session associated with. */ public void replaceDefaultTables(boolean createSequenceTables, boolean createSequences, boolean generateFKConstraints) throws EclipseLinkException { boolean shouldLogExceptionStackTrace = getSession().getSessionLog().shouldLogExceptionStackTrace(); this.session.getSessionLog().setShouldLogExceptionStackTrace(false); try { TableCreator tableCreator = getDefaultTableCreator(generateFKConstraints); tableCreator.replaceTables(this.session, this, createSequenceTables, createSequences); // Drop all the database schemas now if set to do so. This must be // called after all the constraints, tables etc. are dropped. dropDatabaseSchemas(); } catch (DatabaseException exception) { // Ignore error } finally { this.session.getSessionLog().setShouldLogExceptionStackTrace(shouldLogExceptionStackTrace); } // Reset database change events to new tables. if (this.session.getDatabaseEventListener() != null) { this.session.getDatabaseEventListener().remove(this.session); this.session.getDatabaseEventListener().register(this.session); } }