Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.websphere.query.base
Class SelectQuery

    java.lang.Object
      com.ibm.websphere.query.base.Query
          com.ibm.websphere.query.base.SelectQuery

All Implemented Interfaces:
  IQuery, IRightOperand, ISelectQuery, IStringBuilder, ITable, java.io.Serializable

    public class SelectQuery

extends Query
implements ISelectQuery

The SelectQuery class represents a select query in the query framework. It is derived from Query.

This class contains the order by (order by clause) part of a query, in addition to the attributes and behaviors inherited from base class Query, to describe a typical select query.

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `COPYRIGHT`

Constructor Summary
`SelectQuery()` Creates a new SelectQuery instance, default constructor.
`SelectQuery(SelectQuery selectQuery)`

Method Summary
`java.lang.String` | `buildLimitString(ISelectQueryCallback builder)` Builds an limit string for the select query by delegating the operation to the given query builder callback.
`void` | `buildLimitString(ISelectQueryCallback builder, java.lang.StringBuffer sb)`
`java.lang.String` | `buildOrderByString(ISelectQueryCallback builder)` Builds an order by string for the select query by delegating the operation to the given query builder callback.
`void` | `buildOrderByString(ISelectQueryCallback builder, java.lang.StringBuffer sb)`
`java.lang.String` | `buildString(ISelectQueryCallback builder)` Builds a query string for the select query.
`void` | `buildString(ISelectQueryCallback builder, java.lang.StringBuffer sb)`
`boolean` | `equals(java.lang.Object o)` Tests for equality with the given object.
`ILimit` | `getLimit()` Gets the limit
`java.lang.String` | `getName()`
`IOrderBy` | `getOrderBy()` Returns the order by object.
`java.lang.String[]` | `getPageParams()`
`ISelect` | `getSelect()`
`int` | `hashCode()` Computes a hash code for the select query.
`boolean` | `isCacheable()`
`void` | `setCacheable(boolean b)`
`void` | `setLimit(ILimit limit)` Sets the limit
`void` | `setName(java.lang.String tableName)`
`void` | `setOrderBy(IOrderBy newOrderBy)` Sets the order by of the select query.
`void` | `setPageParams(java.lang.String[] params)`
`void` | `setSelect(ISelect select)`

Methods inherited from class com.ibm.websphere.query.base.Query
`buildPredicateString, buildPredicateString, getCollectionParams, getFrom, getPagination, getPredicate, setCollectionParams, setFrom, setPagination, setPredicate`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.ibm.websphere.query.base.IQuery
`getCollectionParams, getFrom, getPredicate, setCollectionParams, setFrom, setPredicate`

Field Detail

### COPYRIGHT

    public static final java.lang.String COPYRIGHT

Constructor Detail

### SelectQuery

    public SelectQuery()

  Creates a new SelectQuery instance, default constructor.

### SelectQuery

    public SelectQuery(SelectQuery selectQuery)

Method Detail

### buildOrderByString

    public java.lang.String buildOrderByString(ISelectQueryCallback builder)
                                        throws QueryException

  Builds an order by string for the select query by delegating the operation to the given query builder callback.

  Throws:
    `QueryException`

### buildOrderByString

    public void buildOrderByString(ISelectQueryCallback builder,
                                   java.lang.StringBuffer sb)
                            throws QueryException

  Throws:
    `QueryException`

### buildLimitString

    public java.lang.String buildLimitString(ISelectQueryCallback builder)
                                      throws QueryException

  Builds an limit string for the select query by delegating the operation to the given query builder callback.

  Throws:
    `QueryException`

### buildLimitString

    public void buildLimitString(ISelectQueryCallback builder,
                                 java.lang.StringBuffer sb)
                          throws QueryException

  Throws:
    `QueryException`

### buildString

    public java.lang.String buildString(ISelectQueryCallback builder)
                                 throws QueryException

  Builds a query string for the select query.

  Specified by:
    `buildString` in interface `IStringBuilder`
  Throws:
    `QueryException`

### buildString

    public void buildString(ISelectQueryCallback builder,
                            java.lang.StringBuffer sb)
                     throws QueryException

  Specified by:
    `buildString` in interface `IStringBuilder`
  Throws:
    `QueryException`

### equals

    public boolean equals(java.lang.Object o)

  Tests for equality with the given object.

  Overrides:
    `equals` in class `java.lang.Object`

### getOrderBy

    public IOrderBy getOrderBy()

  Returns the order by object.

  Specified by:
    `getOrderBy` in interface `ISelectQuery`

### hashCode

    public int hashCode()

  Computes a hash code for the select query.

  Overrides:
    `hashCode` in class `java.lang.Object`

### setOrderBy

    public void setOrderBy(IOrderBy newOrderBy)

  Sets the order by of the select query.

  Specified by:
    `setOrderBy` in interface `ISelectQuery`

### getLimit

    public ILimit getLimit()

  Gets the limit

  Specified by:
    `getLimit` in interface `ISelectQuery`
  Returns:
    Returns a ILimit

### setLimit

    public void setLimit(ILimit limit)

  Sets the limit

  Specified by:
    `setLimit` in interface `ISelectQuery`
  Parameters:
    `limit` - The limit to set

### getPageParams

    public java.lang.String[] getPageParams()

### setPageParams

    public void setPageParams(java.lang.String[] params)

  Parameters:
    `params:` - An string array of length 2, params[0] = start, a string with the start of page params[1] = end, a string with the end of page Both should be convertible to Integers using Integer.parseInt() However this method does not check this; nor does it enforce the length of the array. Both are the caller's responsibility.

### isCacheable

    public boolean isCacheable()

  Overrides:
    `isCacheable` in class `Query`
  Returns:

### setCacheable

    public void setCacheable(boolean b)

  Overrides:
    `setCacheable` in class `Query`

### getSelect

    public ISelect getSelect()

  Specified by:
    `getSelect` in interface `ISelectQuery`
  See Also:
    `ISelectQuery.getSelect()`

### setSelect

    public void setSelect(ISelect select)

  Specified by:
    `setSelect` in interface `ISelectQuery`
  See Also:
    `ISelectQuery.setSelect(com.ibm.websphere.query.base.ISelect)`

### getName

    public java.lang.String getName()

  Specified by:
    `getName` in interface `ITable`

### setName

    public void setName(java.lang.String tableName)

  Specified by:
    `setName` in interface `ITable`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD