Class OCommandRequestAbstract
java.lang.Object
com.orientechnologies.orient.core.command.OCommandRequestAbstract
- All Implemented Interfaces:
OCommandRequest,OCommandRequestInternal
- Direct Known Subclasses:
OCommandRequestTextAbstract,OQueryAbstract
Text based Command Request abstract class.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected OCommandContextprotected Stringprotected intprotected OProgressListenerprotected OCommandResultListenerprotected longprotected OCommandContext.TIMEOUT_STRATEGYprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExcludedNode(String node) convertToParameters(Object... iArgs) This api is deprecated use sql keyword "FETCHPLAN" insteadintgetLimit()This api is deprecated use sql keyword "LIMIT" insteadThis api is deprecated use sql keyword "TIMEOUT" insteadlongThis api is deprecated use sql keyword "TIMEOUT" insteadbooleanbooleanbooleanvoidremoveExcludedNode(String node) voidreset()voidsetCacheableResult(boolean iValue) setContext(OCommandContext iContext) <RET extends OCommandRequest>
RETsetFetchPlan(String fetchPlan) This api is deprecated use sql keyword "FETCHPLAN" insteadsetLimit(int limit) This api is deprecated use sql keyword "LIMIT" insteadprotected voidsetParameters(Object... iArgs) setProgressListener(OProgressListener progressListener) voidsetRecordResultSet(boolean recordResultSet) Communicate to a listener if the result set is an record based or anything elsevoidsetResultListener(OCommandResultListener iListener) voidsetTimeout(long timeout, OCommandContext.TIMEOUT_STRATEGY strategy) This api is deprecated use sql keyword "TIMEOUT" insteadvoidsetUseCache(boolean useCache) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.command.OCommandRequest
execute, isIdempotent
-
Field Details
-
resultListener
-
progressListener
-
limit
protected int limit -
timeoutMs
protected long timeoutMs -
timeoutStrategy
-
parameters
-
fetchPlan
-
useCache
protected boolean useCache -
cacheableResult
protected boolean cacheableResult -
context
-
-
Constructor Details
-
OCommandRequestAbstract
protected OCommandRequestAbstract()
-
-
Method Details
-
getResultListener
- Specified by:
getResultListenerin interfaceOCommandRequestInternal
-
setResultListener
- Specified by:
setResultListenerin interfaceOCommandRequestInternal
-
getParameters
- Specified by:
getParametersin interfaceOCommandRequestInternal
-
setParameters
-
convertToParameters
-
getProgressListener
- Specified by:
getProgressListenerin interfaceOCommandRequestInternal
-
setProgressListener
- Specified by:
setProgressListenerin interfaceOCommandRequestInternal
-
reset
public void reset()- Specified by:
resetin interfaceOCommandRequestInternal
-
getLimit
public int getLimit()Description copied from interface:OCommandRequestThis api is deprecated use sql keyword "LIMIT" insteadReturns the limit of result set. -1 means no limits.
- Specified by:
getLimitin interfaceOCommandRequest
-
setLimit
Description copied from interface:OCommandRequestThis api is deprecated use sql keyword "LIMIT" insteadSets the maximum items the command can returns. -1 means no limits.
- Specified by:
setLimitin interfaceOCommandRequest- Parameters:
limit- -1 = no limit. 1 to N to limit the result set.- Returns:
-
getFetchPlan
Description copied from interface:OCommandRequestThis api is deprecated use sql keyword "FETCHPLAN" insteadReturns the fetch plan if any
- Specified by:
getFetchPlanin interfaceOCommandRequest- Returns:
- Fetch plan as unique string or null if it was not defined.
-
setFetchPlan
Description copied from interface:OCommandRequestThis api is deprecated use sql keyword "FETCHPLAN" insteadSet the fetch plan. The format is:
<field>:<depth-level>*
Where:- field is the name of the field to specify the depth-level. * wildcard means any fields
- depth-level is the depth level to fetch. -1 means infinite, 0 means no fetch at all and 1-N the depth level value.
Example:children:-1 parent:0 sibling:3 *:0
- Specified by:
setFetchPlanin interfaceOCommandRequest- Returns:
-
isUseCache
public boolean isUseCache() -
setUseCache
public void setUseCache(boolean useCache) - Specified by:
setUseCachein interfaceOCommandRequest
-
isCacheableResult
public boolean isCacheableResult()- Specified by:
isCacheableResultin interfaceOCommandRequestInternal
-
setCacheableResult
public void setCacheableResult(boolean iValue) - Specified by:
setCacheableResultin interfaceOCommandRequestInternal
-
getContext
- Specified by:
getContextin interfaceOCommandRequest
-
setContext
- Specified by:
setContextin interfaceOCommandRequest
-
getTimeoutTime
public long getTimeoutTime()Description copied from interface:OCommandRequestThis api is deprecated use sql keyword "TIMEOUT" insteadReturns the command timeout. 0 means no timeout.
- Specified by:
getTimeoutTimein interfaceOCommandRequest- Returns:
-
setTimeout
Description copied from interface:OCommandRequestThis api is deprecated use sql keyword "TIMEOUT" insteadSets the command timeout. When the command execution time is major than the timeout the command returns
- Specified by:
setTimeoutin interfaceOCommandRequest
-
getTimeoutStrategy
Description copied from interface:OCommandRequestThis api is deprecated use sql keyword "TIMEOUT" insteadReturns the command timeout strategy between the defined ones.
- Specified by:
getTimeoutStrategyin interfaceOCommandRequest- Returns:
-
addExcludedNode
-
removeExcludedNode
-
setRecordResultSet
public void setRecordResultSet(boolean recordResultSet) Description copied from interface:OCommandRequestInternalCommunicate to a listener if the result set is an record based or anything else- Specified by:
setRecordResultSetin interfaceOCommandRequestInternal
-
isRecordResultSet
public boolean isRecordResultSet()- Specified by:
isRecordResultSetin interfaceOCommandRequestInternal
-