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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? abstracthibernateworkflowstore.java

?? 一個很好實用的工作流OSWORKFLOW開發(fā)例子.有著非常優(yōu)秀的靈活性.
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright (c) 2002-2003 by OpenSymphony * All rights reserved. */package com.opensymphony.workflow.spi.hibernate3;import com.opensymphony.module.propertyset.PropertySet;import com.opensymphony.workflow.QueryNotSupportedException;import com.opensymphony.workflow.StoreException;import com.opensymphony.workflow.query.FieldExpression;import com.opensymphony.workflow.query.NestedExpression;import com.opensymphony.workflow.query.WorkflowExpressionQuery;import com.opensymphony.workflow.query.WorkflowQuery;import com.opensymphony.workflow.spi.Step;import com.opensymphony.workflow.spi.WorkflowEntry;import com.opensymphony.workflow.spi.WorkflowStore;import com.opensymphony.workflow.spi.hibernate.HibernateCurrentStep;import com.opensymphony.workflow.spi.hibernate.HibernateHistoryStep;import com.opensymphony.workflow.spi.hibernate.HibernateStep;import com.opensymphony.workflow.spi.hibernate.HibernateWorkflowEntry;import com.opensymphony.workflow.util.PropertySetDelegate;import org.hibernate.Criteria;import org.hibernate.HibernateException;import org.hibernate.Session;import org.hibernate.criterion.Criterion;import org.hibernate.criterion.Expression;import java.util.ArrayList;import java.util.Collection;import java.util.Date;import java.util.HashSet;import java.util.Iterator;import java.util.List;import java.util.Set;/** * @author Luca Masini * @since 2005-9-23 * */public abstract class AbstractHibernateWorkflowStore implements WorkflowStore {    //~ Instance fields ////////////////////////////////////////////////////////    private PropertySetDelegate propertySetDelegate;    private String cacheRegion = null;    private boolean cacheable = false;    //~ Methods ////////////////////////////////////////////////////////////////    // ~ Getter/Setter ////////////////////////////////////////////////////////////////    public void setCacheRegion(String cacheRegion) {        this.cacheRegion = cacheRegion;    }    public void setCacheable(boolean cacheable) {        this.cacheable = cacheable;    }    public void setEntryState(final long entryId, final int state) throws StoreException {        loadEntry(entryId).setState(state);    }    public PropertySet getPropertySet(long entryId) throws StoreException {        if (getPropertySetDelegate() == null) {            throw new StoreException("PropertySetDelegate is not properly configured");        }        return getPropertySetDelegate().getPropertySet(entryId);    }    public void setPropertySetDelegate(PropertySetDelegate propertySetDelegate) {        this.propertySetDelegate = propertySetDelegate;    }    public PropertySetDelegate getPropertySetDelegate() {        return propertySetDelegate;    }    public Step createCurrentStep(final long entryId, final int stepId, final String owner, final Date startDate, final Date dueDate, final String status, final long[] previousIds) throws StoreException {        final HibernateWorkflowEntry entry = loadEntry(entryId);        final HibernateCurrentStep step = new HibernateCurrentStep();        step.setStepId(stepId);        step.setOwner(owner);        step.setStartDate(startDate);        step.setDueDate(dueDate);        step.setStatus(status);        // This is for backward compatibility, but current Store doesn't         // persist this collection, nor is such property visibile outside         // OSWF internal classes        List previousSteps = new ArrayList(previousIds.length);        for (int i = 0; i < previousIds.length; i++) {            HibernateCurrentStep previousStep = new HibernateCurrentStep();            previousSteps.add(previousStep);        }        step.setPreviousSteps(previousSteps);        entry.addCurrentSteps(step);        // We need to save here because we soon will need the stepId         // that hibernate calculate on save or flush        save(step);        return step;    }    public WorkflowEntry createEntry(String workflowName) throws StoreException {        final HibernateWorkflowEntry entry = new HibernateWorkflowEntry();        entry.setState(WorkflowEntry.CREATED);        entry.setWorkflowName(workflowName);        save(entry);        return entry;    }    public List findCurrentSteps(final long entryId) throws StoreException {        // We are asking for current step list, so here we have an anti-lazy        // copy of the Hibernate array in memory. This also prevents problem         // in case the use is going with a pattern that span a session         // for method call        return new ArrayList(loadEntry(entryId).getCurrentSteps());    }    public WorkflowEntry findEntry(long entryId) throws StoreException {        return loadEntry(entryId);    }    public List findHistorySteps(final long entryId) throws StoreException {        // We are asking for current step list, so here we have an anti-lazy        // copy of the Hibernate array in memory. This also prevents problem         // in case the use is going with a pattern that span a session         // for method call        return new ArrayList(loadEntry(entryId).getHistorySteps());    }    public Step markFinished(Step step, int actionId, Date finishDate, String status, String caller) throws StoreException {        final HibernateCurrentStep currentStep = (HibernateCurrentStep) step;        currentStep.setActionId(actionId);        currentStep.setFinishDate(finishDate);        currentStep.setStatus(status);        currentStep.setCaller(caller);        return currentStep;    }    public void moveToHistory(final Step step) throws StoreException {        final HibernateCurrentStep currentStep = (HibernateCurrentStep) step;        final HibernateWorkflowEntry entry = currentStep.getEntry();        final HibernateHistoryStep hStep = new HibernateHistoryStep(currentStep);        entry.removeCurrentSteps(currentStep);        delete(currentStep);        entry.addHistorySteps(hStep);        // We need to save here because we soon will need the stepId         // that hibernate calculate on save or flush        save(hStep);    }    public List query(final WorkflowQuery query) throws StoreException {        return (List) execute(new InternalCallback() {                public Object doInHibernate(Session session) throws HibernateException, StoreException {                    Class entityClass;                    int qtype = query.getType();                    if (qtype == 0) { // then not set, so look in sub queries                        if (query.getLeft() != null) {                            qtype = query.getLeft().getType();                        }                    }                    if (qtype == WorkflowQuery.CURRENT) {                        entityClass = HibernateCurrentStep.class;                    } else {                        entityClass = HibernateHistoryStep.class;                    }                    Criteria criteria = session.createCriteria(entityClass);                    Criterion expression = buildExpression(query);                    criteria.setCacheable(isCacheable());                    if (isCacheable()) {                        criteria.setCacheRegion(getCacheRegion());                    }                    criteria.add(expression);                    Set results = new HashSet();                    Iterator iter = criteria.list().iterator();                    while (iter.hasNext()) {                        HibernateStep step = (HibernateStep) iter.next();                        results.add(new Long(step.getEntryId()));                    }                    return new ArrayList(results);                }            });    }    /*     * (non-Javadoc)     *     * @see com.opensymphony.workflow.spi.WorkflowStore#query(com.opensymphony.workflow.query.WorkflowExpressionQuery)     */    public List query(final WorkflowExpressionQuery query) throws StoreException {        return (List) execute(new InternalCallback() {                public Object doInHibernate(Session session) throws HibernateException {                    com.opensymphony.workflow.query.Expression expression = query.getExpression();                    Criterion expr;                    Class entityClass = getQueryClass(expression, null);                    if (expression.isNested()) {                        expr = buildNested((NestedExpression) expression);                    } else {                        expr = queryComparison((FieldExpression) expression);                    }                    Criteria criteria = session.createCriteria(entityClass);                    criteria.setCacheable(isCacheable());                    if (isCacheable()) {                        criteria.setCacheRegion(getCacheRegion());                    }                    criteria.add(expr);                    Set results = new HashSet();                    Iterator iter = criteria.list().iterator();                    while (iter.hasNext()) {                        Object next = iter.next();                        Object item;                        if (next instanceof HibernateStep) {                            HibernateStep step = (HibernateStep) next;                            item = new Long(step.getEntryId());                        } else {                            WorkflowEntry entry = (WorkflowEntry) next;                            item = new Long(entry.getId());                        }                        results.add(item);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
裸体一区二区三区| 亚洲动漫第一页| 成人午夜免费视频| 国产片一区二区| 97精品国产露脸对白| 亚洲一区二区三区中文字幕| 欧美视频中文一区二区三区在线观看| 亚洲一区电影777| 日韩精品一区二区三区四区| 国产激情精品久久久第一区二区| 国产精品萝li| 欧美日韩精品欧美日韩精品| 久久www免费人成看片高清| 久久亚洲精品小早川怜子| 99久久久精品| 日本网站在线观看一区二区三区| 久久久99免费| 91久久香蕉国产日韩欧美9色| 日本免费在线视频不卡一不卡二| 国产午夜精品美女毛片视频| 在线精品亚洲一区二区不卡| 麻豆中文一区二区| 国产精品理伦片| 在线不卡a资源高清| 国产福利精品导航| 亚洲成av人片| 国产天堂亚洲国产碰碰| 欧美日韩日日摸| 丁香激情综合国产| 亚洲福利一二三区| 欧美激情艳妇裸体舞| 欧美久久一二区| 成人av影院在线| 免费成人av资源网| 亚洲精选视频在线| 国产日韩欧美精品一区| 欧美日本高清视频在线观看| 北条麻妃国产九九精品视频| 奇米影视一区二区三区| 综合中文字幕亚洲| 久久久久久久精| 欧美高清www午色夜在线视频| www.成人在线| 国产一区三区三区| 欧美aa在线视频| 一区二区三区在线观看国产| 久久久精品2019中文字幕之3| 欧美日韩视频不卡| 色呦呦国产精品| 成人国产一区二区三区精品| 久久aⅴ国产欧美74aaa| 亚洲电影一区二区| 亚洲欧美日韩在线播放| 中日韩免费视频中文字幕| 精品国产髙清在线看国产毛片| 欧美亚洲国产怡红院影院| 99热99精品| 成人性生交大片免费| 国内不卡的二区三区中文字幕| 日韩av一区二| 天天免费综合色| 亚洲一级电影视频| 一区二区三区高清| 亚洲视频精选在线| 成人欧美一区二区三区小说| 欧美高清在线精品一区| 久久久精品欧美丰满| 久久午夜色播影院免费高清 | 久久免费美女视频| 欧美一二三四在线| 91精品国产色综合久久| 欧美电影在线免费观看| 欧美日韩国产综合视频在线观看| 欧美自拍偷拍一区| 欧美日韩不卡在线| 欧美精品777| 欧美一区二区免费| 日韩欧美在线123| 亚洲精品在线一区二区| 久久中文娱乐网| 国产亚洲午夜高清国产拍精品| 久久久噜噜噜久久中文字幕色伊伊 | 337p亚洲精品色噜噜噜| 91精品国产福利| 精品久久久网站| 337p粉嫩大胆色噜噜噜噜亚洲| ww亚洲ww在线观看国产| 国产精品私房写真福利视频| 中文字幕制服丝袜一区二区三区| 日韩理论片网站| 亚洲成人动漫在线免费观看| 日韩精品免费视频人成| 久久精品国产精品亚洲红杏| 国产伦理精品不卡| 91亚洲精品久久久蜜桃| 欧美日韩免费在线视频| 精品国产一区二区三区忘忧草 | 欧美激情综合五月色丁香小说| 国产精品日韩成人| 亚洲图片一区二区| 久久精品av麻豆的观看方式| 粉嫩一区二区三区性色av| 一本大道综合伊人精品热热| 欧美三级资源在线| 久久综合久久99| 亚洲精品国产成人久久av盗摄| 丝袜美腿成人在线| 国产麻豆91精品| 91黄色激情网站| 精品国产百合女同互慰| 亚洲人亚洲人成电影网站色| 日韩影院精彩在线| av成人免费在线观看| 欧美久久久久久蜜桃| 久久久久99精品国产片| 一区二区三区成人在线视频| 极品瑜伽女神91| 一本色道久久综合亚洲91| 精品日韩在线观看| 一区二区三区电影在线播| 久久99精品一区二区三区三区| 色综合久久中文字幕| 亚洲精品一区二区精华| 亚洲一区国产视频| 成人app软件下载大全免费| 91精品国产免费| 亚洲精品老司机| 国产一区999| 9191国产精品| 亚洲码国产岛国毛片在线| 国产美女av一区二区三区| 欧美日精品一区视频| 中文字幕第一页久久| 久久成人免费网站| 欧美写真视频网站| 亚洲品质自拍视频| 国产黑丝在线一区二区三区| 日韩一级二级三级精品视频| 亚洲人被黑人高潮完整版| 国产99精品在线观看| 日韩欧美国产一区在线观看| 香蕉成人啪国产精品视频综合网 | 日本福利一区二区| 欧美高清在线一区| 国产在线观看一区二区| 91精品国产乱| 日本中文字幕一区| 欧美日韩在线直播| 亚洲午夜影视影院在线观看| 91免费观看视频| 1024成人网色www| 成人性生交大片免费看视频在线| 久久亚洲一区二区三区四区| 免费成人在线观看| 欧美一卡2卡3卡4卡| 亚洲高清视频的网址| 欧美亚洲国产一区二区三区va | 久久99精品国产麻豆婷婷洗澡| 欧美精品乱码久久久久久| 亚洲成a人v欧美综合天堂下载 | 日本欧美一区二区三区| 欧美区视频在线观看| 香蕉久久夜色精品国产使用方法| 欧美亚洲国产怡红院影院| 亚洲午夜视频在线观看| 欧美色成人综合| 五月婷婷久久丁香| 欧美一级夜夜爽| 美女一区二区久久| 欧美不卡一区二区三区四区| 裸体一区二区三区| 久久久久久久一区| 成人精品小蝌蚪| 亚洲精品国产视频| 欧美视频日韩视频| 青青草精品视频| 久久色.com| 一本色道久久综合狠狠躁的推荐| 亚洲码国产岛国毛片在线| 欧美视频在线播放| 人人精品人人爱| 国产色综合久久| 91国产成人在线| 热久久国产精品| 国产欧美精品一区aⅴ影院| 色婷婷av一区二区三区大白胸 | 91无套直看片红桃| 亚洲bt欧美bt精品| 欧美电影免费提供在线观看| 国产一区二区美女诱惑| 亚洲婷婷在线视频| 欧美一区三区二区| 成人综合婷婷国产精品久久蜜臀 | 日韩欧美一区二区视频| 国产另类ts人妖一区二区| 亚洲免费观看高清完整版在线观看 | 欧美日韩免费高清一区色橹橹 | 99精品在线观看视频| 亚洲第一成人在线| 国产亚洲成年网址在线观看|