Class PathKeyMapResultTransformer

  • All Implemented Interfaces:
    java.io.Serializable, org.hibernate.transform.ResultTransformer

    public class PathKeyMapResultTransformer
    extends java.lang.Object
    implements org.hibernate.transform.ResultTransformer
    ResultTransformer implementation which builds a map for each "row", removes any aggregate suffixes for "_sum", "
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      PathKeyMapResultTransformer()
      Disallow instantiation of AliasToEntityMapResultTransformer.
      PathKeyMapResultTransformer​(java.util.List<java.lang.String> aliasesToTrimSuffix)
      Disallow instantiation of AliasToEntityMapResultTransformer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List transformList​(java.util.List collection)  
      java.lang.Object transformTuple​(java.lang.Object[] tuple, java.lang.String[] aliases)
      removes everything after the last _ thats in the projectionList
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PathKeyMapResultTransformer

        public PathKeyMapResultTransformer()
        Disallow instantiation of AliasToEntityMapResultTransformer.
      • PathKeyMapResultTransformer

        public PathKeyMapResultTransformer​(java.util.List<java.lang.String> aliasesToTrimSuffix)
        Disallow instantiation of AliasToEntityMapResultTransformer.
    • Method Detail

      • transformTuple

        public java.lang.Object transformTuple​(java.lang.Object[] tuple,
                                               java.lang.String[] aliases)
        removes everything after the last _ thats in the projectionList
        Specified by:
        transformTuple in interface org.hibernate.transform.ResultTransformer
        Parameters:
        tuple - The result elements
        aliases - The result aliases ("parallel" array to tuple)
        Returns:
        the map
      • transformList

        public java.util.List transformList​(java.util.List collection)
        Specified by:
        transformList in interface org.hibernate.transform.ResultTransformer