Package org.apache.openjpa.kernel
Class ResultPacker
- java.lang.Object
-
- org.apache.openjpa.kernel.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.
-
-
-
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 typesaliases
- the alias for each projection valueresultClass
- the class to pack into
-
-