/** * INTERNAL: * Either drop from the database directly or write the statement to a file. * Database objects are root level entities such as tables, views, procs, sequences... */ public void createObject(AbstractSession session, Writer schemaWriter) throws EclipseLinkException { if (schemaWriter == null) { this.createOnDatabase(session); } else { this.buildCreationWriter(session, schemaWriter); } }
/** * INTERNAL: * Execute the DDL to create this table. */ public void createOnDatabase(AbstractSession session) throws EclipseLinkException { super.createOnDatabase(session); createIndexOnPrimaryKeyOnDatabase(session); createIndicesOnUniqueKeysOnDatabase(session); }
/** * INTERNAL: * Creates this sequence definition on the database. If it already exists, the method will attempt * to alter it based on what the platform supports. */ public void createOnDatabase(AbstractSession session) throws EclipseLinkException { if (checkIfExist(session)) { if (this.isAlterSupported(session)) { alterOnDatabase(session); } } else { super.createOnDatabase(session); } }
/** * INTERNAL: * Creates this sequence definition on the database. If it already exists, the method will attempt * to alter it based on what the platform supports. */ public void createOnDatabase(AbstractSession session) throws EclipseLinkException { if (checkIfExist(session)) { if (this.isAlterSupported(session)) { alterOnDatabase(session); } } else { super.createOnDatabase(session); } }
/** * INTERNAL: * Creates this sequence definition on the database. If it already exists, the method will attempt * to alter it based on what the platform supports. */ public void createOnDatabase(AbstractSession session) throws EclipseLinkException { if (checkIfExist(session)) { if (this.isAlterSupported(session)) { alterOnDatabase(session); } } else { super.createOnDatabase(session); } }
/** * INTERNAL: * Either drop from the database directly or write the statement to a file. * Database objects are root level entities such as tables, views, procs, sequences... */ public void createObject(AbstractSession session, Writer schemaWriter) throws EclipseLinkException { if (schemaWriter == null) { this.createOnDatabase(session); } else { this.buildCreationWriter(session, schemaWriter); if (shouldCreateVPDCalls(session)) { buildVPDCreationPolicyWriter(session, schemaWriter); buildVPDCreationFunctionWriter(session, schemaWriter); } } }
/** * INTERNAL: * Either drop from the database directly or write the statement to a file. * Database objects are root level entities such as tables, views, procs, sequences... */ public void createObject(AbstractSession session, Writer schemaWriter) throws EclipseLinkException { if (schemaWriter == null) { this.createOnDatabase(session); } else { this.buildCreationWriter(session, schemaWriter); if (shouldCreateVPDCalls(session)) { buildVPDCreationPolicyWriter(session, schemaWriter); buildVPDCreationFunctionWriter(session, schemaWriter); } } }
/** * Use the definition object to create the schema entity on the database. * This is used for creating tables, views, procedures ... etc ... */ public void createObject(DatabaseObjectDefinition databaseObjectDefinition) throws EclipseLinkException { boolean usesBatchWriting = false; if (getSession().getPlatform().usesBatchWriting()) { usesBatchWriting = true; getSession().getPlatform().setUsesBatchWriting(false); } try { if (shouldWriteToDatabase()) { databaseObjectDefinition.createOnDatabase(getSession()); } else { databaseObjectDefinition.createObject(getSession(), createSchemaWriter); if (createSQLFiles){ this.appendToDDLWriter(createSchemaWriter, getSession().getPlatform().getStoredProcedureTerminationToken()); } this.appendToDDLWriter(createSchemaWriter, "\n"); databaseObjectDefinition.postCreateObject(getSession(), createSchemaWriter, createSQLFiles); } } finally { if (usesBatchWriting) { getSession().getPlatform().setUsesBatchWriting(true); } } }
databaseObjectDefinition.createOnDatabase(getSession()); } else {
databaseObjectDefinition.createOnDatabase(getSession()); } else {