亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? torquecomponent.java

?? 另外一種持久性o/m軟件
?? JAVA
字號:
package org.apache.torque.avalon;/* * Copyright 2003-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *     http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */import java.sql.Connection;import org.apache.avalon.framework.activity.Initializable;import org.apache.avalon.framework.activity.Startable;import org.apache.avalon.framework.component.Component;import org.apache.avalon.framework.configuration.Configurable;import org.apache.avalon.framework.configuration.Configuration;import org.apache.avalon.framework.configuration.ConfigurationException;import org.apache.avalon.framework.context.Context;import org.apache.avalon.framework.context.ContextException;import org.apache.avalon.framework.context.Contextualizable;import org.apache.avalon.framework.logger.AbstractLogEnabled;import org.apache.avalon.framework.thread.ThreadSafe;import org.apache.commons.lang.StringUtils;import org.apache.torque.TorqueException;import org.apache.torque.TorqueInstance;import org.apache.torque.adapter.DB;import org.apache.torque.manager.AbstractBaseManager;import org.apache.torque.map.DatabaseMap;/** * Avalon component for Torque. * * @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a> * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a> * @version $Id: TorqueComponent.java,v 1.10 2005/07/02 07:22:34 tfischer Exp $ */public class TorqueComponent        extends AbstractLogEnabled        implements Component,                   Configurable,                   Initializable,                   Contextualizable,                   Startable,                   ThreadSafe{    /** The Avalon Context */    private Context context = null;    /** The instance of Torque used by this component. */    private TorqueInstance torqueInstance = null;    /** The configuration file for Torque. */    private String configFile = null;    /**     * Creates a new instance.  Default constructor used by Avalon.     */    public TorqueComponent()    {        // If we simply do a "new TorqueInstance()" here, we will get        // into trouble when some internal classes (e.g. the DatasSource Factory)        // simply calls Torque.<xxx> and gets a different TorqueInstance        // than the one we configured here. Make sure that we use the        // same object as the Facade class does.        this.torqueInstance = org.apache.torque.Torque.getInstance();    }    /**     * Creates a new instance.     *     * @param torqueInstance The instance of the Torque core used by     * this component.     */    protected TorqueComponent(TorqueInstance torqueInstance)    {        this.torqueInstance = torqueInstance;    }    /**     * @return A reference to our instance of the Torque core.     */    private TorqueInstance getTorque()    {        return torqueInstance;    }    /*     * ========================================================================     *     * Avalon Component Interfaces     *     * ========================================================================     */    /**     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)     */    public void configure(Configuration configuration)            throws ConfigurationException    {        getLogger().debug("configure(" + configuration + ")");        String configFile = configuration.getChild("configfile").getValue();        String appRoot = null;        try        {            appRoot = (context == null)                     ? null : (String) context.get("componentAppRoot");        }        catch (ContextException ce)        {            getLogger().error("Could not load Application Root from Context");        }        if (StringUtils.isNotEmpty(appRoot))        {            if (appRoot.endsWith("/"))            {                appRoot = appRoot.substring(0, appRoot.length() - 1);                getLogger().debug("Application Root changed to " + appRoot);            }            if (configFile.startsWith("/"))            {                configFile = configFile.substring(1);                getLogger().debug("Config File changes to " + configFile);            }                        StringBuffer sb = new StringBuffer();            sb.append(appRoot);            sb.append('/');            sb.append(configFile);                        configFile = sb.toString();        }        getLogger().debug("Config File is " + configFile);        this.configFile = configFile;    }    /**     * @see org.apache.avalon.framework.context.Contextualizable     */    public void contextualize(Context context)            throws ContextException    {        this.context = context;    }    /**     * @see org.apache.avalon.framework.activity.Initializable#initialize()     */    public void initialize()            throws Exception    {        getLogger().debug("initialize()");        getTorque().init(configFile);    }    /**     * @see org.apache.avalon.framework.activity.Startable#start()     */    public void start()    {        getLogger().debug("start()");    }    /**     * @see org.apache.avalon.framework.activity.Startable#stop()     */    public void stop()    {        getLogger().debug("stop()");        try         {        	getTorque().shutdown();        }        catch (Exception e)        {            getLogger().error("Error while stopping Torque", e);        }    }    /*     * ========================================================================     *     * Torque Methods, accessible from the Component     *     * ========================================================================     */    /**     * Determine whether Torque has already been initialized.     *     * @return true if Torque is already initialized     */    public boolean isInit()    {        return getTorque().isInit();    }    /**     * Get the configuration for this component.     *     * @return the Configuration     */    public org.apache.commons.configuration.Configuration getConfiguration()    {        return getTorque().getConfiguration();    }    /**     * This method returns a Manager for the given name.     *     * @param name name of the manager     * @return a Manager     */    public AbstractBaseManager getManager(String name)    {        return getTorque().getManager(name);    }    /**     * This methods returns either the Manager from the configuration file,     * or the default one provided by the generated code.     *     * @param name name of the manager     * @param defaultClassName the class to use if name has not been configured     * @return a Manager     */    public AbstractBaseManager getManager(String name,            String defaultClassName)    {        return getTorque().getManager(name, defaultClassName);    }    /**     * Returns the default database map information.     *     * @return A DatabaseMap.     * @throws TorqueException Any exceptions caught during processing will be     *         rethrown wrapped into a TorqueException.     */    public DatabaseMap getDatabaseMap()            throws TorqueException    {        return getTorque().getDatabaseMap();    }    /**     * Returns the database map information. Name relates to the name     * of the connection pool to associate with the map.     *     * @param name The name of the database corresponding to the     *        <code>DatabaseMap</code> to retrieve.     * @return The named <code>DatabaseMap</code>.     * @throws TorqueException Any exceptions caught during processing will be     *         rethrown wrapped into a TorqueException.     */    public DatabaseMap getDatabaseMap(String name)            throws TorqueException    {        return getTorque().getDatabaseMap(name);    }    /**     * Register a MapBuilder     *     * @param className the MapBuilder     */    public void registerMapBuilder(String className)    {        getTorque().registerMapBuilder(className);    }    /**     * This method returns a Connection from the default pool.     *     * @return The requested connection.     * @throws TorqueException Any exceptions caught during processing will be     *         rethrown wrapped into a TorqueException.     */    public Connection getConnection()            throws TorqueException    {        return getTorque().getConnection();    }    /**     *     * @param name The database name.     * @return a database connection     * @throws TorqueException Any exceptions caught during processing will be     *         rethrown wrapped into a TorqueException.     */    public Connection getConnection(String name)            throws TorqueException    {        return getTorque().getConnection(name);    }    /**     * This method returns a Connecton using the given parameters.     * You should only use this method if you need user based access to the     * database!     *     * @param name The database name.     * @param username The name of the database user.     * @param password The password of the database user.     * @return A Connection.     * @throws TorqueException Any exceptions caught during processing will be     *         rethrown wrapped into a TorqueException.     */    public Connection getConnection(String name, String username,            String password)            throws TorqueException    {        return getTorque().getConnection(name, username, password);    }    /**     * Returns database adapter for a specific connection pool.     *     * @param name A pool name.     * @return The corresponding database adapter.     * @throws TorqueException Any exceptions caught during processing will be     *         rethrown wrapped into a TorqueException.     */    public DB getDB(String name)            throws TorqueException    {        return getTorque().getDB(name);    }    /**     * Returns the name of the default database.     *     * @return name of the default DB     */    public String getDefaultDB()    {        return getTorque().getDefaultDB();    }    /**     * Closes a connection.     *     * @param con A Connection to close.     */    public void closeConnection(Connection con)    {        getTorque().closeConnection(con);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产一区a| 亚洲精品免费一二三区| 国产精品日韩精品欧美在线| 亚洲一二三专区| 国产精品一区二区在线观看网站| 色噜噜狠狠一区二区三区果冻| 日韩精品一区二区三区四区 | 欧美一区午夜精品| 国产肉丝袜一区二区| 秋霞午夜鲁丝一区二区老狼| 99久久免费视频.com| 26uuu亚洲| 视频在线观看一区二区三区| 色婷婷综合久久久中文字幕| 国产女主播在线一区二区| 久久国产精品免费| 欧美日韩精品欧美日韩精品一 | 一区二区三区中文在线观看| 国产精品一级黄| 欧美白人最猛性xxxxx69交| 亚洲aaa精品| 亚洲国产精品二十页| 激情亚洲综合在线| 日韩欧美区一区二| 美女看a上一区| 91超碰这里只有精品国产| 亚洲午夜av在线| 欧美性感一区二区三区| 亚洲一区在线免费观看| 91国内精品野花午夜精品| 亚洲色图制服诱惑 | 91麻豆精品视频| 中文字幕一区二| 夜夜夜精品看看| 国产一区91精品张津瑜| 日韩欧美国产一区二区三区| 肉丝袜脚交视频一区二区| 3d动漫精品啪啪一区二区竹菊| 亚洲制服丝袜av| 欧美三级一区二区| 亚洲成人免费视频| 8x8x8国产精品| 国内精品伊人久久久久av一坑| 欧美xfplay| 国产成都精品91一区二区三| 国产欧美精品一区二区色综合朱莉| 国产69精品久久777的优势| 中日韩av电影| 色成人在线视频| 日本不卡123| 久久久99久久精品欧美| 不卡欧美aaaaa| 亚洲午夜视频在线观看| 日韩一区二区三区在线观看| 国产一级精品在线| 中文字幕在线不卡一区二区三区| 欧美在线观看视频一区二区 | 日本美女一区二区三区| 日韩免费一区二区三区在线播放| 国产一区二区三区在线看麻豆| 日本一区二区成人| 欧美综合久久久| 国产在线乱码一区二区三区| 中文字幕一区二区不卡| 欧美片在线播放| 国产成人av福利| 亚洲国产wwwccc36天堂| 久久精品日产第一区二区三区高清版| 成人av免费网站| 蜜桃精品视频在线| 捆绑调教一区二区三区| 国产美女一区二区三区| 亚洲男人都懂的| 日韩一级欧美一级| 97成人超碰视| 国产一区二区免费看| 一区二区国产盗摄色噜噜| 精品成人在线观看| 在线视频欧美区| 成人免费视频app| 日韩成人伦理电影在线观看| 日韩一区在线免费观看| 精品国免费一区二区三区| 91久久一区二区| 国产精品一区二区在线观看网站| 亚洲成人你懂的| 中文字幕一区二区三区av| 精品理论电影在线| 欧美久久久久中文字幕| 91玉足脚交白嫩脚丫在线播放| 九九视频精品免费| 五月婷婷综合在线| 国产精品国产自产拍高清av | 亚洲成年人网站在线观看| 欧美韩国一区二区| 精品国产百合女同互慰| 欧美一区二区三区视频免费播放| 一本到高清视频免费精品| 高清国产一区二区| 国产麻豆精品久久一二三| 免费成人美女在线观看.| 亚洲国产日产av| 亚洲精品日韩综合观看成人91| 肉丝袜脚交视频一区二区| 亚洲欧美日韩人成在线播放| 国产日韩高清在线| 久久久精品蜜桃| 亚洲精品在线观看网站| 日韩欧美国产综合一区| 日韩免费观看高清完整版| 欧美日韩五月天| 欧美日韩精品免费| 欧美日韩精品福利| 正在播放一区二区| 91麻豆精品国产91久久久久久久久| 在线亚洲精品福利网址导航| 色综合久久88色综合天天| 99精品久久免费看蜜臀剧情介绍| 粉嫩av一区二区三区| 国产电影一区在线| 成人一区在线看| 99精品欧美一区二区蜜桃免费| 不卡一区二区中文字幕| 91老司机福利 在线| 91亚洲国产成人精品一区二区三 | 久久蜜臀精品av| 国产女主播一区| 亚洲视频香蕉人妖| 有码一区二区三区| 午夜精品福利久久久| 秋霞午夜鲁丝一区二区老狼| 国内外精品视频| 99久久国产免费看| 色欧美乱欧美15图片| 欧美日韩一区二区三区视频| 69精品人人人人| 国产亚洲一本大道中文在线| 中文字幕欧美一区| 亚洲一区二区偷拍精品| 丝袜亚洲另类丝袜在线| 久久国产麻豆精品| 99视频在线精品| 欧美日本一区二区| 久久看人人爽人人| 亚洲精品免费在线播放| 日产精品久久久久久久性色| 国产宾馆实践打屁股91| 日本道精品一区二区三区| 欧美一二三区在线观看| 国产精品美女一区二区在线观看| 亚洲一区中文日韩| 国产一区二区三区四区五区入口| 91亚洲大成网污www| 欧美一区二区三区公司| 国产精品入口麻豆九色| 日韩av高清在线观看| 成人网页在线观看| 欧美一级在线视频| 18成人在线视频| 国产在线不卡一区| 在线观看国产一区二区| 久久久国际精品| 日本亚洲免费观看| 91首页免费视频| 欧美精品一区二区在线观看| 亚洲精品日日夜夜| 福利一区在线观看| 欧美一区二区三区性视频| 亚洲三级电影网站| 国产原创一区二区| 欧美人与性动xxxx| 亚洲黄色片在线观看| 国产一区在线看| 91精品国产综合久久久蜜臀粉嫩| 中文字幕在线观看一区二区| 久久精品国产亚洲一区二区三区| 一本大道久久a久久精二百| 久久久综合视频| 精品一区二区三区在线视频| 欧美日韩一区不卡| 亚洲男人的天堂在线观看| 国产美女娇喘av呻吟久久| 欧美一区二区在线免费播放 | 欧美在线视频不卡| 亚洲欧洲精品一区二区三区不卡 | 成人少妇影院yyyy| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 成人18视频日本| 久久婷婷综合激情| 久久97超碰色| 日韩一区二区中文字幕| 天使萌一区二区三区免费观看| 欧美午夜一区二区| 亚洲综合一二三区| 欧洲精品视频在线观看| 一区二区视频免费在线观看| 97se亚洲国产综合在线| 亚洲欧洲精品天堂一级| 99re66热这里只有精品3直播| 中文字幕不卡的av|