final Element subElement = (Element) iter.next();
final String subElementName = subElement.getName();
final String propertyName = subElement.attributeValue( "name" );
if ( "bag".equals( subElementName ) ) {
BagBinding bagBinding = entityBinding.makeBagAttributeBinding( propertyName );
bindCollection( subElement, bagBinding, entityBinding, PluralAttributeNature.BAG, propertyName );
hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( bagBinding );
attributeBinding = bagBinding;
}
else if ( "idbag".equals( subElementName ) ) {
BagBinding bagBinding = entityBinding.makeBagAttributeBinding( propertyName );
bindCollection( subElement, bagBinding, entityBinding, PluralAttributeNature.BAG, propertyName );
hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( bagBinding );
attributeBinding = bagBinding;
// todo: handle identifier
}
else if ( "set".equals( subElementName ) ) {
BagBinding bagBinding = entityBinding.makeBagAttributeBinding( propertyName );
bindCollection( subElement, bagBinding, entityBinding, PluralAttributeNature.SET, propertyName );
hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( bagBinding );
attributeBinding = bagBinding;
}
else if ( "list".equals( subElementName ) ) {
BagBinding bagBinding = entityBinding.makeBagAttributeBinding( propertyName );
bindCollection( subElement, bagBinding, entityBinding, PluralAttributeNature.LIST, propertyName );
hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( bagBinding );
attributeBinding = bagBinding;
// todo : handle list index
}
else if ( "map".equals( subElementName ) ) {
BagBinding bagBinding = entityBinding.makeBagAttributeBinding( propertyName );
bindCollection( subElement, bagBinding, entityBinding, PluralAttributeNature.MAP, propertyName );
hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( bagBinding );
attributeBinding = bagBinding;
// todo : handle map key
}