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++)