FieldMapping[] fieldMappings = clsMap.getClassChoice().getFieldMapping();
ClassChoice classChoice = clsMap.getClassChoice(); if (classChoice == null) { classChoice = new ClassChoice(); } FieldMapping[] fieldMappings = classChoice.getFieldMapping();
    public static String[] getIdentityColumnNames (String[] ids, ClassMapping clsMap) {                String[] identityColumnNames = ids;                if (ids == null || ids.length == 0)        {            int identityCount = 0;            FieldMapping[] fieldMappings = clsMap.getClassChoice().getFieldMapping();            for (int i = 0; i < fieldMappings.length; i++)            {                if (fieldMappings[i].getIdentity() == true)                {                    identityCount++;                }            }            if (LOG.isDebugEnabled())            {                LOG.debug("Class " + clsMap.getName() + " has " + identityCount + " identity fields");            }            List identityDescriptorList = new ArrayList();            if (identityCount > 0)            {                for (int i = 0; i < fieldMappings.length; i++)                {                    if (fieldMappings[i].getIdentity() == true)                    {                        identityDescriptorList.add(fieldMappings[i].getName());                    }                }                                Iterator idIter = identityDescriptorList.iterator();                int i = 0;                identityColumnNames = new String[identityDescriptorList.size()];                 while (idIter.hasNext()) {                    identityColumnNames[i] = (String) idIter.next();                    i++;                }            }        }        return identityColumnNames;    }