use of org.eclipse.persistence.sessions.factories.ProjectClassGenerator in project eclipselink by eclipse-ee4j.
the class ProjectClassGeneratorResultFileTest method test.
/**
* test() will do a default generation of a project.
*/
@Override
public void test() {
try {
ProjectClassGenerator generator = new ProjectClassGenerator(project);
generator.generate();
fileName = generator.getOutputFileName();
} catch (Exception exception) {
generationException = exception;
}
}
use of org.eclipse.persistence.sessions.factories.ProjectClassGenerator in project eclipselink by eclipse-ee4j.
the class OptimisticLockingLinesSelectedFieldsLockingPolicyTest method setup.
@Override
protected void setup() {
getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
descriptorToModify = project.getDescriptors().get(Employee.class);
SelectedFieldsLockingPolicy lockingTestPolicy = new SelectedFieldsLockingPolicy();
lockingTestPolicy.addLockFieldName("testField1");
lockingTestPolicy.addLockFieldName("testField2");
descriptorToModify.setOptimisticLockingPolicy(lockingTestPolicy);
generator = new ProjectClassGenerator(project);
}
use of org.eclipse.persistence.sessions.factories.ProjectClassGenerator in project eclipselink by eclipse-ee4j.
the class QueryManagerHasReadObjectQueryIsSQLCallQueryTest method setup.
@Override
protected void setup() {
getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
project = new org.eclipse.persistence.testing.models.employee.relational.EmployeeProject();
descriptorToModify = project.getDescriptors().get(Employee.class);
ReadObjectQuery testReadQuery = new ReadObjectQuery();
SQLCall testCall = new SQLCall();
// setting the SQLCall on ReadObject
testReadQuery.setCall(testCall);
testReadQuery.setSQLString("testString");
descriptorToModify.getQueryManager().setReadObjectQuery(testReadQuery);
generator = new ProjectClassGenerator(project);
}
use of org.eclipse.persistence.sessions.factories.ProjectClassGenerator in project eclipselink by eclipse-ee4j.
the class TimestampLockingPolicyUseLocalTimeTest method setup.
@Override
protected void setup() {
getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
project = new org.eclipse.persistence.testing.models.employee.relational.EmployeeProject();
descriptorToModify = project.getDescriptors().get(Employee.class);
TimestampLockingPolicy lockingTestPolicy = new TimestampLockingPolicy();
lockingTestPolicy.setUsesServerTime(false);
lockingTestPolicy.useLocalTime();
lockingTestPolicy.setWriteLockFieldName("VERSION");
descriptorToModify.setOptimisticLockingPolicy(lockingTestPolicy);
generator = new ProjectClassGenerator(project);
}
use of org.eclipse.persistence.sessions.factories.ProjectClassGenerator in project eclipselink by eclipse-ee4j.
the class GettersAndSettersForProjectClassGeneratorTest method setup.
@Override
protected void setup() {
getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
project = new org.eclipse.persistence.testing.models.employee.relational.EmployeeProject();
generator = new ProjectClassGenerator();
}
Aggregations