Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*******************************************************************************
* Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* bdoughan - Jan 27/2009 - 1.1 - Initial implementation
******************************************************************************/
package org.eclipse.persistence.sdo.helper.jaxb;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBContext;
import javax.xml.namespace.QName;
import org.eclipse.persistence.exceptions.SDOException;
import org.eclipse.persistence.internal.helper.IdentityWeakHashMap;
import org.eclipse.persistence.internal.oxm.XPathFragment;
import org.eclipse.persistence.oxm.XMLDescriptor;
import org.eclipse.persistence.oxm.schema.XMLSchemaReference;
import org.eclipse.persistence.sdo.SDODataObject;
import org.eclipse.persistence.sdo.SDOType;
import org.eclipse.persistence.sdo.helper.SDOCopyHelper;
import org.eclipse.persistence.sdo.helper.SDODataHelper;
import org.eclipse.persistence.sdo.helper.SDOEqualityHelper;
import org.eclipse.persistence.sdo.helper.SDOHelperContext;
import org.eclipse.persistence.sdo.helper.delegates.SDOTypeHelperDelegate;
import org.eclipse.persistence.sdo.helper.delegates.SDOXSDHelperDelegate;
import commonj.sdo.DataObject;
import commonj.sdo.Property;
import commonj.sdo.Type;
/**
*
The JAXBHelperContext is a bridge between POJOs and SDO DataObjects. The bridge
* is based on their corresponding XML representations. For the POJOs the XML
* representation is specified using JAXB annotations or object-to-XML mappings.
*
*
The following steps are required to create the JAXBHelperContext. The XML schema
* used in step #3 is the same one that the POJOs are mapped to. This step has been
* separated so that SDO annotations could be added to the XML schema.
*
* Of course the POJOs may be JPA entities. Below is an example of wrapping the
* results of a JPA query.
*
* EntityManagerFactory emf = Persistence.createEntityManagerFactory("CustomerExample");
* EntityManager em = emf.createEntityManager();
* List entities = em.createQuery("SELECT e FROM MyEntity e WHERE ...").getResultList();
* List dataObjects = hc.wrap(entities);
*
*
*/
public class JAXBHelperContext extends SDOHelperContext {
private org.eclipse.persistence.jaxb.JAXBContext jaxbContext;
private Map