com.orientechnologies.orient.core.sql.query
Class OSQLSynchQuery<T>

Package class diagram package OSQLSynchQuery
java.lang.Object
  extended by com.orientechnologies.orient.core.command.OCommandRequestAbstract
      extended by com.orientechnologies.orient.core.query.OQueryAbstract<T>
          extended by com.orientechnologies.orient.core.sql.query.OSQLQuery<T>
              extended by com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery<T>
                  extended by com.orientechnologies.orient.core.sql.query.OSQLSynchQuery<T>
Type Parameters:
T -
All Implemented Interfaces:
OCommandRequest, OCommandRequestAsynch, OCommandRequestInternal, OCommandRequestText, OCommandResultListener, OQuery<T>, OSerializableStream, java.io.Serializable

public class OSQLSynchQuery<T>
extends OSQLAsynchQuery<T>
implements OCommandResultListener

SQL synchronous query. When executed the caller wait for the result.

See Also:
OSQLAsynchQuery, Serialized Form

Constructor Summary
OSQLSynchQuery()
           
OSQLSynchQuery(java.lang.String iText)
           
OSQLSynchQuery(java.lang.String iText, int iLimit)
           
 
Method Summary
 java.lang.Object getResult()
           
 void reset()
           
 boolean result(java.lang.Object iRecord)
           
 java.util.List<T> run(java.lang.Object... iArgs)
          Delegates to the OQueryExecutor the query execution.
 
Methods inherited from class com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery
execute2, executeFirst
 
Methods inherited from class com.orientechnologies.orient.core.sql.query.OSQLQuery
fromStream, getText, runFirst, setText, toStream, toString
 
Methods inherited from class com.orientechnologies.orient.core.query.OQueryAbstract
execute, getBeginRange, getEndRange, getFetchPlan, setBeginRange, setEndRange, setFetchPlan
 
Methods inherited from class com.orientechnologies.orient.core.command.OCommandRequestAbstract
getDatabase, getLimit, getParameters, getProgressListener, getResultListener, setDatabase, setLimit, setProgressListener, setResultListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.orientechnologies.orient.core.command.OCommandRequestAsynch
getResultListener, setResultListener
 
Methods inherited from interface com.orientechnologies.orient.core.command.OCommandRequestInternal
getDatabase, getParameters, getProgressListener, getResultListener, setDatabase, setProgressListener, setResultListener
 
Methods inherited from interface com.orientechnologies.orient.core.command.OCommandRequest
execute, getLimit, setLimit
 

Constructor Detail

OSQLSynchQuery

public OSQLSynchQuery()

OSQLSynchQuery

public OSQLSynchQuery(java.lang.String iText)

OSQLSynchQuery

public OSQLSynchQuery(java.lang.String iText,
                      int iLimit)
Method Detail

reset

public void reset()
Specified by:
reset in interface OCommandRequestInternal
Specified by:
reset in interface OQuery<T>
Overrides:
reset in class OQueryAbstract<T>

result

public boolean result(java.lang.Object iRecord)
Specified by:
result in interface OCommandResultListener

run

public java.util.List<T> run(java.lang.Object... iArgs)
Description copied from class: OSQLQuery
Delegates to the OQueryExecutor the query execution.

Specified by:
run in interface OQuery<T>
Overrides:
run in class OSQLQuery<T>
Returns:
List of records if any record matches the query constraints, otherwise an empty List.

getResult

public java.lang.Object getResult()


Copyrights 2010-2011 (c) Luca Garulli. All Rights Reserved. This software is released as Open Source using the Apache 2.0 license.