com.ingenta.odb
Class AbstractManager

java.lang.Object
  extended bycom.ingenta.odb.AbstractManager
All Implemented Interfaces:
Manager

public abstract class AbstractManager
extends java.lang.Object
implements Manager

An AbstractManager is the base call for managing entities.


Constructor Summary
AbstractManager()
           
 
Method Summary
 void execute(Transaction transaction, java.lang.String statement, java.lang.Object[] parameters)
          Execute the given SQL statement after binding the given parameters.
 java.sql.PreparedStatement getPrepareStatement(Transaction transaction, java.lang.String statement, java.lang.Object[] parameters)
          Returns a prepared statement from the given SQL expression and bound with the given paramaters.
protected abstract  java.lang.Object load(Transaction transaction, java.sql.ResultSet rs)
          Returns a fully constructed entity object from the given result set.
 java.lang.Object select1(Transaction transaction, java.lang.String statement, java.lang.Object[] parameters)
          Execute the given SQL statement after binding the given parameters.
 java.lang.Integer selectInteger(Transaction transaction, java.lang.String statement, java.lang.Object[] parameters)
          Execute the given SQL statement after binding the given parameters.
 java.util.List selectIntegers(Transaction transaction, java.lang.String statement, java.lang.Object[] parameters)
          Execute the given SQL statement after binding the given parameters.
 java.util.List selectN(Transaction transaction, java.lang.String statement, java.lang.Object[] parameters)
          Execute the given SQL statement after binding the given parameters.
 java.lang.Object selectObject(Transaction transaction, java.lang.String statement, java.lang.Object[] parameters)
          Execute the given SQL statement after binding the given parameters.
 java.util.List selectObjects(Transaction transaction, java.lang.String statement, java.lang.Object[] parameters)
          Execute the given SQL statement after binding the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ingenta.odb.Manager
create, getManagedClass, init, load, load, load, remove, update
 

Constructor Detail

AbstractManager

public AbstractManager()
Method Detail

load

protected abstract java.lang.Object load(Transaction transaction,
                                         java.sql.ResultSet rs)
                                  throws OdbException
Returns a fully constructed entity object from the given result set.

Throws:
OdbException

execute

public void execute(Transaction transaction,
                    java.lang.String statement,
                    java.lang.Object[] parameters)
             throws OdbException
Execute the given SQL statement after binding the given parameters.

Throws:
OdbException

selectObject

public java.lang.Object selectObject(Transaction transaction,
                                     java.lang.String statement,
                                     java.lang.Object[] parameters)
                              throws OdbException
Execute the given SQL statement after binding the given parameters. Returns the first row's first column. It is not an error for the statement to return more than one row or more than one column.

Throws:
OdbException

selectObjects

public java.util.List selectObjects(Transaction transaction,
                                    java.lang.String statement,
                                    java.lang.Object[] parameters)
                             throws OdbException
Execute the given SQL statement after binding the given parameters. Returns the first column of each row. It is not an error for the statement to return more than one column.

Throws:
OdbException

selectInteger

public java.lang.Integer selectInteger(Transaction transaction,
                                       java.lang.String statement,
                                       java.lang.Object[] parameters)
                                throws OdbException
Execute the given SQL statement after binding the given parameters. Returns the first row's first column as an Integer. It is not an error for the statement to return more than one row or more than one column.

Throws:
OdbException

selectIntegers

public java.util.List selectIntegers(Transaction transaction,
                                     java.lang.String statement,
                                     java.lang.Object[] parameters)
                              throws OdbException
Execute the given SQL statement after binding the given parameters. Returns the first column of each row. It is not an error for the statement to return more than one column.

Throws:
OdbException

select1

public java.lang.Object select1(Transaction transaction,
                                java.lang.String statement,
                                java.lang.Object[] parameters)
                         throws OdbException
Execute the given SQL statement after binding the given parameters. Returns the entity constructed with load( Trasaction, ResultSet ).

Throws:
OdbException

selectN

public java.util.List selectN(Transaction transaction,
                              java.lang.String statement,
                              java.lang.Object[] parameters)
                       throws OdbException
Execute the given SQL statement after binding the given parameters. Returns the entities constructed with load( Trasaction, ResultSet ).

Throws:
OdbException

getPrepareStatement

public java.sql.PreparedStatement getPrepareStatement(Transaction transaction,
                                                      java.lang.String statement,
                                                      java.lang.Object[] parameters)
                                               throws java.io.IOException,
                                                      java.sql.SQLException
Returns a prepared statement from the given SQL expression and bound with the given paramaters.

Throws:
java.io.IOException
java.sql.SQLException