* @param fgmd The Fetch Group
* @return a list of field numbers
*/
private BitSet getFieldsAbsoluteNumberInFetchGroup(FetchGroupMetaData fgmd)
{
BitSet fieldsNumber = new BitSet(0);
for (int i = 0; i < fgmd.getMemberMetaData().length; i++)
{
int fieldNumber = getFieldNumber(cmd, fgmd.getMemberMetaData()[i].getName());
if (fieldNumber == -1)
{
throw new JPOXUserException(LOCALISER.msg("006000",
fgmd.getMemberMetaData()[i].getName(), fgmd.getName(), cmd.getFullClassName())).setFatal();
}
fieldsNumber.set(fieldNumber);
}
// fields in nested fetch-groups
for (int i = 0; i < fgmd.getFetchGroupMetaData().length; i++)
{
String nestedGroupName = fgmd.getFetchGroupMetaData()[i].getName();
if (nestedGroupName.equals(FetchPlan.DEFAULT))
{
setDefaultFieldNumbers(fieldsNumber);
}
else if (nestedGroupName.equals(FetchPlan.ALL))
{
setAllFieldNumbers(fieldsNumber);
}
else if (nestedGroupName.equals(FetchPlan.NONE))
{
setNoneFieldNumbers(fieldsNumber);
}
else
{
FetchGroupMetaData nestedFGMD = getFetchGroupMetaData(cmd,nestedGroupName);
if (nestedFGMD == null)
{
throw new JPOXUserException(LOCALISER.msg("006001",
fgmd.getFetchGroupMetaData()[i].getName(), fgmd.getName(), cmd.getFullClassName())).setFatal();
}
fieldsNumber.or(getFieldsAbsoluteNumberInFetchGroup(nestedFGMD));
}
}
return fieldsNumber;
}