use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class DistributedCacheModel method addRequiredSystems.
@Override
public void addRequiredSystems() {
addRequiredSystem(new EmployeeSystem());
addRequiredSystem(new DirectMapMappingsSystem());
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class EmployeeChangeFlagBasicTestModel method addRequiredSystems.
@Override
public void addRequiredSystems() {
addRequiredSystem(new EmployeeSystem());
addRequiredSystem(new CollectionsSystem());
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class MultipleClientBrokersTestModel method createTables.
/**
* This method was created in VisualAge.
*/
public void createTables() {
SessionBroker broker = new SessionBroker();
DatabaseSession session1 = new DatabaseSessionImpl(Server.getLogin1());
DatabaseSession session2 = new DatabaseSessionImpl(Server.getLogin2());
session1.addDescriptors(new EmployeeProject1());
session2.addDescriptors(new EmployeeProject2());
broker.registerSession("broker1", session1);
broker.registerSession("broker2", session2);
broker.setLogLevel(getSession().getLogLevel());
broker.setLog(getSession().getLog());
broker.login();
// Set session for join table.
((ManyToManyMapping) session1.getDescriptor(Employee.class).getObjectBuilder().getMappingForAttributeName("projects")).setSessionName("broker2");
// Disable delete verify.
((OneToOneMapping) session1.getDescriptor(Employee.class).getObjectBuilder().getMappingForAttributeName("address")).setShouldVerifyDelete(false);
org.eclipse.persistence.testing.models.employee.relational.EmployeeTableCreator tables = new org.eclipse.persistence.testing.models.employee.relational.EmployeeTableCreator();
tables.replaceTables(session1);
tables.replaceTables(session2);
tables.dropConstraints(session1);
tables.dropConstraints(session2);
new org.eclipse.persistence.tools.schemaframework.SchemaManager(session1).createSequences();
new org.eclipse.persistence.tools.schemaframework.SchemaManager(session2).createSequences();
new EmployeeSystem().populate(broker);
broker.logout();
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class AutoTableGeneratorBasicTestModel method addForcedRequiredSystems.
/**
* Swap a clean session to ensure only the desired descriptors are loaded.
*/
@Override
public void addForcedRequiredSystems() {
getExecutor().swapCleanDatabaseSession();
// Must clear the employee system as the tables are replaced.
getExecutor().removeConfigureSystem(new EmployeeSystem());
addForcedRequiredSystem(new AutoTableGeneratorEmployeeSystem());
}
use of org.eclipse.persistence.testing.models.employee.relational.EmployeeSystem in project eclipselink by eclipse-ee4j.
the class ClientServerTestModel method addRequiredSystems.
@Override
public void addRequiredSystems() {
try {
getSession().getLog().write("WARNING, some JDBC drivers may fail if they are not thread safe." + Helper.cr() + "JDBC-ODBC will not be run for this test." + Helper.cr() + "Oracle OCI may fail." + Helper.cr() + "DB2 IBM JDBC may fail." + Helper.cr());
getSession().getLog().flush();
} catch (java.io.IOException e) {
}
if (getSession().getLogin().isJDBCODBCBridge()) {
throw new TestWarningException("JDBC-ODBC cannot support concurrent connections.");
}
addRequiredSystem(new EmployeeSystem());
addRequiredSystem(new InsuranceSystem());
addRequiredSystem(new ClientServerEmployeeSystem());
addRequiredSystem(new org.eclipse.persistence.testing.tests.unitofwork.UOWSystem());
}
Aggregations