Java Code Examples for org.hibernate.transform.Transformers#TO_LIST

The following examples show how to use org.hibernate.transform.Transformers#TO_LIST . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConstructorNode.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
@Override
public ResultTransformer getResultTransformer() {
	if ( constructor != null ) {
		return new AliasToBeanConstructorResultTransformer( constructor );
	}
	else if ( isMap ) {
		return Transformers.ALIAS_TO_ENTITY_MAP;
	}
	else if ( isList ) {
		return Transformers.TO_LIST;
	}
	throw new QueryException( "Unable to determine proper dynamic-instantiation tranformer to use." );
}
 
Example 2
Source File: HolderInstantiator.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public static ResultTransformer createSelectNewTransformer(Constructor constructor, boolean returnMaps, boolean returnLists) {
	if ( constructor != null ) {
		return new AliasToBeanConstructorResultTransformer(constructor);
	}
	else if ( returnMaps ) {
		return Transformers.ALIAS_TO_ENTITY_MAP;			
	}
	else if ( returnLists ) {
		return Transformers.TO_LIST;
	}		
	else {
		return null;
	}
}
 
Example 3
Source File: HolderInstantiator.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static ResultTransformer createSelectNewTransformer(Constructor constructor, boolean returnMaps, boolean returnLists) {
	if ( constructor != null ) {
		return new AliasToBeanConstructorResultTransformer(constructor);
	}
	else if ( returnMaps ) {
		return Transformers.ALIAS_TO_ENTITY_MAP;			
	}
	else if ( returnLists ) {
		return Transformers.TO_LIST;
	}		
	else {
		return null;
	}
}