//Iterate over the ORM descriptors and check for matching OXM descriptors
Iterator ormDescriptors = ormSession.getDescriptors().values().iterator();
while(ormDescriptors.hasNext()) {
ClassDescriptor ormDescriptor = (ClassDescriptor)ormDescriptors.next();
Class javaClass = ormDescriptor.getJavaClass();
AbstractSession oxmSession = null;
try {
oxmSession = this.getSession(javaClass);
} catch(XMLMarshalException ex) {
//if we couldn't find a session for this class, we
//don't have an OX descriptor for it.
}
if(oxmSession != null) {
ClassDescriptor oxmDescriptor = oxmSession.getDescriptor(javaClass);
//If we have an oxmDescriptor for this ORM descriptor, iterate over
//mappings, and update the required OXM mappings attribute accessors
Iterator<DatabaseMapping> ormMappings = ormDescriptor.getMappings().iterator();
while(ormMappings.hasNext()) {
DatabaseMapping ormMapping = ormMappings.next();