com.xenonsoft.bridgetown.test.aop.transaction
Class CurrentAccountDAO

java.lang.Object
  extended bycom.xenonsoft.bridgetown.test.aop.transaction.CurrentAccountDAO
All Implemented Interfaces:
ICurrentAccountDAO

public class CurrentAccountDAO
extends java.lang.Object
implements ICurrentAccountDAO

Current account data access object

Version:
$Id: CurrentAccountDAO.java,v 1.2 2005/02/23 01:32:38 peter_pilgrim Exp $
Author:
Peter Pilgrim, 28-Oct-2004 21:14:01

Field Summary
protected  java.sql.Connection connection
          Injected Connection instance by the transaction interceptor
 
Constructor Summary
CurrentAccountDAO()
          Default constructor, required
 
Method Summary
 void create(CurrentAccountBean account)
          Insert a new saving account records into the database
 void delete(CurrentAccountBean account)
          Delete a saving account records from the database
 java.util.List findAll()
          Reads the current account by its primary key (account id )
 java.sql.Connection getConnection()
          Gets the connection
 CurrentAccountBean retrieve(CurrentAccountBean account)
          Reads the current account by its primary key (account id )
 void setConnection(java.sql.Connection connection)
          Sets the connection
 void update(CurrentAccountBean account)
          Updates account records into the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

protected java.sql.Connection connection
Injected Connection instance by the transaction interceptor

Constructor Detail

CurrentAccountDAO

public CurrentAccountDAO()
Default constructor, required

Method Detail

getConnection

public java.sql.Connection getConnection()
Gets the connection

Returns:
Returns the connection.

setConnection

public void setConnection(java.sql.Connection connection)
Sets the connection

Parameters:
connection - the new value for connection

create

public void create(CurrentAccountBean account)
            throws java.sql.SQLException
Insert a new saving account records into the database

Specified by:
create in interface ICurrentAccountDAO
Parameters:
account - the account bean
Throws:
java.sql.SQLException - if a database persistence I/O problem occurs

retrieve

public CurrentAccountBean retrieve(CurrentAccountBean account)
                            throws java.sql.SQLException
Reads the current account by its primary key (account id )

Specified by:
retrieve in interface ICurrentAccountDAO
Parameters:
account - the account bean with the account id
Returns:
the account bean found or null if no such record exists
Throws:
java.sql.SQLException - if a database persistence I/O problem occurs

update

public void update(CurrentAccountBean account)
            throws java.sql.SQLException
Updates account records into the database

Specified by:
update in interface ICurrentAccountDAO
Parameters:
account - the account bean
Throws:
java.sql.SQLException - if a database persistence I/O problem occurs

delete

public void delete(CurrentAccountBean account)
            throws java.sql.SQLException
Delete a saving account records from the database

Specified by:
delete in interface ICurrentAccountDAO
Throws:
java.sql.SQLException - if a database persistence I/O problem occurs

findAll

public java.util.List findAll()
                       throws java.sql.SQLException
Reads the current account by its primary key (account id )

Specified by:
findAll in interface ICurrentAccountDAO
Returns:
the account bean found or null if no such record exists
Throws:
java.sql.SQLException - if a database persistence I/O problem occurs


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.