| java.lang.Object fr.ign.cogit.geoxygene.datatools.ojb.GeOxygeneStatementManager
GeOxygeneStatementManager | public class GeOxygeneStatementManager implements StatementManagerIF(Code) | | Meme chose que la classe org.apache.ojb.broker.accesslayer.StatementManager.
Permet de gerer les structures Oracle en passant un parametre de connection a un endroit.
Par rapport a la version originale de StatementManager :
les imports ont ete reorganises,
le constructeur renomme,
changement de la nature de l'attribut m_broker en GeOxygenePersistenceBrokerImpl,
changement d'une affectation de cet attribut dans le constructeur,
un ajout dans la methode bindStatementValue(),
changement dans getAllValues,
changement dans getKeyValues (2 methodes),
changement dans getNonKeyValues
modification des " setNull " (plusieurs) pour gerer le cas de l'ecriture de geometries nulles.
AB 11 juillet 2005 :
Utilisation des noms de classes et de la réflection pour permettre la compilation sépérée pour Oracle.
Patch pour permettre l'utilisation de la meme classe de "FieldConversion" pour Oracle et Postgis.
author: Thierry Badard & Arnaud Braun version: 1.1 |
Method Summary | |
public void | bindDelete(PreparedStatement stmt, Identity oid, ClassDescriptor cld) | public void | bindDelete(PreparedStatement stmt, ClassDescriptor cld, Object obj) | public void | bindInsert(PreparedStatement stmt, ClassDescriptor cld, Object obj) | public void | bindSelect(PreparedStatement stmt, Identity oid, ClassDescriptor cld) | public int | bindStatement(PreparedStatement stmt, Query query, ClassDescriptor cld, int param) | protected int | bindStatement(PreparedStatement stmt, Criteria crit, ClassDescriptor cld, int param) | public void | bindUpdate(PreparedStatement stmt, ClassDescriptor cld, Object obj) | public int | bindValues(PreparedStatement stmt, ValueContainer[] values, int index) | public void | closeResources(Statement stmt, ResultSet rs) | protected ValueContainer[] | getAllValues(ClassDescriptor cld, Object obj) | public PreparedStatement | getDeleteStatement(ClassDescriptor cld) | public Statement | getGenericStatement(ClassDescriptor cds, boolean scrollable) return a generic Statement for the given ClassDescriptor. | public PreparedStatement | getInsertStatement(ClassDescriptor cds) | protected ValueContainer[] | getKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) | protected ValueContainer[] | getKeyValues(PersistenceBroker broker, ClassDescriptor cld, Identity oid) | protected ValueContainer[] | getNonKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) | public PreparedStatement | getPreparedStatement(ClassDescriptor cds, String sql, boolean scrollable) | public PreparedStatement | getSelectByPKStatement(ClassDescriptor cds) | protected StatementsForClassIF | getStatementsForClass(ClassDescriptor cds) | public PreparedStatement | getUpdateStatement(ClassDescriptor cds) |
GeOxygeneStatementManager | public GeOxygeneStatementManager(PersistenceBroker pBroker)(Code) | | |
bindValues | public int bindValues(PreparedStatement stmt, ValueContainer[] values, int index) throws SQLException(Code) | | binds the given array of values (if not null) starting from the given
parameter index
the next parameter index |
getAllValues | protected ValueContainer[] getAllValues(ClassDescriptor cld, Object obj) throws PersistenceBrokerException(Code) | | returns an array containing values for all the Objects attribute
throws: PersistenceBrokerException - if there is an erros accessing obj field values |
getDeleteStatement | public PreparedStatement getDeleteStatement(ClassDescriptor cld) throws PersistenceBrokerSQLException, PersistenceBrokerException(Code) | | return a prepared DELETE Statement fitting for the given ClassDescriptor
|
getGenericStatement | public Statement getGenericStatement(ClassDescriptor cds, boolean scrollable) throws PersistenceBrokerException(Code) | | return a generic Statement for the given ClassDescriptor.
Never use this method for UPDATE/INSERT/DELETE if you want to use the batch mode.
|
getInsertStatement | public PreparedStatement getInsertStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException(Code) | | return a prepared Insert Statement fitting for the given ClassDescriptor
|
getKeyValues | protected ValueContainer[] getKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) throws PersistenceBrokerException(Code) | | returns an Array with an Objects PK VALUES
throws: PersistenceBrokerException - if there is an erros accessing o field values |
getKeyValues | protected ValueContainer[] getKeyValues(PersistenceBroker broker, ClassDescriptor cld, Identity oid) throws PersistenceBrokerException(Code) | | returns an Array with an Identities PK VALUES
throws: PersistenceBrokerException - if there is an erros accessing o field values |
getNonKeyValues | protected ValueContainer[] getNonKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) throws PersistenceBrokerException(Code) | | returns an Array with an Objects NON-PK VALUES
throws: PersistenceBrokerException - if there is an erros accessing o field values |
getPreparedStatement | public PreparedStatement getPreparedStatement(ClassDescriptor cds, String sql, boolean scrollable) throws PersistenceBrokerException(Code) | | return a generic Statement for the given ClassDescriptor
|
getSelectByPKStatement | public PreparedStatement getSelectByPKStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException(Code) | | return a prepared Select Statement for the given ClassDescriptor
|
getStatementsForClass | protected StatementsForClassIF getStatementsForClass(ClassDescriptor cds) throws PersistenceBrokerException(Code) | | return a StatementsForClass object for the given ClassDescriptor\
Note; not important to synchronize completely as a threading issue in this code
will only result in a little extra code being executed
|
getUpdateStatement | public PreparedStatement getUpdateStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException(Code) | | return a prepared Update Statement fitting to the given ClassDescriptor
|
|
|