xmlRootElementClass = Class.forName("javax.xml.bind.annotation.XmlRootElement");
} catch (Exception e) {
}
int unique = 0;
DBIdentifier sSecondary = DBIdentifier.NULL;
for (int i = 0; i < pcols.length; i++) {
if (cols.size() > i)
setupColumn((Column) cols.get(i), pcols[i], delimit());
else {
if (cols.isEmpty())
cols = new ArrayList<Column>(pcols.length);
cols.add(newColumn(pcols[i], delimit()));
}
if (xmlRootElementClass != null
&& StringUtils.isEmpty(pcols[i].columnDefinition())
&& (AccessController.doPrivileged(J2DoPrivHelper
.isAnnotationPresentAction(fm.getDeclaredType(),
xmlRootElementClass))).booleanValue()) {
DBDictionary dict = ((MappingRepository) getRepository())
.getDBDictionary();
if (dict.supportsXMLColumn)
// column maps to xml type
((Column) cols.get(i)).setTypeIdentifier(DBIdentifier.newColumnDefinition(dict.xmlTypeName));
}
unique |= (pcols[i].unique()) ? TRUE : FALSE;
DBIdentifier sSecTable = DBIdentifier.newTable(pcols[i].table(), delimit());
sSecondary = trackSecondaryTable(fm, sSecondary, sSecTable, i);
}
if (fm.isElementCollection())
setColumns(fm, fm.getElementMapping().getValueInfo(), cols, unique);