login.setDatasourcePlatform(new DOMPlatform()); p.setDatasourceLogin(login); XMLContext context = new XMLContext(p);
login.setDatasourcePlatform(new DOMPlatform()); p.setDatasourceLogin(login); XMLContext context = new XMLContext(p);
login.setDatasourcePlatform(new DOMPlatform()); p.setDatasourceLogin(login);
login.setDatasourcePlatform(new DOMPlatform()); p.setDatasourceLogin(login);
Project p = new EclipseLinkObjectPersistenceRuntimeXMLProject(); XMLLogin xmlLogin = new XMLLogin(); xmlLogin.setDatasourcePlatform(new DOMPlatform()); p.setDatasourceLogin(xmlLogin); if (m_classLoader != null) {
Project p = new EclipseLinkObjectPersistenceRuntimeXMLProject(); XMLLogin xmlLogin = new XMLLogin(); xmlLogin.setDatasourcePlatform(new DOMPlatform()); p.setDatasourceLogin(xmlLogin); if (m_classLoader != null) {
/** * Read a project in the format of an ObjectPersistenceRuntimeXMLProject. * This could include a TopLink 11.1.1 project or a TopLink 10.1.3 project * @param document * @param classLoader * @param opmProject * @return */ public static Project readObjectPersistenceRuntimeFormat(Document document, ClassLoader classLoader, Project opmProject){ XMLLogin xmlLogin = new XMLLogin(); xmlLogin.setDatasourcePlatform(new org.eclipse.persistence.oxm.platform.DOMPlatform()); opmProject.setDatasourceLogin(xmlLogin); // Create the OPM project. if (classLoader != null) { xmlLogin.getDatasourcePlatform().getConversionManager().setLoader(classLoader); } // Marshal OPM format. XMLContext context = new XMLContext(opmProject); context.getSession(Project.class).getEventManager().addListener(new MissingDescriptorListener()); XMLUnmarshaller unmarshaller = context.createUnmarshaller(); Project project = (Project)unmarshaller.unmarshal(document); // Set the project's class loader. if ((classLoader != null) && (project.getDatasourceLogin() != null)) { project.getDatasourceLogin().getDatasourcePlatform().getConversionManager().setLoader(classLoader); } return project; }
/** * Read a project in the format of an ObjectPersistenceRuntimeXMLProject. * This could include a TopLink 11.1.1 project or a TopLink 10.1.3 project * @param document * @param classLoader * @param opmProject * @return */ public static Project readObjectPersistenceRuntimeFormat(Document document, ClassLoader classLoader, Project opmProject){ XMLLogin xmlLogin = new XMLLogin(); xmlLogin.setDatasourcePlatform(new org.eclipse.persistence.oxm.platform.DOMPlatform()); opmProject.setDatasourceLogin(xmlLogin); // Create the OPM project. if (classLoader != null) { xmlLogin.getDatasourcePlatform().getConversionManager().setLoader(classLoader); } // Marshal OPM format. XMLContext context = new XMLContext(opmProject); context.getSession(Project.class).getEventManager().addListener(new MissingDescriptorListener()); XMLUnmarshaller unmarshaller = context.createUnmarshaller(); Project project = (Project)unmarshaller.unmarshal(document); // Set the project's class loader. if ((classLoader != null) && (project.getDatasourceLogin() != null)) { project.getDatasourceLogin().getDatasourcePlatform().getConversionManager().setLoader(classLoader); } return project; }
/** * Read a project in the format of an ObjectPersistenceRuntimeXMLProject. * This could include a TopLink 11.1.1 project or a TopLink 10.1.3 project * @param document * @param classLoader * @param opmProject * @return */ public static Project readObjectPersistenceRuntimeFormat(Document document, ClassLoader classLoader, Project opmProject){ XMLLogin xmlLogin = new XMLLogin(); xmlLogin.setDatasourcePlatform(new org.eclipse.persistence.oxm.platform.DOMPlatform()); opmProject.setDatasourceLogin(xmlLogin); // Create the OPM project. if (classLoader != null) { xmlLogin.getDatasourcePlatform().getConversionManager().setLoader(classLoader); } // Marshal OPM format. XMLContext context = new XMLContext(opmProject); context.getSession(Project.class).getEventManager().addListener(new MissingDescriptorListener()); XMLUnmarshaller unmarshaller = context.createUnmarshaller(); Project project = (Project)unmarshaller.unmarshal(document); // Set the project's class loader. if ((classLoader != null) && (project.getDatasourceLogin() != null)) { project.getDatasourceLogin().getDatasourcePlatform().getConversionManager().setLoader(classLoader); } return project; }
xmlLogin.setDatasourcePlatform(platform); this.setDatasourceLogin(xmlLogin);
xmlLogin.setDatasourcePlatform(platform); this.setDatasourceLogin(xmlLogin);
xmlLogin.setDatasourcePlatform(platform); this.setDatasourceLogin(xmlLogin);
xmlLogin.setDatasourcePlatform(platform); this.setDatasourceLogin(xmlLogin);