Code example for HibernateException

0
		else if ( list.size()==0 ) {
			return null; 
		} 
		else { 
			if ( getCollectionOwners()!=null ) { 
				return list.get(0);
			} 
			else { 
				throw new HibernateException(
						"More than one row with the given identifier was found: " + 
						id + 
						", for class: " + 
						persister.getEntityName()
					); 
			} 
		} 
 
	} 
 
	@Override