use of org.eclipse.persistence.testing.models.ownership.OwnershipSystem in project eclipselink by eclipse-ee4j.
the class NativeModeCreatorTestModel method addRequiredSystems.
@Override
public void addRequiredSystems() {
addRequiredSystem(new OwnershipSystem());
addRequiredSystem(new LegacySystem());
addRequiredSystem(new ProjectSystem());
addRequiredSystem(new CollectionsSystem());
addRequiredSystem(new MappingSystem());
addRequiredSystem(new AggregateSystem());
}
use of org.eclipse.persistence.testing.models.ownership.OwnershipSystem in project eclipselink by eclipse-ee4j.
the class NativeModeCreatorTestModel method setup.
/**
* This sets the table qualifier and native mode.
*/
@Override
public void setup() {
getSession().getIdentityMapAccessor().initializeIdentityMaps();
// Set table qualifier for Oracle, assume user name is schema.
if (getSession().getLogin().getPlatform().isOracle()) {
String oldUser = null;
try {
oldUser = getAbstractSession().getAccessor().getConnection().getMetaData().getUserName();
} catch (Exception exception) {
throw new TestErrorException("Meta-data error.", exception);
}
getExecutor().swapCleanDatabaseSession();
getSession().getLogin().setUserName("scott");
getSession().getLogin().setPassword("tiger");
qualifier = getSession().getLogin().getTableQualifier();
getSession().getLogin().setTableQualifier(oldUser);
getDatabaseSession().logout();
DatabaseSession newDBSession = getDatabaseSession();
new EmployeeNativeModeSystem().addDescriptors(newDBSession);
new InheritanceSystem().addDescriptors(newDBSession);
new OwnershipSystem().addDescriptors(newDBSession);
new LegacySystem().addDescriptors(newDBSession);
new ProjectSystem().addDescriptors(newDBSession);
new CollectionsSystem().addDescriptors(newDBSession);
new MappingSystem().addDescriptors(newDBSession);
new AggregateSystem().addDescriptors(newDBSession);
getDatabaseSession().login();
new EmployeeNativeModeSystem().dropTableConstraints(getSession());
new InheritanceSystem().dropTableConstraints(getSession());
}
}
use of org.eclipse.persistence.testing.models.ownership.OwnershipSystem in project eclipselink by eclipse-ee4j.
the class CommitOrderTest method test.
@Override
public void test() {
getSession().getProject().setDescriptors(new HashMap<>());
((DatabaseSession) getSession()).logout();
((DatabaseSession) getSession()).login();
new EmployeeSystem().addDescriptors(getDatabaseSession());
orderAResults = getCommitOrderListAsString(getAbstractSession().getCommitManager().getCommitOrder());
getSession().getProject().setDescriptors(new HashMap<>());
((DatabaseSession) getSession()).logout();
((DatabaseSession) getSession()).login();
new InsuranceSystem().addDescriptors(getDatabaseSession());
orderBResults = getCommitOrderListAsString(getAbstractSession().getCommitManager().getCommitOrder());
getSession().getProject().setDescriptors(new HashMap<>());
((DatabaseSession) getSession()).logout();
((DatabaseSession) getSession()).login();
new OwnershipSystem().addDescriptors(getDatabaseSession());
orderCResults = getCommitOrderListAsString(getAbstractSession().getCommitManager().getCommitOrder());
getSession().getProject().setDescriptors(new HashMap<>());
((DatabaseSession) getSession()).logout();
((DatabaseSession) getSession()).login();
new InheritanceSystem().addDescriptors(getDatabaseSession());
orderDResults = getCommitOrderListAsString(getAbstractSession().getCommitManager().getCommitOrder());
}
use of org.eclipse.persistence.testing.models.ownership.OwnershipSystem in project eclipselink by eclipse-ee4j.
the class UnitOfWorkClientSessionTestModel method addRequiredSystems.
@Override
public void addRequiredSystems() {
// H2 has locking issue with multiple connections.
if (getSession().getPlatform().isH2()) {
throw new TestWarningException("H2 has locking issue with multiple connections");
}
addRequiredSystem(new OwnershipSystem());
addRequiredSystem(new IndirectListSystem());
addRequiredSystem(new EmployeeSystem());
addRequiredSystem(new InsuranceSystem());
addRequiredSystem(new MappingSystem());
addRequiredSystem(new UOWSystem());
addRequiredSystem(new InheritanceSystem());
}
Aggregations