public Class getCollectionPersisterClass() { try { return MappingHelper.getClassValue(collection.getPersister()); } catch (ClassNotFoundException cnfe) { throw new MappingException( "Could not find collection persister class: " + collection.getPersister()); } }
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 int getBatchSize() { return MappingHelper.getIntValue(collection.getBatchSize(), 0); }
public boolean isLazy() { return isExtraLazy() || MappingHelper.getBooleanValue( collection.getLazy().value(), getDefaults().isDefaultLazy()); }