use of org.eclipse.persistence.internal.sessions.factories.model.project.ProjectXMLConfig in project eclipselink by eclipse-ee4j.
the class DBWSBuilder method buildOXProjectConfig.
protected ProjectConfig buildOXProjectConfig() {
ProjectConfig oxProjectConfig = null;
boolean useProjectXML = false;
if (builderHelper.hasTables() || hasBuildSqlOperations()) {
useProjectXML = true;
}
if (!useProjectXML) {
// check for any named queries - SimpleXMLFormatProject's sometimes need them
if (orProject.getQueries().size() > 0) {
useProjectXML = true;
} else // check for ObjectRelationalDataTypeDescriptor's - Advanced JDBC object/varray types
if (orProject.getDescriptors().size() > 0) {
Collection<ClassDescriptor> descriptors = orProject.getDescriptors().values();
for (ClassDescriptor desc : descriptors) {
if (desc.isObjectRelationalDataTypeDescriptor()) {
useProjectXML = true;
break;
}
}
}
}
if (useProjectXML) {
oxProjectConfig = new ProjectXMLConfig();
String pathPrefix = packager.getOxProjectPathPrefix();
oxProjectConfig.setProjectString(pathPrefix == null ? DBWS_OX_XML : pathPrefix + DBWS_OX_XML);
} else {
oxProjectConfig = new ProjectClassConfig();
oxProjectConfig.setProjectString(SimpleXMLFormatProject.class.getName());
}
return oxProjectConfig;
}
use of org.eclipse.persistence.internal.sessions.factories.model.project.ProjectXMLConfig in project eclipselink by eclipse-ee4j.
the class DBWSBuilder method buildORProjectConfig.
protected ProjectConfig buildORProjectConfig() {
ProjectConfig orProjectConfig = null;
boolean useProjectXML = false;
if (builderHelper.hasTables() || hasBuildSqlOperations()) {
useProjectXML = true;
}
if (!useProjectXML) {
// check for any named queries - SimpleXMLFormatProject's sometimes need them
if (orProject.getQueries().size() > 0) {
useProjectXML = true;
} else // check for ObjectRelationalDataTypeDescriptor's - Advanced JDBC object/varray types
if (orProject.getDescriptors().size() > 0) {
Collection<ClassDescriptor> descriptors = orProject.getDescriptors().values();
for (ClassDescriptor desc : descriptors) {
if (desc.isObjectRelationalDataTypeDescriptor()) {
useProjectXML = true;
break;
}
}
}
}
if (useProjectXML) {
orProjectConfig = new ProjectXMLConfig();
String pathPrefix = packager.getOrProjectPathPrefix();
orProjectConfig.setProjectString(pathPrefix == null ? DBWS_OR_XML : pathPrefix + DBWS_OR_XML);
} else {
orProjectConfig = new ProjectClassConfig();
orProjectConfig.setProjectString(Project.class.getName());
}
return orProjectConfig;
}
Aggregations