code: @Override
     protected ResultSet findLastOrderNumber(int localMaxOrderNumber, boolean increment) throws SQLException
     {
        if (findLastOrderNumber == null)
        {
           findLastOrderNumber = dbConnection.prepareStatement(FIND_LAST_ORDER_NUMBER);
        }
        if (!increment)
        {
           ResultSet count;
           int result = -1;
           while (result < localMaxOrderNumber - 1)
           {
              count = findLastOrderNumber.executeQuery();
              if (count.next())
              {
                 result = count.getInt(1);
              }
           }
        }
        return findLastOrderNumber.executeQuery();
     }
docs: {@inheritDoc}