tableMapping.setSetMethodName("setTable");
tableMapping.setReferenceClass(TableMetadata.class);
tableMapping.setXPath("orm:table");
descriptor.addMapping(tableMapping);
XMLCompositeCollectionMapping secondaryTablesMapping = new XMLCompositeCollectionMapping();
secondaryTablesMapping.setAttributeName("m_secondaryTables");
secondaryTablesMapping.setGetMethodName("getSecondaryTables");
secondaryTablesMapping.setSetMethodName("setSecondaryTables");
secondaryTablesMapping.setReferenceClass(SecondaryTableMetadata.class);
secondaryTablesMapping.setXPath("orm:secondary-table");
descriptor.addMapping(secondaryTablesMapping);
descriptor.addMapping(getPrimaryKeyJoinColumnMapping());
descriptor.addMapping(getIdClassMapping());
descriptor.addMapping(getPrimaryKeyMapping());
XMLCompositeObjectMapping inheritanceMapping = new XMLCompositeObjectMapping();
inheritanceMapping.setAttributeName("m_inheritance");
inheritanceMapping.setGetMethodName("getInheritance");
inheritanceMapping.setSetMethodName("setInheritance");
inheritanceMapping.setReferenceClass(InheritanceMetadata.class);
inheritanceMapping.setXPath("orm:inheritance");
descriptor.addMapping(inheritanceMapping);
XMLDirectMapping discriminatorValueMapping = new XMLDirectMapping();
discriminatorValueMapping.setAttributeName("m_discriminatorValue");
discriminatorValueMapping.setGetMethodName("getDiscriminatorValue");
discriminatorValueMapping.setSetMethodName("setDiscriminatorValue");
discriminatorValueMapping.setXPath("orm:discriminator-value/text()");
descriptor.addMapping(discriminatorValueMapping);
descriptor.addMapping(getDiscriminatorColumnMapping());
descriptor.addMapping(getOptimisticLockingMapping());
descriptor.addMapping(getCacheMapping());
descriptor.addMapping(getConverterMapping());
descriptor.addMapping(getTypeConverterMapping());
descriptor.addMapping(getObjectTypeConverterMapping());
descriptor.addMapping(getStructConverterMapping());
descriptor.addMapping(getCustomCopyPolicyMapping());
descriptor.addMapping(getInstantiationCopyPolicyMapping());
descriptor.addMapping(getCloneCopyPolicyMapping());
descriptor.addMapping(getSequenceGeneratorMapping());
descriptor.addMapping(getTableGeneratorMapping());
descriptor.addMapping(getNamedQueryMapping());
descriptor.addMapping(getNamedNativeQueryMapping());
descriptor.addMapping(getNamedStoredProcedureQueryMapping());
descriptor.addMapping(getResultSetMappingMapping());
descriptor.addMapping(getExcludeDefaultListenersMapping());
descriptor.addMapping(getExcludeSuperclassListenersMapping());
descriptor.addMapping(getEntityListenersMapping());
descriptor.addMapping(getPrePeristMapping());
descriptor.addMapping(getPostPeristMapping());
descriptor.addMapping(getPreRemoveMapping());
descriptor.addMapping(getPostRemoveMapping());
descriptor.addMapping(getPreUpdateMapping());
descriptor.addMapping(getPostUpdateMapping());
descriptor.addMapping(getPostLoadMapping());
descriptor.addMapping(getPropertiesMapping());
descriptor.addMapping(getAttributeOverrideMapping());
XMLCompositeCollectionMapping associationOverridesMapping = new XMLCompositeCollectionMapping();
associationOverridesMapping.setAttributeName("m_associationOverrides");
associationOverridesMapping.setGetMethodName("getAssociationOverrides");
associationOverridesMapping.setSetMethodName("setAssociationOverrides");
associationOverridesMapping.setReferenceClass(AssociationOverrideMetadata.class);
associationOverridesMapping.setXPath("orm:association-override");
descriptor.addMapping(associationOverridesMapping);
descriptor.addMapping(getAttributesMapping());
XMLDirectMapping nameMapping = new XMLDirectMapping();