Code example for MappingException

Methods: getMessage

0
	 * Locate the collection persister by the collection role. 
	 * 
	 * @param role The collection role name. 
	 * @return The defined CollectionPersister for this collection role, or null. 
	 */ 
	public QueryableCollection getCollectionPersister(String role) { 
		try { 
			return ( QueryableCollection ) sfi.getCollectionPersister( role ); 
		} 
		catch ( ClassCastException cce ) { 
			throw new QueryException( "collection is not queryable: " + role ); 
		} 
		catch ( Exception e ) { 
			throw new QueryException( "collection not found: " + role ); 
		} 
	} 
 
	/** 
	 * Locate the collection persister by the collection role, requiring that 
	 * such a persister exist. 
Contextual code suggestions in your IDE  Get Codota for Java