/** * INTERNAL: * Execute the DDL to drop the object. Either directly from the database * of write out the statement to a file. */ public void dropObject(AbstractSession session, Writer schemaWriter, boolean createSQLFiles) throws EclipseLinkException { if (schemaWriter == null) { this.dropFromDatabase(session); } else { buildDeletionWriter(session, schemaWriter); } }
/** * INTERNAL: * Execute the DDL to drop the table. */ public void dropFromDatabase(AbstractSession session) throws EclipseLinkException { // first drop indices on table's primary and unique keys (if required) dropIndicesOnUniqueKeysOnDatabase(session); dropIndexOnPrimaryKeyOnDatabase(session); super.dropFromDatabase(session); }
/** * INTERNAL: * Execute the DDL to drop the object. Either directly from the database * of write out the statement to a file. */ public void dropObject(AbstractSession session, Writer schemaWriter, boolean createSQLFiles) throws EclipseLinkException { if (schemaWriter == null) { this.dropFromDatabase(session); } else { buildDeletionWriter(session, schemaWriter); if (shouldCreateVPDCalls(session)) { buildVPDDeletionWriter(session, schemaWriter); } } }
/** * INTERNAL: * Execute the DDL to drop the object. Either directly from the database * of write out the statement to a file. */ public void dropObject(AbstractSession session, Writer schemaWriter, boolean createSQLFiles) throws EclipseLinkException { if (schemaWriter == null) { this.dropFromDatabase(session); } else { buildDeletionWriter(session, schemaWriter); if (shouldCreateVPDCalls(session)) { buildVPDDeletionWriter(session, schemaWriter); } } }
/** * Use the definition object to drop the schema entity from the database. * This is used for dropping tables, views, procedures ... etc ... */ public void dropObject(DatabaseObjectDefinition databaseObjectDefinition) throws EclipseLinkException { boolean usesBatchWriting = false; if (getSession().getPlatform().usesBatchWriting()) { usesBatchWriting = true; getSession().getPlatform().setUsesBatchWriting(false); } try { if (shouldWriteToDatabase()) { // drop actual object databaseObjectDefinition.dropFromDatabase(getSession()); } else { Writer dropSchemaWriter = getDropSchemaWriter(); // drop actual object databaseObjectDefinition.dropObject(getSession(), dropSchemaWriter, createSQLFiles); if (createSQLFiles){ this.appendToDDLWriter(dropSchemaWriter, getSession().getPlatform().getStoredProcedureTerminationToken()); } this.appendToDDLWriter(dropSchemaWriter, "\n"); } } finally { if (usesBatchWriting) { getSession().getPlatform().setUsesBatchWriting(true); } } }
if (shouldWriteToDatabase()) { databaseObjectDefinition.dropFromDatabase(getSession()); } else { Writer dropSchemaWriter = getDropSchemaWriter();
if (shouldWriteToDatabase()) { databaseObjectDefinition.dropFromDatabase(getSession()); } else { Writer dropSchemaWriter = getDropSchemaWriter();