public class Function
extends java.lang.Object
| Constructor and Description |
|---|
Function() |
| Modifier and Type | Method and Description |
|---|---|
static java.sql.ResultSet |
getMatrix(java.sql.Connection conn,
java.lang.Integer size)
Creates a simple result set with two columns.
|
static boolean |
isPrime(int value)
Check if a value is a prime number.
|
static void |
main(java.lang.String... args)
This method is called when executing this sample application from the
command line.
|
static java.sql.ResultSet |
query(java.sql.Connection conn,
java.lang.String sql)
Execute a query.
|
static java.sql.ResultSet |
simpleResultSet()
Creates a simple result set with one row.
|
public static void main(java.lang.String... args)
throws java.lang.Exception
args - the command line parametersjava.lang.Exceptionpublic static boolean isPrime(int value)
value - the valuepublic static java.sql.ResultSet query(java.sql.Connection conn,
java.lang.String sql)
throws java.sql.SQLException
conn - the connectionsql - the SQL statementjava.sql.SQLExceptionpublic static java.sql.ResultSet simpleResultSet()
public static java.sql.ResultSet getMatrix(java.sql.Connection conn,
java.lang.Integer size)
throws java.sql.SQLException
conn - the connectionsize - the number of x and y valuesjava.sql.SQLException