2004.04.29


com.jdc.rdb.sql.dml.clause
Class Limit

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.rdb.sql.SQLClause
              |
              +--com.jdc.rdb.sql.dml.DMLClause
                    |
                    +--com.jdc.rdb.sql.dml.clause.Limit
All Implemented Interfaces:
Clause, DeleteClause, SelectClause, Serializable, UpdateClause

public class Limit
extends DMLClause
implements SelectClause, UpdateClause, DeleteClause

Limit represents a Select, Update, or Delete statement LIMIT clause. The optional LIMIT clause specifies the maximum number of Table rows for the specified SQL statement.

Note:
This SQL statement clause is not compatible with the ANSI SQL-92 standard.

Version:
2.0
Author:
Jay Damon
See Also:
Select, Update, Delete, Serialized Form

Field Summary
 
Fields inherited from class com.jdc.rdb.sql.dml.DMLClause
sqlClause
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
Limit()
          Constructs a new Limit clause object.
Limit(int rows)
          Constructs a new Limit clause object for the specified maximum number of Table rows.
 
Method Summary
 String getKeyword()
          Returns the Limit clause keyword.
 String getValue()
          Returns the Limit clause value.
 Limit setMaximumRows(int rows)
          Specifies the maximum number of Table rows for the specified SQL statement.
 String toString()
          Returns a String representation of this Limit clause.
 
Methods inherited from class com.jdc.rdb.sql.dml.DMLClause
getKeyword
 
Methods inherited from class com.jdc.rdb.sql.SQLClause
contains, setKeyword, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Limit

public Limit()
Constructs a new Limit clause object.


Limit

public Limit(int rows)
Constructs a new Limit clause object for the specified maximum number of Table rows.

Throws:
SQLInvalidException - The maximum rows specified is less than or equal to 0.
See Also:
setMaximumRows(int)
Method Detail

getKeyword

public String getKeyword()
Returns the Limit clause keyword.

Overrides:
getKeyword in class SQLClause
Returns:
The Limit clause keyword.

getValue

public String getValue()
Returns the Limit clause value.

Overrides:
getValue in class SQLClause
Returns:
The Limit clause value.

setMaximumRows

public Limit setMaximumRows(int rows)
Specifies the maximum number of Table rows for the specified SQL statement.

Returns:
This Limit clause object.
Throws:
SQLInvalidException - The maximum rows specified is less than or equal to 0.

toString

public String toString()
Returns a String representation of this Limit clause.

Specified by:
toString in interface SelectClause
Overrides:
toString in class SQLClause
Returns:
A String representation of this Limit clause.

2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.