类 AliasToBeanConstructorResultTransformer

    • 构造器详细资料

      • AliasToBeanConstructorResultTransformer

        public AliasToBeanConstructorResultTransformer​(Constructor constructor)
        Instantiates a AliasToBeanConstructorResultTransformer.
        参数:
        constructor - The constructor in which to wrap the tuples.
    • 方法详细资料

      • transformTuple

        public Object transformTuple​(Object[] tuple,
                                     String[] aliases)
        Wrap the incoming tuples in a call to our configured constructor.
        指定者:
        transformTuple 在接口中 ResultTransformer
        参数:
        tuple - The result elements
        aliases - The result aliases ("parallel" array to tuple)
        返回:
        The transformed row.
      • transformList

        public List transformList​(List collection)
        从接口复制的说明: ResultTransformer
        Here we have an opportunity to perform transformation on the query result as a whole. This might be useful to convert from one collection type to another or to remove duplicates from the result, etc.
        指定者:
        transformList 在接口中 ResultTransformer
        参数:
        collection - The result.
        返回:
        The transformed result.
      • hashCode

        public int hashCode()
        Define our hashCode by our defined constructor's hasCode.
        覆盖:
        hashCode 在类中 Object
        返回:
        Our defined ctor hashCode
      • equals

        public boolean equals​(Object other)
        2 AliasToBeanConstructorResultTransformer are considered equal if they have the same defined constructor.
        覆盖:
        equals 在类中 Object
        参数:
        other - The other instance to check for equality.
        返回:
        True if both have the same defined constructor; false otherwise.