geoxygenestatementmanager.java
来自「用于GIS(全球地理系统)的分析和处理的代码。」· Java 代码 · 共 125 行
JAVA
125 行
/*
* This file is part of the GeOxygene project source files.
*
* GeOxygene aims at providing an open framework which implements OGC/ISO specifications for
* the development and deployment of geographic (GIS) applications. It is a open source
* contribution of the COGIT laboratory at the Institut G閛graphique National (the French
* National Mapping Agency).
*
* See: http://oxygene-project.sourceforge.net
*
* Copyright (C) 2005 Institut G閛graphique National
*
* This library is free software; you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Foundation;
* either version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with
* this library (see file LICENSE if present); if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package fr.ign.cogit.geoxygene.datatools.ojb;
import java.lang.reflect.Method;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Map;
import java.util.WeakHashMap;
import org.apache.ojb.broker.Identity;
import org.apache.ojb.broker.PersistenceBroker;
import org.apache.ojb.broker.PersistenceBrokerException;
import org.apache.ojb.broker.PersistenceBrokerSQLException;
import org.apache.ojb.broker.accesslayer.ConnectionManagerIF;
import org.apache.ojb.broker.accesslayer.LookupException;
import org.apache.ojb.broker.accesslayer.StatementManager;
import org.apache.ojb.broker.accesslayer.StatementManagerIF;
import org.apache.ojb.broker.accesslayer.StatementsForClassFactory;
import org.apache.ojb.broker.accesslayer.StatementsForClassIF;
import org.apache.ojb.broker.core.ValueContainer;
import org.apache.ojb.broker.metadata.ArgumentDescriptor;
import org.apache.ojb.broker.metadata.ClassDescriptor;
import org.apache.ojb.broker.metadata.FieldDescriptor;
import org.apache.ojb.broker.metadata.ProcedureDescriptor;
import org.apache.ojb.broker.platforms.Platform;
import org.apache.ojb.broker.platforms.PlatformException;
import org.apache.ojb.broker.platforms.PlatformFactory;
import org.apache.ojb.broker.platforms.PlatformOracle9iImpl;
import org.apache.ojb.broker.platforms.PlatformOracleImpl;
import org.apache.ojb.broker.platforms.PlatformPostgreSQLImpl;
import org.apache.ojb.broker.query.BetweenCriteria;
import org.apache.ojb.broker.query.Criteria;
import org.apache.ojb.broker.query.ExistsCriteria;
import org.apache.ojb.broker.query.FieldCriteria;
import org.apache.ojb.broker.query.InCriteria;
import org.apache.ojb.broker.query.NullCriteria;
import org.apache.ojb.broker.query.Query;
import org.apache.ojb.broker.query.SelectionCriteria;
import org.apache.ojb.broker.query.SqlCriteria;
import org.apache.ojb.broker.util.JdbcTypesHelper;
import org.apache.ojb.broker.util.logging.Logger;
import org.apache.ojb.broker.util.logging.LoggerFactory;
import org.postgis.PGgeometry;
//import fr.ign.cogit.geoxygene.datatools.oracle.ArrayGeOxygene2Oracle;
//import fr.ign.cogit.geoxygene.datatools.oracle.GeomGeOxygene2Oracle;
/**
* 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 :
* <br> Utilisation des noms de classes et de la r閒lection pour permettre la compilation s閜閞閑 pour Oracle.
* <br> Patch pour permettre l'utilisation de la meme classe de "FieldConversion" pour Oracle et Postgis.
*
* @author Thierry Badard & Arnaud Braun
* @version 1.1
*
*/
public class GeOxygeneStatementManager implements StatementManagerIF
{
private Logger m_log = LoggerFactory.getLogger(StatementManager.class);
/** internal table of StatementForClass objects */
private Map m_statementTable = new WeakHashMap();
/** the associated broker */
// private final PersistenceBroker m_broker; initial OJB
private final GeOxygenePersistenceBrokerImpl m_broker; // GeOxygene
private Platform m_platform;
/**
* Used when OJB run in JBoss
* Find a better solution to handle OJB within JBoss
* --> the JCA implementation should solve this problem
*/
private boolean m_eagerRelease;
private ConnectionManagerIF m_conMan;
// AJOUT pour GeOxygene ---------------------------------------------------
// Nom des classes relatives
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?