Best code examples for Hibernate ORM BasicTransformerAdapter class (org.hibernate.transform.BasicTransformerAdapter)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM BasicTransformerAdapter class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM BasicTransformerAdapter examples from Open Source projects
This code example shows how to use the following methods:
     *  
     */ 
    private static final long serialVersionUID = -3530890859099882786L;
    Map _aliases;
 
    HierarchyToMapTransformer(Map aliases) {
        this._aliases = aliases;
    } 
 
    @Override 
    public Object transformTuple(Object[] tuple, String[] aliases) {
        Map result = new HashMap();
        for (int i = 0; i < tuple.length; i++) {
            String alias = aliases[i];
            if (alias != null && _aliases.containsKey(alias)) {
                result.put(_aliases.get(alias), tuple[i]);
            } 
        } 
        return result;
    } 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
	private byte mask(boolean on) {
		return on ? ( byte ) 1 : ( byte ) 0;
	} 
 
	@SuppressWarnings( {"unchecked"}) 
	private static class UpperCasedAliasToEntityMapResultTransformer extends BasicTransformerAdapter implements Serializable {
		public Object transformTuple(Object[] tuple, String[] aliases) {
			Map result = new HashMap( tuple.length );
			for ( int i = 0; i < tuple.length; i++ ) {
				String alias = aliases[i];
				if ( alias != null ) {
					result.put( alias.toUpperCase(), tuple[i] );
				} 
			} 
			return result;
		} 
	} 
} 
Full Snippet Info
3
CodeRank