Class OCommandSQLPojoWrapper
java.lang.Object
com.orientechnologies.orient.object.db.OCommandSQLPojoWrapper
- All Implemented Interfaces:
OCommandRequest
Wraps the execution of a generic command by assuring to convert the result set in POJO where
applicable.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Constructor Summary
ConstructorsConstructorDescriptionOCommandSQLPojoWrapper(OObjectDatabaseTx iDatabase, OCommandRequest iCommand) -
Method Summary
Modifier and TypeMethodDescription<RET> RETThis 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" insteadbooleanReturns true if the command doesn't change the database, otherwise false.setContext(OCommandContext iContext) <RET extends OCommandRequest>
RETsetFetchPlan(String iFetchPlan) This api is deprecated use sql keyword "FETCHPLAN" insteadsetLimit(int iLimit) This api is deprecated use sql keyword "LIMIT" insteadvoidsetTimeout(long timeout, OCommandContext.TIMEOUT_STRATEGY strategy) This api is deprecated use sql keyword "TIMEOUT" insteadvoidsetUseCache(boolean iUseCache)
-
Constructor Details
-
OCommandSQLPojoWrapper
-
-
Method Details
-
execute
- Specified by:
executein interfaceOCommandRequest
-
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:
iLimit- -1 = no limit. 1 to N to limit the result set.- Returns:
-
isIdempotent
public boolean isIdempotent()Description copied from interface:OCommandRequestReturns true if the command doesn't change the database, otherwise false.- Specified by:
isIdempotentin interfaceOCommandRequest
-
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:
-
setUseCache
public void setUseCache(boolean iUseCache) - Specified by:
setUseCachein interfaceOCommandRequest
-
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:
-
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:
-
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
-