public HbmPluralAttributeDomainState( MappingDefaults defaults, XMLBagElement collection, Map<String, MetaAttribute> entityMetaAttributes, Attribute attribute) { super( defaults, attribute, collection.getNode(), HbmHelper.extractMetas(collection.getMeta(), entityMetaAttributes), HbmHelper.getPropertyAccessorName( collection.getAccess(), collection.isEmbedXml(), defaults.getDefaultAccess()), collection.isOptimisticLock()); this.collection = collection; // TODO: is collection.getCollectionType() correct here? this.hibernateTypeDescriptor.setTypeName(collection.getCollectionType()); this.cascade = MappingHelper.getStringValue(collection.getCascade(), defaults.getDefaultCascade()); // Attribute typeNode = collectionElement.attribute( "collection-type" ); // if ( typeNode != null ) { // TODO: implement when typedef binding is implemented /* String typeName = typeNode.getValue(); TypeDef typeDef = mappings.getTypeDef( typeName ); if ( typeDef != null ) { collectionBinding.setTypeName( typeDef.getTypeClass() ); collectionBinding.setTypeParameters( typeDef.getParameters() ); } else { collectionBinding.setTypeName( typeName ); } */ // } // TODO: fix this!!! this.hibernateTypeDescriptor.setTypeName(collection.getCollectionType()); }
public boolean isOptimisticLocked() { return collection.isOptimisticLock(); }