Package org.eclipse.persistence.jaxb

Examples of org.eclipse.persistence.jaxb.Subgraph


    private void createSubgraphs(final org.eclipse.persistence.jaxb.ObjectGraph graph,
                                 final Class<?> entityClass, final Map<String, ObjectGraph> entitySubgraphs) {
        final Set<String> processed = Sets.newHashSet();

        for (final Map.Entry<String, ObjectGraph> entry : entitySubgraphs.entrySet()) {
            final Subgraph subgraph = graph.addSubgraph(entry.getKey());
            final ObjectGraph entityGraph = entry.getValue();

            final Set<String> fields = entityGraph.getFields(entry.getKey());
            if (!fields.isEmpty()) {
                subgraph.addAttributeNodes(fields.toArray(new String[fields.size()]));
            }

            final Map<String, ObjectGraph> subgraphs = entityGraph.getSubgraphs(entry.getKey());
            if (!subgraphs.isEmpty()) {
                final Class<?> subEntityClass = entityGraph.getEntityClass();
View Full Code Here


    }

    private void createSubgraphs(final String parent, final Subgraph graph, final Class<?> entityClass,
                                 final Map<String, ObjectGraph> entitySubgraphs, final Set<String> processed) {
        for (final Map.Entry<String, ObjectGraph> entry : entitySubgraphs.entrySet()) {
            final Subgraph subgraph = graph.addSubgraph(entry.getKey());
            final ObjectGraph entityGraph = entry.getValue();
           
            String path = parent + "." + entry.getKey();

            final Set<String> fields = entityGraph.getFields(path);
            if (!fields.isEmpty()) {
                subgraph.addAttributeNodes(fields.toArray(new String[fields.size()]));
            }

            final Map<String, ObjectGraph> subgraphs = entityGraph.getSubgraphs();
            final Class<?> subEntityClass = entityGraph.getEntityClass();
            final String processedSubgraph = getProcessedSubgraph(entityClass, entry.getKey(), subEntityClass);
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.jaxb.Subgraph

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.