jdbcadmin.core.tools
Class DataManager

java.lang.Object
  extended byjdbcadmin.core.tools.AbstractCnxUser
      extended byjdbcadmin.core.tools.DataManager

public class DataManager
extends AbstractCnxUser

Class for managing data.

Author:
Thomas Recloux (trecloux@norsys.fr)

Field Summary
 
Fields inherited from class jdbcadmin.core.tools.AbstractCnxUser
cnx, conInfos
 
Constructor Summary
DataManager(ConnectionInfo aCnxInfos, IAccessAuthorization aAuthorizations)
          Cosntructor which set up connection informations and access authorizations
 
Method Summary
 void delete(Line aLine)
          Deletes the specified line from the database
 void insert(Line aLine)
          Insert the specified line in the database.
 java.util.List select(Table aTable, int aIdxDebut, int aNbLines)
          Retrieves some lines from the specified table.
 void update(Line aLine)
          Update the database with the specified line
 
Methods inherited from class jdbcadmin.core.tools.AbstractCnxUser
connect, disconnect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataManager

public DataManager(ConnectionInfo aCnxInfos,
                   IAccessAuthorization aAuthorizations)
Cosntructor which set up connection informations and access authorizations

Parameters:
aCnxInfos - connection informations
aAuthorizations - access authorizations
Method Detail

select

public java.util.List select(Table aTable,
                             int aIdxDebut,
                             int aNbLines)
                      throws TechnicalException,
                             DataNotFoundException
Retrieves some lines from the specified table.
The index of the first line is 0.
Cannot retrieve more than 1000 lines

Parameters:
aTable - The table to select
aIdxDebut - Index for the first line
aNbLines - Number of lines to retrieve
Returns:
List of lines #jdbcadmin.core.data.Ligne
Throws:
TechnicalException - Technical error
DataNotFoundException - Data not found

insert

public void insert(Line aLine)
            throws TechnicalException,
                   ConvertionException
Insert the specified line in the database.

Parameters:
aLine - the line to insert
Throws:
TechnicalException - Technical error.
ConvertionException - Convertion error (the exception specify the bad column)

update

public void update(Line aLine)
            throws TechnicalException,
                   FunctionalException,
                   DangerousOperationException,
                   ConvertionException
Update the database with the specified line

Parameters:
aLine - the line to update
Throws:
TechnicalException - Technical error
DangerousOperationException - Dangerous operation (no primary key)
FunctionalException - Functionnal error (lines updated <> 1)
ConvertionException - Convertion error (the exception specify the bad column)

delete

public void delete(Line aLine)
            throws TechnicalException,
                   FunctionalException,
                   DangerousOperationException,
                   ConvertionException
Deletes the specified line from the database

Parameters:
aLine - the line to delete
Throws:
TechnicalException - Technical error
DangerousOperationException - Dangerous operation (no primary key)
FunctionalException - Functionnal error (lines updated <> 1)
ConvertionException - Convertion error (the exception specify the bad column)


Copyright © 2004-2005 Norsys. All Rights Reserved.