类 DistinctRootEntityResultTransformer
- java.lang.Object
-
- org.hibernate.transform.DistinctRootEntityResultTransformer
-
public class DistinctRootEntityResultTransformer extends Object implements TupleSubsetResultTransformer
Much likeRootEntityResultTransformer, but we also distinct the entity in the final result. Since this transformer is stateless, all instances would be considered equal. So for optimization purposes we limit it to a single, singletoninstance.- 作者:
- Gavin King, Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 static DistinctRootEntityResultTransformerINSTANCE
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean[]includeInTransform(String[] aliases, int tupleLength)Returns an array with the i-th element indicating whether the i-th element of the tuple is included in the transformed value.booleanisTransformedValueATupleElement(String[] aliases, int tupleLength)When a tuple is transformed, is the result a single element of the tuple?ListtransformList(List list)Simply delegates toDistinctResultTransformer.transformList(java.util.List).ObjecttransformTuple(Object[] tuple, String[] aliases)Simply delegates toRootEntityResultTransformer.transformTuple(java.lang.Object[], java.lang.String[]).
-
-
-
字段详细资料
-
INSTANCE
public static final DistinctRootEntityResultTransformer INSTANCE
-
-
方法详细资料
-
transformTuple
public Object transformTuple(Object[] tuple, String[] aliases)
Simply delegates toRootEntityResultTransformer.transformTuple(java.lang.Object[], java.lang.String[]).- 指定者:
transformTuple在接口中ResultTransformer- 参数:
tuple- The tuple to transformaliases- The tuple aliases- 返回:
- The transformed tuple row.
-
transformList
public List transformList(List list)
Simply delegates toDistinctResultTransformer.transformList(java.util.List).- 指定者:
transformList在接口中ResultTransformer- 参数:
list- The list to transform.- 返回:
- The transformed List.
-
includeInTransform
public boolean[] includeInTransform(String[] aliases, int tupleLength)
从接口复制的说明:TupleSubsetResultTransformerReturns an array with the i-th element indicating whether the i-th element of the tuple is included in the transformed value.- 指定者:
includeInTransform在接口中TupleSubsetResultTransformer- 参数:
aliases- - the aliases that correspond to the tupletupleLength- - the number of elements in the tuple- 返回:
- array with the i-th element indicating whether the i-th element of the tuple is included in the transformed value.
-
isTransformedValueATupleElement
public boolean isTransformedValueATupleElement(String[] aliases, int tupleLength)
从接口复制的说明:TupleSubsetResultTransformerWhen a tuple is transformed, is the result a single element of the tuple?- 指定者:
isTransformedValueATupleElement在接口中TupleSubsetResultTransformer- 参数:
aliases- - the aliases that correspond to the tupletupleLength- - the number of elements in the tuple- 返回:
- true, if the transformed value is a single element of the tuple; false, otherwise.
-
-