Examples of FetchGroupMetadata


Examples of org.datanucleus.metadata.FetchGroupMetaData

                                fetchPlans[j].setMaxFetchDepth(plans[j].maxFetchDepth());
                                fetchPlans[j].setFetchSize(plans[j].fetchSize());
                                int numGroups = plans[j].fetchGroups().length;
                                for (int k=0;k<numGroups;k++)
                                {
                                    FetchGroupMetaData fgmd = new FetchGroupMetaData(plans[j].fetchGroups()[k]);
                                    fetchPlans[j].addFetchGroup(fgmd);
                                }
                            }
                        }
                        else if (annName.equals(JDOAnnotationUtils.FETCHPLAN))
                        {
                            if (fetchPlans != null)
                            {
                                NucleusLogger.METADATA.warn(LOCALISER.msg("044207", cmd.getFullClassName()));
                            }
                            fetchPlans = new FetchPlanMetaData[1];
                            int maxFetchDepth = ((Integer)annotationValues.get("maxFetchDepth")).intValue();
                            int fetchSize = ((Integer)annotationValues.get("fetchSize")).intValue();
                            fetchPlans[0] = new FetchPlanMetaData((String)annotationValues.get("name"));
                            fetchPlans[0].setMaxFetchDepth(maxFetchDepth);
                            fetchPlans[0].setFetchSize(fetchSize);
                        }
                        else if (annName.equals(JDOAnnotationUtils.FETCHGROUPS))
                        {
                            if (fetchGroups != null)
                            {
                                NucleusLogger.METADATA.warn(LOCALISER.msg("044208", cmd.getFullClassName()));
                            }
                            FetchGroup[] groups = (FetchGroup[])annotationValues.get("value");
                            fetchGroups = new FetchGroupMetaData[groups.length];
                            for (int j=0;j<groups.length;j++)
                            {
                                fetchGroups[j] = new FetchGroupMetaData(groups[j].name());
                                fetchGroups[j].setPostLoad(groups[j].postLoad());
                                int numFields = groups[j].members().length;
                                for (int k=0;k<numFields;k++)
                                {
                                    FieldMetaData fmd = new FieldMetaData(fetchGroups[j],
                                        groups[j].members()[k].name());
                                    fmd.setRecursionDepth(groups[j].members()[k].recursionDepth());
                                    fetchGroups[j].addMember(fmd);
                                }
                                int numGroups = groups[j].fetchGroups().length;
                                for (int k=0;k<numGroups;k++)
                                {
                                    FetchGroupMetaData subgrp = new FetchGroupMetaData(groups[j].fetchGroups()[k]);
                                    fetchGroups[j].addFetchGroup(subgrp);
                                }
                            }
                        }
                        else if (annName.equals(JDOAnnotationUtils.FETCHGROUP))
                        {
                            if (fetchGroups != null)
                            {
                                NucleusLogger.METADATA.warn(LOCALISER.msg("044208", cmd.getFullClassName()));
                            }
                            fetchGroups = new FetchGroupMetaData[1];
                            fetchGroups[0] = new FetchGroupMetaData((String)annotationValues.get("name"));
                            fetchGroups[0].setPostLoad((String)annotationValues.get("postLoad"));
                            Persistent[] fields = (Persistent[])annotationValues.get("members");
                            if (fields != null)
                            {
                                for (int j=0;j<fields.length;j++)
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.queries.FetchGroupMetadata

       
        // Process the fetch group annotations.
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroups.class)) {
            for (Object fetchGroup : (Object[]) getAnnotation(FetchGroups.class).getAttributeArray("value")) {
                processFetchGroup(new FetchGroupMetadata((MetadataAnnotation) fetchGroup, this), fetchGroups);
            }
        }
       
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroup.class)) {
            processFetchGroup(new FetchGroupMetadata(getAnnotation(FetchGroup.class), this), fetchGroups);
        }
       
        // Now process all the fetch groups we found to the descriptor only
        // if weaving is enabled or if the descriptors java class for this
        // accessor implements the FetchGroupTracker interface.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.queries.FetchGroupMetadata

       
        // Process the fetch group annotations.
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroups.class)) {
            for (Object fetchGroup : (Object[]) getAnnotation(FetchGroups.class).getAttributeArray("value")) {
                processFetchGroup(new FetchGroupMetadata((MetadataAnnotation) fetchGroup, this), fetchGroups);
            }
        }
       
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroup.class)) {
            processFetchGroup(new FetchGroupMetadata(getAnnotation(FetchGroup.class), this), fetchGroups);
        }
       
        // Now process all the fetch groups we found to the descriptor only
        // if weaving is enabled or if the descriptors java class for this
        // accessor implements the FetchGroupTracker interface.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.queries.FetchGroupMetadata

       
        // Process the fetch group annotations.
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroups.class)) {
            for (Object fetchGroup : (Object[]) getAnnotation(FetchGroups.class).getAttributeArray("value")) {
                processFetchGroup(new FetchGroupMetadata((MetadataAnnotation) fetchGroup, this), fetchGroups);
            }
        }
       
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroup.class)) {
            processFetchGroup(new FetchGroupMetadata(getAnnotation(FetchGroup.class), this), fetchGroups);
        }
       
        // Now process all the fetch groups we found to the descriptor only
        // if weaving is enabled or if the descriptors java class for this
        // accessor implements the FetchGroupTracker interface.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.queries.FetchGroupMetadata

       
        // Process the fetch group annotations.
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroups.class)) {
            for (Object fetchGroup : (Object[]) getAnnotation(FetchGroups.class).getAttributeArray("value")) {
                processFetchGroup(new FetchGroupMetadata((MetadataAnnotation) fetchGroup, getAccessibleObject()), fetchGroups);
            }
        }
       
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroup.class)) {
            processFetchGroup(new FetchGroupMetadata(getAnnotation(FetchGroup.class), getAccessibleObject()), fetchGroups);
        }
       
        // Now process all the fetch groups we found to the descriptor only
        // if weaving is enabled or if the descriptors java class for this
        // accessor implements the FetchGroupTracker interface.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.queries.FetchGroupMetadata

