| java.lang.Object org.objectweb.speedo.query.jdo.JDOQueryResultCommon
All known Subclasses: org.objectweb.speedo.query.jdo.JDOQueryResultList, org.objectweb.speedo.query.jdo.JDOQueryResultUnique,
JDOQueryResultCommon | public class JDOQueryResultCommon (Code) | | Is a common classes used for compute the query result. This implementation
supports user class or persistent class as query result.
author: S.Chassande-Barrioz |
Field Summary | |
protected Object[] | conns The underlying connection used to evalue the query. | protected boolean | debug | protected Logger | logger | protected PersistenceManager | pm The po manager representing the current execution context. | protected TupleCollection | tc |
Constructor Summary | |
public | JDOQueryResultCommon(TupleCollection _tc, PersistenceManager _pm, Object[] _conns, Class _resultClazz, Class[] _selectedFieldTypes, boolean staticFirstElementIndex, boolean returnIdentifierOnly, Logger _logger) Builds a QueryResultList. |
Method Summary | |
public void | close() Close the connection to the data store. | public static void | closeConnection(Object conn) | protected Object | getValue(Tuple tuple) When the array #selectedFieldTypes contains a single element, the result
of the query can or cannot be encapsulated into a user class. | protected Object | pname2Object(PName pn) |
conns | protected Object[] conns(Code) | | The underlying connection used to evalue the query. These connections
will be closed when the result will be no more used.
|
debug | protected boolean debug(Code) | | |
logger | protected Logger logger(Code) | | |
pm | protected PersistenceManager pm(Code) | | The po manager representing the current execution context. The
persistenceManager is used to fetch the real object from the identifier.
|
tc | protected TupleCollection tc(Code) | | The inner medor TupleCollection
|
JDOQueryResultCommon | public JDOQueryResultCommon(TupleCollection _tc, PersistenceManager _pm, Object[] _conns, Class _resultClazz, Class[] _selectedFieldTypes, boolean staticFirstElementIndex, boolean returnIdentifierOnly, Logger _logger) throws MedorException, SpeedoException(Code) | | Builds a QueryResultList.
Parameters: _tc - the tuple collection representing the query result Parameters: _pm - is the peristence manager linked to the query Parameters: _conns - is the connection to the underlying support to close in same time than the query. Parameters: _resultClazz - is the class encapsulated the result |
close | public void close()(Code) | | Close the connection to the data store. The query result will be no
more usable after.
|
closeConnection | public static void closeConnection(Object conn)(Code) | | |
getValue | protected Object getValue(Tuple tuple) throws MedorException(Code) | | When the array #selectedFieldTypes contains a single element, the result
of the query can or cannot be encapsulated into a user class. When this
array contains several
element and the #resultClass field is not definied, the
Parameters: tuple - contains the result the query result |
pname2Object | protected Object pname2Object(PName pn)(Code) | | Fetch the persistent instance corresponding to an identifier
Parameters: pn - is the persistent object identifier a persistent instance if it has been found, otherwise a null value. |
|
|