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

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

?? basejetspeedskinpeer.java

?? jetspeed源代碼
?? JAVA
字號:
/*
 * Copyright 2000-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.
 */
package org.apache.jetspeed.om.registry.database;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.apache.jetspeed.om.registry.DBRegistry;
import org.apache.jetspeed.om.registry.Parameter;
import org.apache.jetspeed.om.registry.base.BaseMetaInfo;
import org.apache.jetspeed.om.registry.base.BaseSecurity;
import org.apache.jetspeed.om.registry.base.BaseSkinEntry;
import org.apache.jetspeed.services.logging.JetspeedLogFactoryService;
import org.apache.jetspeed.services.logging.JetspeedLogger;
import org.apache.torque.Torque;
import org.apache.torque.TorqueException;
import org.apache.torque.om.ObjectKey;
import org.apache.torque.om.SimpleKey;
import org.apache.torque.util.BasePeer;
import org.apache.torque.util.Criteria;

import com.workingdogs.village.DataSetException;
import com.workingdogs.village.QueryDataSet;
import com.workingdogs.village.Record;


/**
 * Base Peer for Skin registry entries.
 * 
 * @author <a href="mailto:susinha@cisco.com">Suchisubhra Sinha</a>
 * @version $Id: BaseJetspeedSkinPeer.java,v 1.3 2004/04/06 23:00:16 morciuch Exp $
 */
public class BaseJetspeedSkinPeer extends BasePeer implements DBRegistry
{
	
	/**
	 * Static initialization of the logger for this class
	 */    
	protected static final JetspeedLogger logger = JetspeedLogFactoryService.getLogger(BaseJetspeedSkinPeer.class.getName());      
	
