类 RootEntityResultTransformer
- java.lang.Object
-
- org.hibernate.transform.BasicTransformerAdapter
-
- org.hibernate.transform.RootEntityResultTransformer
-
public final class RootEntityResultTransformer extends BasicTransformerAdapter implements TupleSubsetResultTransformer
ResultTransformerimplementation which limits the result tuple to only the "root entity". 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 RootEntityResultTransformerINSTANCE
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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?ObjecttransformTuple(Object[] tuple, String[] aliases)Return just the root entity from the row tuple.-
从类继承的方法 org.hibernate.transform.BasicTransformerAdapter
transformList
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.transform.ResultTransformer
transformList
-
-
-
-
字段详细资料
-
INSTANCE
public static final RootEntityResultTransformer INSTANCE
-
-
方法详细资料
-
transformTuple
public Object transformTuple(Object[] tuple, String[] aliases)
Return just the root entity from the row tuple.- 指定者:
transformTuple在接口中ResultTransformer- 覆盖:
transformTuple在类中BasicTransformerAdapter- 参数:
tuple- The result elementsaliases- The result aliases ("parallel" array to tuple)- 返回:
- The transformed row.
-
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.
-
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.
-
-