Class OCommandSQLPojoWrapper

java.lang.Object
com.orientechnologies.orient.object.db.OCommandSQLPojoWrapper
All Implemented Interfaces:
OCommandRequest

public class OCommandSQLPojoWrapper extends Object implements 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 Details

  • Method Details

    • execute

      public <RET> RET execute(Object... iArgs)
      Specified by:
      execute in interface OCommandRequest
    • getLimit

      public int getLimit()
      Description copied from interface: OCommandRequest
      This api is deprecated use sql keyword "LIMIT" instead

      Returns the limit of result set. -1 means no limits.

      Specified by:
      getLimit in interface OCommandRequest
    • setLimit

      public OCommandRequest setLimit(int iLimit)
      Description copied from interface: OCommandRequest
      This api is deprecated use sql keyword "LIMIT" instead

      Sets the maximum items the command can returns. -1 means no limits.

      Specified by:
      setLimit in interface OCommandRequest
      Parameters:
      iLimit - -1 = no limit. 1 to N to limit the result set.
      Returns:
    • isIdempotent

      public boolean isIdempotent()
      Description copied from interface: OCommandRequest
      Returns true if the command doesn't change the database, otherwise false.
      Specified by:
      isIdempotent in interface OCommandRequest
    • getFetchPlan

      public String getFetchPlan()
      Description copied from interface: OCommandRequest
      This api is deprecated use sql keyword "FETCHPLAN" instead

      Returns the fetch plan if any

      Specified by:
      getFetchPlan in interface OCommandRequest
      Returns:
      Fetch plan as unique string or null if it was not defined.
    • setFetchPlan

      public <RET extends OCommandRequest> RET setFetchPlan(String iFetchPlan)
      Description copied from interface: OCommandRequest
      This api is deprecated use sql keyword "FETCHPLAN" instead

      Set 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.
      Uses the blank spaces to separate the fields strategies.
      Example:
       children:-1 parent:0 sibling:3 *:0
       

      Specified by:
      setFetchPlan in interface OCommandRequest
      Returns:
    • setUseCache

      public void setUseCache(boolean iUseCache)
      Specified by:
      setUseCache in interface OCommandRequest
    • getContext

      public OCommandContext getContext()
      Specified by:
      getContext in interface OCommandRequest
    • setContext

      public OCommandRequest setContext(OCommandContext iContext)
      Specified by:
      setContext in interface OCommandRequest
    • getTimeoutTime

      public long getTimeoutTime()
      Description copied from interface: OCommandRequest
      This api is deprecated use sql keyword "TIMEOUT" instead

      Returns the command timeout. 0 means no timeout.

      Specified by:
      getTimeoutTime in interface OCommandRequest
      Returns:
    • getTimeoutStrategy

      public OCommandContext.TIMEOUT_STRATEGY getTimeoutStrategy()
      Description copied from interface: OCommandRequest
      This api is deprecated use sql keyword "TIMEOUT" instead

      Returns the command timeout strategy between the defined ones.

      Specified by:
      getTimeoutStrategy in interface OCommandRequest
      Returns:
    • setTimeout

      public void setTimeout(long timeout, OCommandContext.TIMEOUT_STRATEGY strategy)
      Description copied from interface: OCommandRequest
      This api is deprecated use sql keyword "TIMEOUT" instead

      Sets the command timeout. When the command execution time is major than the timeout the command returns

      Specified by:
      setTimeout in interface OCommandRequest