| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.kernel.ResultShape<T>
public class ResultShape<T>
Describes the shape of a query result.
 
 A shape is described as a Java class by the generic type argument T. A shape may contain zero or more shapes. 
 A shape is categorized as follows: 
 
| Constructor Summary | |
|---|---|
| ResultShape(Class<T> cls)Construct a non-primitive shape with ASSIGN or ARRAY fill strategy. | |
| ResultShape(Class<T> cls,
            boolean primitive)Construct a primitive or non-primitive shape with ASSIGN or ARRAY fill strategy. | |
| ResultShape(Class<T> cls,
            FillStrategy<T> strategy)Construct a non-primitive shape with the given fill strategy. | |
| ResultShape(Class<T> cls,
            FillStrategy<T> strategy,
            boolean primitive)Construct a shape with the given fill strategy. | |
| Method Summary | ||
|---|---|---|
|  ResultShape<T> | add(Class<?>... classes)Adds the given classes as child shapes of this shape. | |
|  int | argLength()Total number of arguments required to populate the shape and all its child shapes. | |
| (package private)  void | assertNotPrimitive() | |
| (package private) 
 | chop(X[] values,
     int start,
     int finish)Chop an array from start to finish. | |
|  String | getAlias() | |
|  List<ResultShape<?>> | getChildren()Gets all the child shapes. | |
|  List<Class<?>> | getCompositeTypes()Gets the list of classes to compose this shape and all its children. | |
|  Set<ResultShape<?>> | getParents()Gets the immediate parents of this shape. | |
|  FillStrategy<T> | getStrategy() | |
|  Class<T> | getType()Gets the type of instance populated by this shape. | |
|  List<Class<?>> | getTypes()Gets the list of classes to compose this shape only i.e. | |
|  boolean | isCompound()Affirms if this shape can have child shapes. | |
|  boolean | isNested()Affirms if this shape is nested within other shapes. | |
|  boolean | isNesting()Affirms if at least one child shape of this shape is a compound shape. | |
|  boolean | isParent(ResultShape<?> p)Affirms if the given shape is a parent (or grandparent) of this shape. | |
|  boolean | isPrimitive()Affirms if this shape can not have any child shape. | |
|  int | length()Number of arguments to populate this shape only. | |
| 
 | nest(Class<X> cls,
     FillStrategy strategy,
     Class<?>... classes)Creates a new shape of type X with the given class arguments and nests the new shape within this shape. | |
|  ResultShape<T> | nest(ResultShape<?> shape)Nest the given shape. | |
|  T | pack(Object[] values,
     Class<?>[] types,
     String[] aliases)Fill this shape and its children with the given array element values. | |
|  ResultShape<T> | setAlias(String alias) | |
|  String | toString()Gets a human-readable representation of this shape. | |
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public ResultShape(Class<T> cls)
public ResultShape(Class<T> cls, boolean primitive)
public ResultShape(Class<T> cls, FillStrategy<T> strategy)
public ResultShape(Class<T> cls, FillStrategy<T> strategy, boolean primitive)
| Method Detail | 
|---|
public Class<T> getType()
public FillStrategy<T> getStrategy()
public ResultShape<T> setAlias(String alias)
public String getAlias()
public List<Class<?>> getCompositeTypes()
public List<Class<?>> getTypes()
public <X> ResultShape<X> nest(Class<X> cls, FillStrategy strategy, Class<?>... classes)
public ResultShape<T> nest(ResultShape<?> shape)
shape - The given shape can not be a parent of this shape
 to prohibit recursive nesting.
public ResultShape<T> add(Class<?>... classes)
public List<ResultShape<?>> getChildren()
public boolean isCompound()
public boolean isPrimitive()
public boolean isNesting()
public boolean isNested()
public boolean isParent(ResultShape<?> p)
void assertNotPrimitive()
public Set<ResultShape<?>> getParents()
public int argLength()
public int length()
public T pack(Object[] values, Class<?>[] types, String[] aliases)
<X> X[] chop(X[] values,
             int start,
             int finish)
public String toString()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||