Class SvcDefQuery


  • public class SvcDefQuery
    extends java.lang.Object

    Provides a service definition value object query class.

    Examples

    Please find the service definition query examples.

    Service Definition List Example

    This Groovy example shows how to list service definitions matching.

     import com.avoka.tm.query.*
     import com.avoka.tm.vo.*
    
     List<SvcDef> svcDefs = new SvcDefQuery()
          .setType("Dynamic Data")
          .withCurrentVersion()
          .listValues()
    
     // In JSON format
     String svcDefListJson = new SvcDefQuery()
          .setName("myServiceDefName")
          .listJson() 
    Since:
    5.1.0
    See Also:
    SvcDef
    • Constructor Summary

      Constructors 
      Constructor Description
      SvcDefQuery()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      SvcDefQuery addOrderByAsc​(java.lang.String orderProperty)
      Add the sort order by ascending to the query.
      SvcDefQuery addOrderByDesc​(java.lang.String orderProperty)
      Add the sort order by descending to the query.
      int count()
      Execute a select count query and return the total number of records selected by the query.
      java.lang.String firstJson()
      Execute the query and return the first service definition JSON value.
      SvcDef firstValue()
      Execute the query and return the first service definition value object for the query.
      java.lang.String listJson()
      Execute the query and return service definition JSON array list.
      java.util.List<SvcDef> listValues()
      Execute the service definition query and return a list of SvcDef value objects.
      SvcDefQuery setClientCode​(java.lang.String clientCode)
      Set the service definition client code parameter.
      SvcDefQuery setCreatedBy​(java.lang.String createdBy)
      Set the service definition created by parameter.
      SvcDefQuery setFetchLimit​(int fetchLimit)
      Set the query fetch limit to limit the maximum number of records returned.
      SvcDefQuery setId​(java.lang.Number id)
      Set the service definition id (PK) query parameter.
      SvcDefQuery setLastModifiedBy​(java.lang.String lastModifiedBy)
      Set the service definition last modified by parameter.
      SvcDefQuery setName​(java.lang.String name)
      Set the service definition name parameter.
      SvcDefQuery setType​(java.lang.String type)
      Set the service definition type parameter.
      SvcDefQuery setVersion​(java.lang.String version)
      Set the service definition version parameter.
      SvcDefQuery setVersionNumber​(int versionNumber)
      Deprecated.
      SvcDefQuery withCurrentVersion()
      Set the query to return the service definition of current version.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SvcDefQuery

        public SvcDefQuery()
    • Method Detail

      • setId

        public SvcDefQuery setId​(java.lang.Number id)
        Set the service definition id (PK) query parameter.
        Parameters:
        id - the service definition id (PK) query parameter
        Returns:
        the service definition query
      • setVersionNumber

        @Deprecated
        public SvcDefQuery setVersionNumber​(int versionNumber)
        Deprecated.
        Set the service definition version number parameter.
        Parameters:
        versionNumber - the service definition version number parameter
        Returns:
        the service definition query
      • setVersion

        public SvcDefQuery setVersion​(java.lang.String version)
        Set the service definition version parameter.
        Parameters:
        version - the service definition version number parameter
        Returns:
        the service definition query
        Since:
        17.10.0
      • setName

        public SvcDefQuery setName​(java.lang.String name)
        Set the service definition name parameter.
        Parameters:
        name - the service definition name parameter
        Returns:
        the service definition query
      • setClientCode

        public SvcDefQuery setClientCode​(java.lang.String clientCode)
        Set the service definition client code parameter.
        Parameters:
        clientCode - the service definition client code parameter
        Returns:
        the service definition query
      • setType

        public SvcDefQuery setType​(java.lang.String type)
        Set the service definition type parameter.
        Parameters:
        type - the service definition type parameter
        Returns:
        the service definition query
      • setCreatedBy

        public SvcDefQuery setCreatedBy​(java.lang.String createdBy)
        Set the service definition created by parameter.
        Parameters:
        createdBy - the service definition created by parameter
        Returns:
        the service definition query
      • setLastModifiedBy

        public SvcDefQuery setLastModifiedBy​(java.lang.String lastModifiedBy)
        Set the service definition last modified by parameter.
        Parameters:
        lastModifiedBy - the service definition created by parameter
        Returns:
        the service definition query
      • withCurrentVersion

        public SvcDefQuery withCurrentVersion()
        Set the query to return the service definition of current version.
        Returns:
        the service definition query
      • addOrderByAsc

        public SvcDefQuery addOrderByAsc​(java.lang.String orderProperty)
        Add the sort order by ascending to the query.
        Parameters:
        orderProperty - the property to sort by (required)
        Returns:
        the service definition query
      • addOrderByDesc

        public SvcDefQuery addOrderByDesc​(java.lang.String orderProperty)
        Add the sort order by descending to the query.
        Parameters:
        orderProperty - the property to sort by (required)
        Returns:
        the service definition query
      • setFetchLimit

        public SvcDefQuery setFetchLimit​(int fetchLimit)
        Set the query fetch limit to limit the maximum number of records returned. The default query fetch limit is 100 records.
        Parameters:
        fetchLimit - the query fetch limit
        Returns:
        the service definition query
      • count

        public int count()
        Execute a select count query and return the total number of records selected by the query.
        Returns:
        the total number of records selected by the query
      • listValues

        public java.util.List<SvcDef> listValues()
        Execute the service definition query and return a list of SvcDef value objects.
        Returns:
        execute the service definition query and return a list of SvcDef value objects
      • listJson

        public java.lang.String listJson()
        Execute the query and return service definition JSON array list.
        Returns:
        execute the query and return service definition JSON array list
      • firstValue

        public SvcDef firstValue()
        Execute the query and return the first service definition value object for the query.
        Returns:
        execute the query and return the first service definition value object for the query
      • firstJson

        public java.lang.String firstJson()
        Execute the query and return the first service definition JSON value.
        Returns:
        execute the query and return the first service definition JSON value