net.sf.colle.sql.test
Class TestTable

java.lang.Object
  extended bynet.sf.colle.sql.test.TestTable

public class TestTable
extends Object

Generated file for accessing the TestTable table/view. DO NOT EDIT. Make changes to net/sf/colle/sql/persistence/ [Table|View|Common]CodeGenerator.gen and regenerate. Created: 28 May 2001

Version:
$Revision: 1.17 $, $Date: 2004/07/10 04:22:41 $
Author:
net/sf/colle/sql/persistence/CommonCodeGenerator.gen

Nested Class Summary
static interface TestTable.Row
           
 
Constructor Summary
TestTable()
           
 
Method Summary
static TestTable.Row copyRow(TestTable.Row pxRow, int pnId)
          Copies the given row with a new primary key.
static void delete(int pnId, Connection pxConnection)
          Deletes a row identified by it's primary key.
static void delete(TestTable.Row pxRow, Connection pxConnection)
          Deletes a row.
static int getIdNextVal(Connection pxConnection)
          Unique identifier generator.
static TestTable.Row getNotNull(int pnId, Connection pxConnection)
          Returns a record if nNullable set to not null.
static List getNotNulls(Connection pxConnection)
          Returns records with nNullable set to not null.
static List getNotNulls(int[] pxIds, Connection pxConnection)
          Returns groups of records with nNullable set to not null.
static List getNotNulls(int pnOffset, int pnCount, Connection pxConnection)
          Returns records with nNullable set to not null.
static List getNotNulls(int pnOffset, int pnCount, String[] pxOrderByColumns, boolean[] pxOrderByDirections, Connection pxConnection)
          Returns records with nNullable set to not null.
static TestTable.Row getRowByPrimaryKey(int pnId, Connection pxConnection)
          Returns a single row for the primary key specified.
static void insert(TestTable.Row pxNewRow, Connection pxConnection)
          Inserts a new row.
static void lockTable(Connection pxConnection)
          Locks this table for multiple operations.
static TestTable.Row newRow(int pnId)
          Constructs a new row in memory from primary key information.
static void unlockTable(Connection pxConnection)
          Unlocks this table when previously locked with lockTable.
static void update(TestTable.Row pxRow, Connection pxConnection)
          Updates a row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestTable

public TestTable()
Method Detail

getIdNextVal

public static int getIdNextVal(Connection pxConnection)
Unique identifier generator.


getRowByPrimaryKey

public static TestTable.Row getRowByPrimaryKey(int pnId,
                                               Connection pxConnection)
                                        throws RowNotFoundException
Returns a single row for the primary key specified.

Throws:
RowNotFoundException

insert

public static void insert(TestTable.Row pxNewRow,
                          Connection pxConnection)
                   throws ConstraintViolatedException,
                          DuplicateRowException
Inserts a new row.

Throws:
ConstraintViolatedException
DuplicateRowException

update

public static void update(TestTable.Row pxRow,
                          Connection pxConnection)
                   throws ConstraintViolatedException,
                          RowNotFoundException
Updates a row.

Throws:
ConstraintViolatedException
RowNotFoundException

delete

public static void delete(TestTable.Row pxRow,
                          Connection pxConnection)
                   throws ConstraintViolatedException,
                          RowNotFoundException
Deletes a row.

Throws:
ConstraintViolatedException
RowNotFoundException

delete

public static void delete(int pnId,
                          Connection pxConnection)
                   throws ConstraintViolatedException,
                          RowNotFoundException
Deletes a row identified by it's primary key.

Throws:
ConstraintViolatedException
RowNotFoundException

lockTable

public static void lockTable(Connection pxConnection)
                      throws SQLException
Locks this table for multiple operations. This method should be used very sparingly when a large number of write operations will be performed on most of the records in the table. Calling this method may be a no-op as RDBMSs are not required to implement it. If locked, the table will remain locked until one of the following conditions is met: 1. unlockTable is called. 2. The current transaction is committed. 3. The connection is closed. Which of these conditions actually cause the table to become unlocked depends on the DBMS. It is therefore recommended that when possible all conditions are met to maintain compatibility across DBMSs.

Throws:
SQLException

unlockTable

public static void unlockTable(Connection pxConnection)
                        throws SQLException
Unlocks this table when previously locked with lockTable. Calling this method may be a no-op as RDBMSs are not required to implement it. Some RDBMSs may unlock all currently locked tables when this method is called.

Throws:
SQLException

getNotNull

public static TestTable.Row getNotNull(int pnId,
                                       Connection pxConnection)
                                throws RowNotFoundException
Returns a record if nNullable set to not null.

Throws:
RowNotFoundException

getNotNulls

public static List getNotNulls(Connection pxConnection)
Returns records with nNullable set to not null.


getNotNulls

public static List getNotNulls(int pnOffset,
                               int pnCount,
                               Connection pxConnection)
Returns records with nNullable set to not null.


getNotNulls

public static List getNotNulls(int pnOffset,
                               int pnCount,
                               String[] pxOrderByColumns,
                               boolean[] pxOrderByDirections,
                               Connection pxConnection)
Returns records with nNullable set to not null.


getNotNulls

public static List getNotNulls(int[] pxIds,
                               Connection pxConnection)
Returns groups of records with nNullable set to not null.


copyRow

public static TestTable.Row copyRow(TestTable.Row pxRow,
                                    int pnId)
Copies the given row with a new primary key.

Parameters:
pxRow - row to be copied
Returns:
new copy of the row

newRow

public static TestTable.Row newRow(int pnId)
Constructs a new row in memory from primary key information.