    /** the table name for this class */
    public static final String TABLE_NAME = "SKIN";
    /** the column name for the PORTAL_ID field */
    public static final String ID;
    /** the column name for the NAME field */
    public static final String NAME;
    /** the column name for the HIDDEN field */
    public static final String HIDDEN;
    /** the column name for the ROLE field */
    public static final String ROLE;
    /** the column name for the TITLE field */
    public static final String TITLE;
    /** the column name for the DESCRIPTION field */
    public static final String DESCRIPTION;
    /** the column name for the IMAGE field */
    public static final String IMAGE;
    static {
        ID = "SKIN.ID";
        NAME = "SKIN.NAME";
        HIDDEN = "SKIN.HIDDEN";
        ROLE = "SKIN.ROLE";
        TITLE = "SKIN.TITLE";
        DESCRIPTION = "SKIN.DESCRIPTION";
        IMAGE = "SKIN.IMAGE";
        /*
           if (Torque.isInit())
           {
               try
               {
                   getMapBuilder();
               }
               catch (Exception e)
               {
                      
                   category.error("Could not initialize Peer", e);
               }
           }
        */
    }
    /** number of columns for this peer */
    public static final int numColumns = 7;
    /** A class that can be returned by this peer. */
    protected static final String CLASSNAME_DEFAULT =
        "org.apache.jetspeed.om.registry.base.BaseSkinEntry";
    /** A class that can be returned by this peer. */
    protected static final Class CLASS_DEFAULT = initClass(CLASSNAME_DEFAULT);
    /**
     * Class object initialization method.
     *
     * @param className name of the class to initialize
     * @return the initialized class
     */
    private static Class initClass(String className)
    {
        Class c = null;
        try
        {
            c = Class.forName(className);
        }
        catch (Throwable t)
        {
            logger.error(
                "A FATAL ERROR has occurred which should not "
                    + "have happened under any circumstance.  Please notify "
                    + "the Turbine developers <turbine-dev@jakarta.apache.org> "
                    + "and give as many details as possible (including the error "
                    + "stack trace).",
                t);
            // Error objects should always be propogated.
            if (t instanceof Error)
            {
                throw (Error) t.fillInStackTrace();
            }
        }
        return c;
    }
    /**
        * Get the list of objects for a ResultSet.  Please not that your
        * resultset MUST return columns in the right order.  You can use
        * getFieldNames() in BaseObject to get the correct sequence.
        *
        * @param results the ResultSet
        * @return the list of objects
        * @throws TorqueException Any exceptions caught during processing will be
        *         rethrown wrapped into a TorqueException.
        */
    public static List resultSet2Objects(java.sql.ResultSet results)
        throws TorqueException
    {
        try
        {
            QueryDataSet qds = null;
            List rows = null;
            try
            {
                qds = new QueryDataSet(results);
                rows = getSelectResults(qds);
            }
            finally
            {
                if (qds != null)
                {
                    qds.close();
                }
            }
            return populateObjects(rows);
        }
        catch (SQLException e)
        {
            throw new TorqueException(e);
        }
        catch (DataSetException e)
        {
            throw new TorqueException(e);
        }
    }
    /**
        * Add all the columns needed to create a new object.
        *
        * @param criteria object containing the columns to add.
        * @throws TorqueException Any exceptions caught during processing will be
        *         rethrown wrapped into a TorqueException.
        */
    public static void addSelectColumns(Criteria criteria)
        throws TorqueException
    {
        criteria.addSelectColumn(ID);
        criteria.addSelectColumn(NAME);
        criteria.addSelectColumn(HIDDEN);
        criteria.addSelectColumn(ROLE);
        criteria.addSelectColumn(TITLE);
        criteria.addSelectColumn(DESCRIPTION);
        criteria.addSelectColumn(IMAGE);
    }
    /**
         * Create a new object of type cls from a resultset row starting
         * from a specified offset.  This is done so that you can select
         * other rows than just those needed for this object.  You may
         * for example want to create two objects from the same row.
         *
         * @throws TorqueException Any exceptions caught during processing will be
         *         rethrown wrapped into a TorqueException.
         */
    public static BaseSkinEntry row2Object(Record row, int offset, Class cls)
        throws TorqueException
    {
        try
        {
            BaseSkinEntry obj = (BaseSkinEntry) cls.newInstance();
            populateObject(row, offset, obj);
            return obj;
        }
        catch (InstantiationException e)
        {
            throw new TorqueException(e);
        }
        catch (IllegalAccessException e)
        {
            throw new TorqueException(e);
        }
    }
    /**
     * Populates an object from a resultset row starting
     * from a specified offset.  This is done so that you can select
     * other rows than just those needed for this object.  You may
     * for example want to create two objects from the same row.
     *
     * @throws TorqueException Any exceptions caught during processing will be
     *         rethrown wrapped into a TorqueException.
     */
    public static void populateObject(
        Record row,
        int offset,
        BaseSkinEntry obj)
        throws TorqueException
    {
        try
        {
            int id = row.getValue(offset + 0).asInt();
            obj.setName(row.getValue(offset + 1).asString());
            obj.setHidden(row.getValue(offset + 2).asBoolean());
            obj.setTitle(row.getValue(offset + 4).asString());
            obj.setDescription(row.getValue(offset + 5).asString());
            //set  the security
            BaseSecurity security =
                new BaseSecurity(row.getValue(offset + 3).asString());
            obj.setSecurity(security);
            obj.setBaseSecurity(security);
            //create meta info
            BaseMetaInfo baseMetaInfo =
                new BaseMetaInfo(
                    row.getValue(offset + 4).asString(),
                    row.getValue(offset + 5).asString(),
                    row.getValue(offset + 6).asString());
            obj.setMetaInfo(baseMetaInfo);
            buildSkinParameters(id, obj);
        }
        catch (DataSetException e)
        {
            throw new TorqueException(e);
        }
    }
    /**
        * Method to get  regsitered data from database.
        *
        * @param criteria object used to create the SELECT statement.
        * @return List of selected Objects
        * @throws TorqueException Any exceptions caught during processing will be
        *         rethrown wrapped into a TorqueException.
        */
    public List getXREGDataFromDb() throws TorqueException
    {
        Criteria criteria = buildCriteria();
        return doSelect(criteria);
    }
    public boolean isModified(String lastUpdateDate)
    {
        return true;
    }
    /**
     * Method to do selects.
     *
     * @param criteria object used to create the SELECT statement.
     * @return List of selected Objects
     * @throws TorqueException Any exceptions caught during processing will be
     *         rethrown wrapped into a TorqueException.
     */
    public static List doSelect(Criteria criteria) throws TorqueException
    {
        return populateObjects(doSelectVillageRecords(criteria));
    }
    /**
        * Method to do selects within a transaction.
        *
        * @param criteria object used to create the SELECT statement.
        * @param con the connection to use
        * @return List of selected Objects
        * @throws TorqueException Any exceptions caught during processing will be
        *         rethrown wrapped into a TorqueException.
        */
    public static List doSelect(Criteria criteria, Connection con)
        throws TorqueException
    {
        return populateObjects(doSelectVillageRecords(criteria, con));
    }
    /**
       * Grabs the raw Village records to be formed into objects.
       * This method handles connections internally.  The Record objects
       * returned by this method should be considered readonly.  Do not
       * alter the data and call save(), your results may vary, but are
       * certainly likely to result in hard to track MT bugs.
       *
       * @throws TorqueException Any exceptions caught during processing will be
       *         rethrown wrapped into a TorqueException.
       */
    public static List doSelectVillageRecords(Criteria criteria)
        throws TorqueException
    {
        return BaseJetspeedSkinPeer.doSelectVillageRecords(
            criteria,
            (Connection) null);
    }
    /**
    * Grabs the raw Village records to be formed into objects.
     * This method should be used for transactions
     *
     * @param con the connection to use
     * @throws TorqueException Any exceptions caught during processing will be
     *         rethrown wrapped into a TorqueException.
     */
    public static List doSelectVillageRecords(
        Criteria criteria,
        Connection con)
        throws TorqueException
    {
        if (criteria.getSelectColumns().size() == 0)
        {
            addSelectColumns(criteria);
        }
        // Set the correct dbName if it has not been overridden
        // criteria.getDbName will return the same object if not set to
        // another value so == check is okay and faster
        if (criteria.getDbName() == Torque.getDefaultDB())
        {
            criteria.setDbName(DATABASE_NAME);
        }
        // BasePeer returns a List of Value (Village) arrays.  The array
        // order follows the order columns were placed in the Select clause.
        if (con == null)
        {
            return BasePeer.doSelect(criteria);
        }
        else
        {
            return BasePeer.doSelect(criteria, con);
        }
    }
    /**
     * The returned List will contain objects of the default type or
     * objects that inherit from the default.
     *
     * @throws TorqueException Any exceptions caught during processing will be
     *         rethrown wrapped into a TorqueException.
     */
    public static List populateObjects(List records) throws TorqueException
    {
        List results = new ArrayList(records.size());
        // populate the object(s)
        for (int i = 0; i < records.size(); i++)
        {
            Record row = (Record) records.get(i);
            results.add(
                BaseJetspeedSkinPeer.row2Object(
                    row,
                    1,
                    BaseJetspeedSkinPeer.getOMClass()));
        }
        return results;
    }
    /** Build a Criteria object from an ObjectKey */
    public static Criteria buildCriteria(ObjectKey pk)
    {
        Criteria criteria = new Criteria();
        criteria.add(ID, pk);
        return criteria;
    }
    /** Build a Criteria object  */
    public static Criteria buildCriteria()
    {
        Criteria criteria = new Criteria();
        return criteria;
    }
    /**
     * The class that the Peer will make instances of.
     * If the BO is abstract then you must implement this method
     * in the BO.
     *
     * @throws TorqueException Any exceptions caught during processing will be
     *         rethrown wrapped into a TorqueException.
     */
    public static Class getOMClass() throws TorqueException
    {
        return CLASS_DEFAULT;
    }
    /**
     * it will make the parameters  for this portlet
     * @param portlet object.
     * 
     */
    public static void buildSkinParameters(int id, BaseSkinEntry obj)
        throws TorqueException
    {
        try
        {
            List list =
                BaseJetspeedSkinParameterPeer.retrieveById(
                    SimpleKey.keyFor(id));
            if (list != null)
                for (int i = 0; i < list.size(); i++)
                {
                    Parameter p = (Parameter) list.get(i);
                    if (obj.getParameter(p.getName()) == null)
                        obj.addParameter(p);
                }
        }
        catch (Exception e)
        {
            throw new TorqueException(e);
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图.com| 国产成人av电影在线播放| 亚洲精品国产一区二区精华液| 制服.丝袜.亚洲.中文.综合| 欧美日韩国产bt| 欧美肥胖老妇做爰| 日韩一区二区在线播放| 精品裸体舞一区二区三区| 久久亚洲精精品中文字幕早川悠里 | 亚洲h在线观看| 亚洲成人av免费| 奇米一区二区三区| 国产在线不卡视频| 成人精品高清在线| 色呦呦国产精品| 欧美久久一区二区| 日韩视频在线一区二区| 久久影音资源网| 中文字幕的久久| 一区二区三区在线看| 亚洲二区在线视频| 裸体歌舞表演一区二区| 风间由美一区二区av101| 成人99免费视频| 在线看不卡av| 日韩久久免费av| 久久精品男人天堂av| 亚洲视频在线一区| 无吗不卡中文字幕| 国产成人无遮挡在线视频| 色综合天天狠狠| 在线不卡中文字幕播放| 337p日本欧洲亚洲大胆精品| 国产精品久久毛片av大全日韩| 亚洲一区二区三区在线看| 裸体一区二区三区| 丁香婷婷深情五月亚洲| 欧美三级蜜桃2在线观看| 精品久久一二三区| 亚洲精品视频自拍| 另类综合日韩欧美亚洲| av福利精品导航| 91精品国产一区二区人妖| 国产精品三级久久久久三级| 亚洲小少妇裸体bbw| 久久国产视频网| 色婷婷精品久久二区二区蜜臀av| 日韩一区二区三区观看| 综合在线观看色| 精品无人区卡一卡二卡三乱码免费卡| 成人午夜大片免费观看| 69精品人人人人| 亚洲欧洲日韩综合一区二区| 一本色道久久加勒比精品| 91精品国产福利| 亚洲视频在线观看三级| 精品在线视频一区| 欧美午夜寂寞影院| 欧美激情资源网| 麻豆国产精品一区二区三区| 色综合久久中文综合久久牛| 精品国产一区二区在线观看| 亚洲一区二区三区四区的| 成人免费视频国产在线观看| 777奇米成人网| 亚洲视频你懂的| 国产综合一区二区| 欧美精品色综合| 亚洲蜜臀av乱码久久精品蜜桃| 国产精品一区二区男女羞羞无遮挡| 欧洲精品一区二区三区在线观看| 亚洲国产精品精华液2区45| 捆绑紧缚一区二区三区视频| 欧美伊人精品成人久久综合97| 国产精品女主播av| 国产精品中文欧美| 日韩欧美国产一二三区| 亚洲午夜久久久久久久久电影院| 岛国一区二区三区| 精品国产伦理网| 蜜桃av一区二区| 欧洲国内综合视频| 亚洲色图欧洲色图婷婷| 国产激情一区二区三区四区| 日韩一级精品视频在线观看| 婷婷一区二区三区| 欧美日韩国产成人在线91| 亚洲综合精品自拍| 欧美这里有精品| 99精品视频一区二区三区| 久久先锋影音av鲁色资源网| 日本成人超碰在线观看| 88在线观看91蜜桃国自产| 亚洲综合色婷婷| 在线视频国内自拍亚洲视频| 亚洲理论在线观看| 色一情一伦一子一伦一区| 亚洲欧洲av在线| 91在线你懂得| 亚洲乱码日产精品bd| 色综合久久久久综合体桃花网| 国产精品高潮久久久久无| 成人国产精品免费| 国产精品电影院| 99re热视频精品| 亚洲免费在线观看| 在线一区二区观看| 午夜国产不卡在线观看视频| 欧美精品v国产精品v日韩精品 | 爽好多水快深点欧美视频| 欧洲另类一二三四区| 亚洲国产三级在线| 欧美精品在线一区二区| 午夜欧美视频在线观看| 日韩三级高清在线| 国产精品一级在线| 国产精品黄色在线观看| 在线日韩av片| 日韩黄色片在线观看| 欧美电视剧在线看免费| 国产成人在线观看| 亚洲欧洲色图综合| 欧美日韩国产高清一区二区| 久久www免费人成看片高清| 国产欧美日韩在线观看| 91视频国产资源| 亚洲成人中文在线| 精品国产乱码久久久久久久久| 国产成人精品三级| 亚洲免费在线看| 日韩一级黄色大片| 成人丝袜高跟foot| 亚洲高清一区二区三区| 日韩欧美成人一区二区| 成人久久视频在线观看| 亚洲一区在线观看视频| 日韩精品影音先锋| 99久久精品国产精品久久| 亚欧色一区w666天堂| 久久婷婷国产综合精品青草| 91女人视频在线观看| 天天综合天天综合色| 久久久久久久久久久久电影| 91看片淫黄大片一级在线观看| 青青草原综合久久大伊人精品优势| 国产日韩精品一区二区三区| 欧美性极品少妇| 国产精品一区二区久久不卡| 亚洲激情成人在线| 亚洲精品一区在线观看| 91福利精品视频| 国产尤物一区二区在线| 自拍偷拍欧美精品| 欧美哺乳videos| 一本大道av伊人久久综合| 久久er精品视频| 玉米视频成人免费看| 日韩欧美123| 色哟哟在线观看一区二区三区| 麻豆成人久久精品二区三区红| 亚洲人精品午夜| 精品福利一区二区三区| 欧美午夜精品一区| 懂色av中文字幕一区二区三区| 日本中文字幕一区| 亚洲精品中文字幕乱码三区 | 国产欧美一区二区精品仙草咪| 欧美日韩一卡二卡三卡| 成人教育av在线| 日本aⅴ精品一区二区三区 | 狠狠色丁香婷婷综合久久片| 亚洲综合免费观看高清完整版| 久久久91精品国产一区二区精品 | 亚洲国产中文字幕在线视频综合 | 亚洲成人av在线电影| 亚洲特级片在线| 国产亚洲欧洲997久久综合| 91精品婷婷国产综合久久性色| 9i看片成人免费高清| 国产毛片一区二区| 美女视频一区在线观看| 午夜免费久久看| 亚洲视频精选在线| 中文av一区特黄| 日韩欧美国产一二三区| 91精品国产综合久久福利软件 | 国产婷婷色一区二区三区 | 青青草成人在线观看| 亚洲欧美日韩国产另类专区| 国产欧美日韩中文久久| 2022国产精品视频| 日韩精品中午字幕| 欧美一二三区在线| 欧美精品自拍偷拍| 欧美日韩一区二区三区在线看| 日本丰满少妇一区二区三区| 99在线精品观看| av一区二区不卡| 成人激情免费网站| 成人av集中营|