/** * Given a collection type, determine the entity name of the elements * contained within instance of that collection. * * @param collectionType The collection type to check. * * @return The entity name of the elements of this collection. */ public String getAssociatedEntityName(CollectionType collectionType) { return collectionType.getAssociatedEntityName( sfi ); }
if ( collectionType.getElementType( sessionFactory ).isEntityType() && !sessionFactory.getMetamodel().collectionPersister( collectionType.getRole() ).isManyToMany() ) { String entityName = collectionType.getAssociatedEntityName( sessionFactory ); String rootEntityName = action.getSession().getFactory().getMetamodel().entityPersister( entityName ).getRootEntityName(); batchIdentifier.getChildEntityNames().add( entityName );
final String entityName = collectionType.getAssociatedEntityName( eventSource.getFactory() ); deleteOrphans( eventSource, entityName, (PersistentCollection) child );
/** * Given a collection type, determine the entity name of the elements * contained within instance of that collection. * * @param collectionType The collection type to check. * @return The entity name of the elements of this collection. */ public String getAssociatedEntityName(CollectionType collectionType) { return collectionType.getAssociatedEntityName( sfi ); }
/** * Given a collection type, determine the entity name of the elements * contained within instance of that collection. * * @param collectionType The collection type to check. * @return The entity name of the elements of this collection. */ public String getAssociatedEntityName(CollectionType collectionType) { return collectionType.getAssociatedEntityName( sfi ); }
/** * Given a collection type, determine the entity name of the elements * contained within instance of that collection. * * @param collectionType The collection type to check. * @return The entity name of the elements of this collection. */ public String getAssociatedEntityName(CollectionType collectionType) { return collectionType.getAssociatedEntityName( sfi ); }
String getAssociatedEntityName(CollectionType collectionType) { return collectionType.getAssociatedEntityName( sfi ); }
@Override @SuppressWarnings("deprecation") public Class getAssociatedClass(final SessionFactoryImplementor factory) throws MappingException { try { final org.hibernate.SessionFactory sessionFactory = HibernateBridge.get(factory).getV5SessionFactory(); final org.hibernate.engine.spi.SessionFactoryImplementor sessionFactoryImpl = (org.hibernate.engine.spi.SessionFactoryImplementor) sessionFactory; final String entityName = type.getAssociatedEntityName(sessionFactoryImpl); return sessionFactoryImpl.getEntityPersister(entityName).getMappedClass(); } catch (final org.hibernate.MappingException ex) { throw (MappingException) HibernateExceptionAdapter.adapt(ex); } } }
final String entityName = collectionType.getAssociatedEntityName( eventSource.getFactory() ); deleteOrphans( entityName, (PersistentCollection) child );
final String entityName = collectionType.getAssociatedEntityName( session.getFactory() ); deleteOrphans( entityName, (PersistentCollection) child, session );
@Override public EntityCollection getChildCollection(String name) throws LayerException { Type type = metadata.getPropertyType(name); 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); } else { throw new LayerException(ExceptionCode.FEATURE_MODEL_PROBLEM); } }
final String entityName = collectionType.getAssociatedEntityName( eventSource.getFactory() ); deleteOrphans( entityName, (PersistentCollection) child );
final String entityName = collectionType.getAssociatedEntityName( eventSource.getFactory() ); deleteOrphans( entityName, (PersistentCollection) child );