List of usage examples for org.hibernate.pretty MessageHelper collectionInfoString
public static String collectionInfoString(CollectionPersister persister, Serializable id, SessionFactoryImplementor factory)
From source file:org.babyfish.hibernate.collection.spi.persistence.AbstractBasePersistence.java
License:Open Source License
@Override public final boolean setCurrentSession(SessionImplementor session) throws HibernateException { if (session == this.getSession()) { return false; } else {/* w w w .j av a 2s . c om*/ if (this.isConnectedToSession()) { CollectionEntry ce = session.getPersistenceContext() .getCollectionEntry(this.getWrapperPersistentCollection()); if (ce == null) { throw new HibernateException( "Illegal attempt to associate a collection with two open sessions"); } else { throw new HibernateException( "Illegal attempt to associate a collection with two open sessions: " + MessageHelper.collectionInfoString(ce.getLoadedPersister(), ce.getLoadedKey(), session.getFactory())); } } else { this.setSession(session); return true; } } }