* @since EclipseLink 2.5.1
*/
public class FetchGroupImpl extends MetadataImpl<FetchGroupMetadata> implements FetchGroup {

    public FetchGroupImpl() {
        super(new FetchGroupMetadata());
       
        getMetadata().setFetchAttributes(new ArrayList<FetchAttributeMetadata>());
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.queries.FetchGroupMetadata

       
        // Process the fetch group annotations.
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroups.class)) {
            for (Object fetchGroup : getAnnotation(FetchGroups.class).getAttributeArray("value")) {
                processFetchGroup(new FetchGroupMetadata((MetadataAnnotation) fetchGroup, this), fetchGroups);
            }
        }
       
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroup.class)) {
            processFetchGroup(new FetchGroupMetadata(getAnnotation(FetchGroup.class), this), fetchGroups);
        }
       
        // Now process all the fetch groups we found to the descriptor only
        // if weaving is enabled or if the descriptors java class for this
        // accessor implements the FetchGroupTracker interface.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.queries.FetchGroupMetadata

       
        // Process the fetch group annotations.
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroups.class)) {
            for (Object fetchGroup : getAnnotation(FetchGroups.class).getAttributeArray("value")) {
                processFetchGroup(new FetchGroupMetadata((MetadataAnnotation) fetchGroup, this), fetchGroups);
            }
        }
       
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroup.class)) {
            processFetchGroup(new FetchGroupMetadata(getAnnotation(FetchGroup.class), this), fetchGroups);
        }
       
        // Now process all the fetch groups we found to the descriptor only
        // if weaving is enabled or if the descriptors java class for this
        // accessor implements the FetchGroupTracker interface.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.queries.FetchGroupMetadata

       
        // Process the fetch group annotations.
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroups.class)) {
            for (Object fetchGroup : (Object[]) getAnnotation(FetchGroups.class).getAttributeArray("value")) {
                processFetchGroup(new FetchGroupMetadata((MetadataAnnotation) fetchGroup, this), fetchGroups);
            }
        }
       
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroup.class)) {
            processFetchGroup(new FetchGroupMetadata(getAnnotation(FetchGroup.class), this), fetchGroups);
        }
       
        // Now process all the fetch groups we found to the descriptor only
        // if weaving is enabled or if the descriptors java class for this
        // accessor implements the FetchGroupTracker interface.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.queries.FetchGroupMetadata

       
        // Process the fetch group annotations.
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroups.class)) {
            for (Object fetchGroup : (Object[]) getAnnotation(FetchGroups.class).getAttributeArray("value")) {
                processFetchGroup(new FetchGroupMetadata((MetadataAnnotation) fetchGroup, getAccessibleObject()), fetchGroups);
            }
        }
       
        // Look for a @FetchGroup.
        if (isAnnotationPresent(FetchGroup.class)) {
            processFetchGroup(new FetchGroupMetadata(getAnnotation(FetchGroup.class), getAccessibleObject()), fetchGroups);
        }
       
        // Now process all the fetch groups we found to the descriptor only
        // if weaving is enabled or if the descriptors java class for this
        // accessor implements the FetchGroupTracker interface.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.