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