com.tekann.codegen.pda.db
Interface IDAO

All Known Implementing Classes:
AbstractDAO

public interface IDAO

Interface for DAOs.

Author:
Evandro Rathke.

Method Summary
 void clear()
          Clean the table data.
 int count()
          Count method.
 IDTO createDTO()
          Creates a DefaultDTO
 void createIndex()
          Creates the indices.
 void createTable()
          Creates the table.
 int delete()
          Deletes the table data.
 void drop()
          Drop the table.
 void dropIndex()
          Removes the indices.
 litebase.ResultSet executeQuery(java.lang.String query)
          Execute a query.
 int executeUpdate(java.lang.String query)
          Execute a query.
 java.lang.String[] getColumnNames()
          Returns the column names.
 java.lang.String getColumns()
          Return table columns separate by comma.
 java.lang.String getDBTableName()
          Returns the DB table name.
 java.lang.String getPDATableName()
          Returns the PDA table name.
 java.lang.Object load()
          Load the table.
 void purge()
          Purge table data.
 int save(IDTO dto)
          Saves a new DefaultDTO.
 int save(IDTO dto, int attr)
          Saves a new DefaultDTO.
 void setColumns(java.lang.String columns)
          Set columns value.
 java.lang.String toXML()
          XML representation for DAO object.
 int update(IDTO dto)
          Updates a DefaultDTO.
 int update(IDTO dto, int attr)
          Updates a DefaultDTO.
 

Method Detail

clear

void clear()
           throws java.lang.Exception
Clean the table data.

Throws:
java.lang.Exception

purge

void purge()
           throws java.lang.Exception
Purge table data.

Throws:
java.lang.Exception

count

int count()
          throws java.lang.Exception
Count method.

Returns:
An integer
Throws:
java.lang.Exception

createDTO

IDTO createDTO()
               throws java.lang.Exception
Creates a DefaultDTO

Returns:
An IDTO
Throws:
java.lang.Exception

createIndex

void createIndex()
                 throws java.lang.Exception
Creates the indices.

Throws:
java.lang.Exception

createTable

void createTable()
                 throws java.lang.Exception
Creates the table.

Throws:
java.lang.Exception

delete

int delete()
           throws java.lang.Exception
Deletes the table data.

Returns:
An integer
Throws:
java.lang.Exception

dropIndex

void dropIndex()
               throws java.lang.Exception
Removes the indices.

Throws:
java.lang.Exception

getColumnNames

java.lang.String[] getColumnNames()
Returns the column names.

Returns:
A String array

getDBTableName

java.lang.String getDBTableName()
Returns the DB table name.

Returns:
A String

getPDATableName

java.lang.String getPDATableName()
Returns the PDA table name.

Returns:
A String

load

java.lang.Object load()
                      throws java.lang.Exception
Load the table.

Returns:
An Object
Throws:
java.lang.Exception

save

int save(IDTO dto)
         throws java.lang.Exception
Saves a new DefaultDTO.

Parameters:
dto -
Returns:
An integer
Throws:
java.lang.Exception

save

int save(IDTO dto,
         int attr)
         throws java.lang.Exception
Saves a new DefaultDTO.

Parameters:
dto -
attr -
Returns:
An integer
Throws:
java.lang.Exception

update

int update(IDTO dto)
           throws java.lang.Exception
Updates a DefaultDTO.

Parameters:
dto -
Returns:
An integer
Throws:
java.lang.Exception

update

int update(IDTO dto,
           int attr)
           throws java.lang.Exception
Updates a DefaultDTO.

Parameters:
dto -
attr -
Returns:
An integer
Throws:
java.lang.Exception

toXML

java.lang.String toXML()
XML representation for DAO object.

Returns:

getColumns

java.lang.String getColumns()
Return table columns separate by comma.

Returns:

setColumns

void setColumns(java.lang.String columns)
Set columns value.

Parameters:
columns -

executeQuery

litebase.ResultSet executeQuery(java.lang.String query)
                                throws java.lang.Exception
Execute a query.

Parameters:
query -
Returns:
Query result.
Throws:
java.lang.Exception

executeUpdate

int executeUpdate(java.lang.String query)
                  throws java.lang.Exception
Execute a query.

Parameters:
query -
Returns:
Rows affected.
Throws:
java.lang.Exception

drop

void drop()
          throws java.lang.Exception
Drop the table.

Throws:
java.lang.Exception