void createForeignConstraints(TableDefinition tableDefinition) throws EclipseLinkException { if (shouldWriteToDatabase()) { tableDefinition.createForeignConstraintsOnDatabase(getSession()); } else { tableDefinition.setCreateSQLFiles(createSQLFiles); tableDefinition.createForeignConstraints(getSession(), createSchemaWriter); } }
void createUniqueConstraints(TableDefinition tableDefinition) throws EclipseLinkException { if (shouldWriteToDatabase()) { tableDefinition.createUniqueConstraintsOnDatabase(getSession()); } else { tableDefinition.setCreateSQLFiles(createSQLFiles); tableDefinition.createUniqueConstraints(getSession(), createSchemaWriter); } }
/** * Create or extend the tables on the database. * This will alter existing tables to add missing fields or create the table otherwise. * It will also create Sequences tables and objects. */ public void extendTables(DatabaseSession session, SchemaManager schemaManager) { extendTablesAndConstraints(schemaManager, session); schemaManager.createOrReplaceSequences(true, true); }
/** * The output arguments are used to get values back from the proc. */ public void addOutputArgument(String argumentName, Class type) { addOutputArgument(new FieldDefinition(argumentName, type)); }
/** * PUBLIC: * Add the field to the table, default sizes are used. * @param type is the Java class type corresponding to the database type. */ public void addField(String fieldName, Class type) { this.addField(new FieldDefinition(fieldName, type)); }
/** * The arguments are the names of the parameters to the procedure. */ public void addArgument(String argumentName, Class type, int size) { addArgument(new FieldDefinition(argumentName, type, size)); }
/** * PUBLIC: * Add the field to the type. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type, int fieldSize) { this.addField(new FieldDefinition(fieldName, type, fieldSize)); }
/** * Create constraints. */ public void createConstraints(DatabaseSession session) { //CR2612669 createConstraints(session, new SchemaManager(session)); }
/** * Drop the tables from the database. */ public void dropTables(DatabaseSession session) { //CR2612669 dropTables(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, SchemaManager schemaManager) { replaceTablesAndConstraints(schemaManager, session); schemaManager.createSequences(); }
/** * INTERNAL: * builds the field names based on the type read in from the builder */ public void buildFieldTypes(TableDefinition tableDef) { tableDef.buildFieldTypes(getSession()); }
/** * The output arguments are used to get values back from the proc. */ public void addInOutputArgument(String argumentName, Class type) { addInOutputArgument(new FieldDefinition(argumentName, type)); }
void createForeignConstraints(TableDefinition tableDefinition) throws EclipseLinkException { if (shouldWriteToDatabase()) { tableDefinition.createForeignConstraintsOnDatabase(getSession()); } else { tableDefinition.setCreateSQLFiles(createSQLFiles); tableDefinition.createForeignConstraints(getSession(), createSchemaWriter); } }
/** * The output arguments are used to get values back from the proc. */ public void addOutputArgument(String argumentName, Class type) { addOutputArgument(new FieldDefinition(argumentName, type)); }
/** * PUBLIC: * Add the field to the table. * @param type is the Java class type corresponding to the database type. */ public void addField(String fieldName, Class type, int fieldSize, int fieldSubSize) { this.addField(new FieldDefinition(fieldName, type, fieldSize, fieldSubSize)); }
/** * The arguments are the names of the parameters to the procedure. */ public void addArgument(String argumentName, Class type) { addArgument(new FieldDefinition(argumentName, type)); }
/** * PUBLIC: * Add the field to the type. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type, int fieldSize, int fieldSubSize) { this.addField(new FieldDefinition(fieldName, type, fieldSize, fieldSubSize)); }
void createForeignConstraints(TableDefinition tableDefinition) throws EclipseLinkException { if (shouldWriteToDatabase()) { tableDefinition.createForeignConstraintsOnDatabase(getSession()); } else { tableDefinition.setCreateSQLFiles(createSQLFiles); tableDefinition.createForeignConstraints(getSession(), createSchemaWriter); } }
/** * The output arguments are used to get values back from the proc. */ public void addOutputArgument(String argumentName, Class type) { addOutputArgument(new FieldDefinition(argumentName, type)); }
/** * PUBLIC: * Add the field to the table, default sizes are used. * @param type is the Java class type corresponding to the database type. */ public void addField(String fieldName, Class type) { this.addField(new FieldDefinition(fieldName, type)); }