2004.04.29


com.jdc.app.rdb.tbl.ref.dao
Class CountryDAO

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.rdb.tbl.dao.DataAccessObject
              |
              +--com.jdc.rdb.tbl.dao.ReferenceTableDAO
                    |
                    +--com.jdc.app.rdb.tbl.ref.dao.CountryDAO

public class CountryDAO
extends ReferenceTableDAO

The CountryDAO data access object enables access of the Country reference table.

Version:
1.0
Author:
Jay Damon
See Also:
Country, CountryDTO

Field Summary
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
CountryDAO()
          Constructs a new CountryDAO data access object.
 
Method Summary
 DeleteStatus delete(int countryId)
          Deletes a row from the Country table and returns the DeleteStatus.
 InsertStatus insert(CountryDTO country)
          Inserts a row in the Country table and returns the InsertStatus.
static void main(String[] args)
          Executes unit tests for the CountryDAO class.
 boolean select(int countryId)
          Selects a row in the Country table.
 UpdateStatus update(CountryDTO country)
          Updates a row in the Country table and returns the UpdateStatus.
 
Methods inherited from class com.jdc.rdb.tbl.dao.DataAccessObject
getTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountryDAO

public CountryDAO()
Constructs a new CountryDAO data access object.

Method Detail

delete

public DeleteStatus delete(int countryId)
Deletes a row from the Country table and returns the DeleteStatus.

Returns:
A DeleteStatus object.

insert

public InsertStatus insert(CountryDTO country)
Inserts a row in the Country table and returns the InsertStatus.

Returns:
An InsertStatus object.

select

public boolean select(int countryId)
Selects a row in the Country table. Returns true if the select is successful.

Returns:
True if the select is successful.
False if the select is not successful.

update

public UpdateStatus update(CountryDTO country)
Updates a row in the Country table and returns the UpdateStatus.

Returns:
An UpdateStatus object.

main

public static void main(String[] args)
Executes unit tests for the CountryDAO class.


2004.04.29



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