net.sf.colle.sql.test
Class TestTable2

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

public class TestTable2
extends Object

Generated file for accessing the TestTable2 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 TestTable2.Row
           
 
Constructor Summary
TestTable2()
           
 
Method Summary
static TestTable2.Row copyRow(TestTable2.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(TestTable2.Row pxRow, Connection pxConnection)
          Deletes a row.
static TestTable2.Row getRowByPrimaryKey(int pnId, Connection pxConnection)
          Returns a single row for the primary key specified.
static void insert(TestTable2.Row pxNewRow, Connection pxConnection)
          Inserts a new row.
static void lockTable(Connection pxConnection)
          Locks this table for multiple operations.
static TestTable2.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(TestTable2.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

TestTable2

public TestTable2()
Method Detail

getRowByPrimaryKey

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

Throws:
RowNotFoundException

insert

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

Throws:
ConstraintViolatedException
DuplicateRowException

update

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

Throws:
ConstraintViolatedException
RowNotFoundException

delete

public static void delete(TestTable2.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

copyRow

public static TestTable2.Row copyRow(TestTable2.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 TestTable2.Row newRow(int pnId)
Constructs a new row in memory from primary key information.