use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class FeatureTestModel method addRequiredSystems.
@Override
public void addRequiredSystems() {
addRequiredSystem(new EmployeeSystem());
addRequiredSystem(new org.eclipse.persistence.testing.models.aggregate.AggregateSystem());
addRequiredSystem(new InheritanceSystem());
addRequiredSystem(new InsuranceSystem());
addRequiredSystem(new OwnershipSystem());
addRequiredSystem(new LegacySystem());
addRequiredSystem(new EventHookSystem());
addRequiredSystem(new ProjectSystem());
addRequiredSystem(new IdentitySystem());
addRequiredSystem(new org.eclipse.persistence.testing.models.collections.CollectionsSystem());
addRequiredSystem(new org.eclipse.persistence.testing.models.mapping.MappingSystem());
addRequiredSystem(new org.eclipse.persistence.testing.models.sequencing.SequenceTestSystem());
addRequiredSystem(new org.eclipse.persistence.testing.tests.queries.report.ReportQuerySystem());
addRequiredSystem(new org.eclipse.persistence.testing.tests.queries.options.QueryOptionSystem());
addRequiredSystem(new org.eclipse.persistence.testing.models.bigbad.BigBadSystem());
addRequiredSystem(new org.eclipse.persistence.testing.models.vehicle.VehicleSystem());
// Force field names to upper case for custom SQL tests on postgres.
if (getSession().getPlatform().isPostgreSQL()) {
getSession().getPlatform().setShouldForceFieldNamesToUpperCase(true);
}
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class JDBCBatchUpdatesTestModel method addForcedRequiredSystems.
@Override
public void addForcedRequiredSystems() {
DatabasePlatform platform = getSession().getPlatform();
wasBatchWriting = platform.usesBatchWriting();
wasJDBCBatchWriting = platform.usesJDBCBatchWriting();
wasParameterBinding = getSession().getLogin().shouldBindAllParameters();
try {
getSession().getLog().write("WARNING, some JDBC drivers may fail BatchUpdates.");
} catch (java.io.IOException e) {
}
platform.setUsesBatchWriting(true);
platform.setUsesJDBCBatchWriting(true);
getSession().getLogin().dontBindAllParameters();
getExecutor().removeConfigureSystem(new EmployeeSystem());
// Force the database to be recreated to ensure the sequences are defined.
addForcedRequiredSystem(new EmployeeSystem());
addForcedRequiredSystem(new OptimisticLockingSystem());
addForcedRequiredSystem(new BarSystem());
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class NativeBatchWritingTestModel method addForcedRequiredSystems.
@Override
public void addForcedRequiredSystems() {
DatabasePlatform platform = getSession().getPlatform();
try {
getSession().getLog().write("WARNING, some JDBC drivers may fail BatchUpdates.");
} catch (java.io.IOException e) {
}
this.usesBinding = platform.shouldBindAllParameters();
if (!platform.isOracle()) {
throw new TestWarningException("Native batch writing is not supported on this database.");
} else {
platform.setUsesBatchWriting(true);
platform.setShouldBindAllParameters(true);
platform.setShouldCacheAllStatements(true);
platform.setUsesJDBCBatchWriting(true);
platform.setUsesNativeBatchWriting(true);
platform.setMaxBatchWritingSize(100);
}
getExecutor().removeConfigureSystem(new EmployeeSystem());
// Force the database to be recreated to ensure the sequences are defined.
addForcedRequiredSystem(new EmployeeSystem());
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class NativeModeCreatorTestModel method addForcedRequiredSystems.
/**
* This sets the table qualifier and native mode.
*/
@Override
public void addForcedRequiredSystems() {
DatabasePlatform platform = getSession().getPlatform();
usesNativeSQL = platform.usesNativeSQL();
defaultSequence = getSession().getLogin().getDefaultSequence();
shouldBindAllParameters = platform.shouldBindAllParameters();
if (platform.isSybase() || platform.isSQLAnywhere() || platform.isOracle() || platform.isSQLServer() || platform.isInformix() || platform.isMySQL() || platform.isDB2() || platform.isTimesTen() || platform.isSymfoware()) {
platform.setUsesNativeSQL(true);
getSession().getLogin().useNativeSequencing();
getDatabaseSession().getSequencingControl().resetSequencing();
}
// We need to disable binding for testing native SQL.
platform.setShouldBindAllParameters(false);
getExecutor().removeConfigureSystem(new EmployeeSystem());
// Force the database to be recreated to ensure the sequences are defined.
addForcedRequiredSystem(new EmployeeNativeModeSystem());
getExecutor().removeConfigureSystem(new InheritanceSystem());
addForcedRequiredSystem(new InheritanceSystem());
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class ParameterizedBatchUpdatesTestModel method addForcedRequiredSystems.
@Override
public void addForcedRequiredSystems() {
DatabasePlatform platform = getSession().getPlatform();
wasBatchWriting = platform.usesBatchWriting();
wasJDBCBatchWriting = platform.usesJDBCBatchWriting();
wasBinding = platform.shouldBindAllParameters();
wasStatementCaching = platform.shouldCacheAllStatements();
try {
getSession().getLog().write("WARNING, some JDBC drivers may fail BatchUpdates.");
} catch (java.io.IOException e) {
}
platform.setUsesBatchWriting(true);
platform.setShouldBindAllParameters(true);
platform.setShouldCacheAllStatements(true);
platform.setUsesJDBCBatchWriting(true);
platform.setMaxBatchWritingSize(100);
getExecutor().removeConfigureSystem(new EmployeeSystem());
// Force the database to be recreated to ensure the sequences are defined.
addForcedRequiredSystem(new EmployeeSystem());
}
Aggregations