Package org.hibernate.type

Examples of org.hibernate.type.CollectionType.instantiate()


      if (type instanceof CollectionType) {
        CollectionType ct = (CollectionType) type;
        Collection coll = (Collection) metadata.getPropertyValue(object, name, EntityMode.POJO);
        if (coll == null) {
          // normally should not happen, hibernate instantiates it automatically
          coll = (Collection) ct.instantiate(0);
          metadata.setPropertyValue(object, name, coll, EntityMode.POJO);
        }
        String entityName = ct.getAssociatedEntityName((SessionFactoryImplementor) sessionFactory);
        ClassMetadata childMetadata = sessionFactory.getClassMetadata(entityName);
        return new HibernateEntityCollection(metadata, childMetadata, object, coll);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.