Class ResultPacker

  • Direct Known Subclasses:
    ResultShapePacker

    public class ResultPacker
    extends java.lang.Object
    Helper class to pack results into the result class set on the query.
    Author:
    Abe White, Patrick Linskey
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ResultPacker()
      Protected constructor to bypass this implementation but allow extension.
        ResultPacker​(java.lang.Class<?>[] types, java.lang.String[] aliases, java.lang.Class<?> resultClass)
      Constructor for standard projection.
        ResultPacker​(java.lang.Class<?> candidate, java.lang.String alias, java.lang.Class<?> resultClass)
      Constructor for result class without a projection.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object pack​(java.lang.Object result)
      Pack the given object into an instance of the query's result class.
      java.lang.Object pack​(java.lang.Object[] result)
      Pack the given array into an instance of the query's result class.
      • Methods inherited from class java.lang.Object

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

      • ResultPacker

        protected ResultPacker()
        Protected constructor to bypass this implementation but allow extension.
      • ResultPacker

        public ResultPacker​(java.lang.Class<?> candidate,
                            java.lang.String alias,
                            java.lang.Class<?> resultClass)
        Constructor for result class without a projection.
      • ResultPacker

        public ResultPacker​(java.lang.Class<?>[] types,
                            java.lang.String[] aliases,
                            java.lang.Class<?> resultClass)
        Constructor for standard projection.
        Parameters:
        types - the projection value types
        aliases - the alias for each projection value
        resultClass - the class to pack into
    • Method Detail

      • pack

        public java.lang.Object pack​(java.lang.Object result)
        Pack the given object into an instance of the query's result class.
      • pack

        public java.lang.Object pack​(java.lang.Object[] result)
        Pack the given array into an instance of the query's result class.