@Override Object processCollection(Object collection, CollectionType collectionType) throws HibernateException { if ( collection != null && ( collection instanceof PersistentCollection ) ) { final SessionImplementor session = getSession(); PersistentCollection coll = (PersistentCollection) collection; if ( coll.setCurrentSession( session ) ) { reattachCollection( coll, collectionType ); } return null; } else { return processArrayOrNewCollection( collection, collectionType ); } }
@Override Object processComponent(Object component, CompositeType componentType) throws HibernateException { if ( component != null ) { Object[] values = componentType.getPropertyValues( component, getSession() ); Type[] types = componentType.getSubtypes(); boolean substituteComponent = false; for ( int i = 0; i < types.length; i++ ) { Object result = processValue( values[i], types[i] ); if ( result != null ) { values[i] = result; substituteComponent = true; } } if ( substituteComponent ) { componentType.setPropertyValues( component, values, EntityMode.POJO ); } } return null; }
final Object processArrayOrNewCollection(Object collection, CollectionType collectionType) throws HibernateException { final SessionImplementor session = getSession();
@Override Object processCollection(Object collection, CollectionType collectionType) throws HibernateException { if ( collection!=null && (collection instanceof PersistentCollection) ) { final SessionImplementor session = getSession(); PersistentCollection coll = (PersistentCollection) collection; if ( coll.setCurrentSession(session) ) { reattachCollection( coll, collectionType ); } return null; } else { return processArrayOrNewCollection(collection, collectionType); } }
@Override Object processCollection(Object collection, CollectionType collectionType) throws HibernateException { if ( collection!=null && (collection instanceof PersistentCollection) ) { final SessionImplementor session = getSession(); PersistentCollection coll = (PersistentCollection) collection; if ( coll.setCurrentSession(session) ) { reattachCollection( coll, collectionType ); } return null; } else { return processArrayOrNewCollection(collection, collectionType); } }
@Override Object processComponent(Object component, CompositeType componentType) throws HibernateException { if (component!=null) { Object[] values = componentType.getPropertyValues( component, getSession() ); Type[] types = componentType.getSubtypes(); boolean substituteComponent = false; for ( int i=0; i<types.length; i++ ) { Object result = processValue( values[i], types[i] ); if (result!=null) { values[i] = result; substituteComponent = true; } } if (substituteComponent) { componentType.setPropertyValues( component, values, EntityMode.POJO ); } } return null; }
@Override Object processCollection(Object collection, PluralPersistentAttribute collectionAttribute) throws HibernateException { if ( collection != null && ( collection instanceof PersistentCollection ) ) { final SessionImplementor session = getSession(); PersistentCollection coll = (PersistentCollection) collection; if ( coll.setCurrentSession( session ) ) { reattachCollection( coll, collectionAttribute.getNavigableRole() ); } return null; } else { return processArrayOrNewCollection( collection, collectionAttribute.getCollectionDescriptor() ); } }
@Override Object processComponent(Object component, CompositeType componentType) throws HibernateException { if (component!=null) { Object[] values = componentType.getPropertyValues( component, getSession() ); Type[] types = componentType.getSubtypes(); boolean substituteComponent = false; for ( int i=0; i<types.length; i++ ) { Object result = processValue( values[i], types[i] ); if (result!=null) { values[i] = result; substituteComponent = true; } } if (substituteComponent) { componentType.setPropertyValues( component, values, EntityMode.POJO ); } } return null; }
final Object processArrayOrNewCollection(Object collection, PersistentCollectionDescriptor collectionDescriptor) throws HibernateException { final SessionImplementor session = getSession();
final Object processArrayOrNewCollection(Object collection, CollectionType collectionType) throws HibernateException { final SessionImplementor session = getSession();
final Object processArrayOrNewCollection(Object collection, CollectionType collectionType) throws HibernateException { final SessionImplementor session = getSession();