org.apache.openjpa.persistence
Class TupleFactory

java.lang.Object
  extended by org.apache.openjpa.persistence.TupleFactory
All Implemented Interfaces:
ObjectFactory<Tuple>

public class TupleFactory
extends Object
implements ObjectFactory<Tuple>

A factory for tuples such that all instances created by a factory instance share the same TupleElements to save memory consumption.
All Tuple instances created by this factory access the TupleElememts contained in this factory.

Since:
2.0.0
Author:
Pinaki Poddar

Constructor Summary
TupleFactory(List<TupleElement<?>> elems)
          A factory of Tuple that shares the given TupleElements.
TupleFactory(Selection<?>... elems)
           
TupleFactory(TupleElement<?>... elems)
           
 
Method Summary
 List<TupleElement<?>> getElements()
           
 int getIndex(String alias)
           
 int getIndex(TupleElement<?> e)
           
 TupleImpl newInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TupleFactory

public TupleFactory(List<TupleElement<?>> elems)
A factory of Tuple that shares the given TupleElements.


TupleFactory

public TupleFactory(TupleElement<?>... elems)

TupleFactory

public TupleFactory(Selection<?>... elems)
Method Detail

getElements

public List<TupleElement<?>> getElements()

newInstance

public TupleImpl newInstance()
Specified by:
newInstance in interface ObjectFactory<Tuple>

getIndex

public int getIndex(TupleElement<?> e)

getIndex

public int getIndex(String alias)


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.