Class LimitOffsetQuery


  • public class LimitOffsetQuery
    extends java.lang.Object
    A class specifically for use with the OptimiserCache, designed to split a SQL string into its functional part, and the limit and offset.
    Author:
    Matthew Wakeling
    • Constructor Summary

      Constructors 
      Constructor Description
      LimitOffsetQuery​(java.lang.String in)
      Creates a new LimitOffsetQuery object from this query string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getLimit()
      Getter for limit.
      int getOffset()
      Getter for offset.
      java.lang.String getQuery()
      Getter for the stripped query.
      java.lang.String reconstruct​(java.lang.String in)
      Reconstruct a SQL string, given this alternative SQL query-part.
      • Methods inherited from class java.lang.Object

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

      • LimitOffsetQuery

        public LimitOffsetQuery​(java.lang.String in)
        Creates a new LimitOffsetQuery object from this query string.
        Parameters:
        in - the SQL query String
    • Method Detail

      • getQuery

        public java.lang.String getQuery()
        Getter for the stripped query.
        Returns:
        the stripped String
      • getLimit

        public int getLimit()
        Getter for limit.
        Returns:
        limit
      • getOffset

        public int getOffset()
        Getter for offset.
        Returns:
        offset
      • reconstruct

        public java.lang.String reconstruct​(java.lang.String in)
        Reconstruct a SQL string, given this alternative SQL query-part.
        Parameters:
        in - the new SQL query minus the LIMIT and OFFSET
        Returns:
        in plus the LIMIT and OFFSET