@SuppressWarnings({"unchecked", "UnusedParameters"}) protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException { final TreeMap clonedMap = new TreeMap( comparator ); for ( Object o : map.entrySet() ) { final Entry e = (Entry) o; clonedMap.put( e.getKey(), persister.getElementType().deepCopy( e.getValue(), persister.getFactory() ) ); } return clonedMap; }
@SuppressWarnings({"unchecked", "UnusedParameters"}) protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException { final TreeMap clonedSet = new TreeMap( comparator ); for ( Object setElement : set ) { final Object copy = persister.getElementType().deepCopy( setElement, persister.getFactory() ); clonedSet.put( copy, copy ); } return clonedSet; }
public String selectFragment( Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns) { // we need to determine the best way to know that two joinables // represent a single many-to-many... if ( rhs != null && isManyToMany() && !rhs.isCollection() ) { AssociationType elementType = ( (AssociationType) getElementType() ); if ( rhs.equals( elementType.getAssociatedJoinable( getFactory() ) ) ) { return manyToManySelectFragment( rhs, rhsAlias, lhsAlias, collectionSuffix ); } } return includeCollectionColumns ? selectFragment( lhsAlias, collectionSuffix ) : ""; }
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException { TreeMap clonedMap = new TreeMap(comparator); Iterator iter = map.entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry e = (Map.Entry) iter.next(); clonedMap.put( e.getKey(), persister.getElementType().deepCopy( e.getValue(), entityMode, persister.getFactory() ) ); } return clonedMap; }
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException { TreeMap clonedMap = new TreeMap(comparator); Iterator iter = map.entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry e = (Map.Entry) iter.next(); clonedMap.put( e.getKey(), persister.getElementType().deepCopy( e.getValue(), persister.getFactory() ) ); } return clonedMap; }
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException { TreeMap clonedMap = new TreeMap(comparator); Iterator iter = map.entrySet().iterator(); while ( iter.hasNext() ) { java.util.Map.Entry e = (java.util.Map.Entry) iter.next(); clonedMap.put( e.getKey(), persister.getElementType().deepCopy( e.getValue(), entityMode, persister.getFactory() ) ); } return clonedMap; }
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException { TreeMap clonedMap = new TreeMap(comparator); Iterator iter = map.entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry e = (Map.Entry) iter.next(); clonedMap.put( e.getKey(), persister.getElementType().deepCopy( e.getValue(), persister.getFactory() ) ); } return clonedMap; }
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException { //if (set==null) return new Set(session); TreeMap clonedSet = new TreeMap(comparator); Iterator iter = set.iterator(); while ( iter.hasNext() ) { Object copy = persister.getElementType().deepCopy( iter.next(), entityMode, persister.getFactory() ); clonedSet.put(copy, copy); } return clonedSet; }
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException { //if (set==null) return new Set(session); TreeMap clonedSet = new TreeMap(comparator); Iterator iter = set.iterator(); while ( iter.hasNext() ) { Object copy = persister.getElementType().deepCopy( iter.next(), persister.getFactory() ); clonedSet.put(copy, copy); } return clonedSet; }
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException { //if (set==null) return new Set(session); TreeMap clonedSet = new TreeMap(comparator); Iterator iter = set.iterator(); while ( iter.hasNext() ) { Object copy = persister.getElementType().deepCopy( iter.next(), persister.getFactory() ); clonedSet.put(copy, copy); } return clonedSet; }
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException { //if (set==null) return new Set(session); TreeMap clonedSet = new TreeMap(comparator); Iterator iter = set.iterator(); while ( iter.hasNext() ) { Object copy = persister.getElementType().deepCopy( iter.next(), entityMode, persister.getFactory() ); clonedSet.put(copy, copy); } return clonedSet; }
public String selectFragment( Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns) { // we need to determine the best way to know that two joinables // represent a single many-to-many... if ( rhs != null && isManyToMany() && !rhs.isCollection() ) { AssociationType elementType = ( ( AssociationType ) getElementType() ); if ( rhs.equals( elementType.getAssociatedJoinable( getFactory() ) ) ) { return manyToManySelectFragment( rhs, rhsAlias, lhsAlias, collectionSuffix ); } } return includeCollectionColumns ? selectFragment( lhsAlias, collectionSuffix ) : ""; }
public String selectFragment( Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns) { // we need to determine the best way to know that two joinables // represent a single many-to-many... if ( rhs != null && isManyToMany() && !rhs.isCollection() ) { AssociationType elementType = ( ( AssociationType ) getElementType() ); if ( rhs.equals( elementType.getAssociatedJoinable( getFactory() ) ) ) { return manyToManySelectFragment( rhs, rhsAlias, lhsAlias, collectionSuffix ); } } return includeCollectionColumns ? selectFragment( lhsAlias, collectionSuffix ) : ""; }
public String selectFragment( Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns) { // we need to determine the best way to know that two joinables // represent a single many-to-many... if ( rhs != null && isManyToMany() && !rhs.isCollection() ) { AssociationType elementType = ( ( AssociationType ) getElementType() ); if ( rhs.equals( elementType.getAssociatedJoinable( getFactory() ) ) ) { return manyToManySelectFragment( rhs, rhsAlias, lhsAlias, collectionSuffix ); } } return includeCollectionColumns ? selectFragment( lhsAlias, collectionSuffix ) : ""; }
public String selectFragment( Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns) { // we need to determine the best way to know that two joinables // represent a single many-to-many... if ( rhs != null && isManyToMany() && !rhs.isCollection() ) { AssociationType elementType = ( ( AssociationType ) getElementType() ); if ( rhs.equals( elementType.getAssociatedJoinable( getFactory() ) ) ) { return manyToManySelectFragment( rhs, rhsAlias, lhsAlias, collectionSuffix ); } } return includeCollectionColumns ? selectFragment( lhsAlias, collectionSuffix ) : ""; }