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

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

?? abstracthibernateworkflowstore.java

?? 一個很好實用的工作流OSWORKFLOW開發例子.有著非常優秀的靈活性.
?? 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);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一区二区三区中文精品 | 在线观看免费亚洲| 日日夜夜一区二区| 久久精品人人做人人综合| 色婷婷av久久久久久久| 久草精品在线观看| 一区二区国产盗摄色噜噜| 2022国产精品视频| 欧美午夜影院一区| 成人免费视频caoporn| 免费高清在线视频一区·| 亚洲欧美成人一区二区三区| 精品国产a毛片| 欧美福利一区二区| 91视频一区二区三区| 狠狠色丁香九九婷婷综合五月| 亚洲在线成人精品| 国产精品天天看| 精品国产免费视频| 欧美一区二区三区视频免费| 91偷拍与自偷拍精品| 国产老肥熟一区二区三区| 午夜精品aaa| 亚洲精品成a人| 自拍偷拍欧美精品| 国产精品视频观看| 久久嫩草精品久久久久| 欧美一区二区三区四区高清| 欧美日韩国产大片| 欧美日韩中字一区| 在线观看欧美黄色| 91精品福利在线| 99国产麻豆精品| 成人免费视频一区二区| 国产91精品免费| 国产精品69毛片高清亚洲| 毛片一区二区三区| 蜜桃视频在线一区| 美洲天堂一区二卡三卡四卡视频| 性久久久久久久久久久久| 亚洲尤物视频在线| 午夜视频在线观看一区二区三区| 一区二区在线观看免费视频播放| 亚洲免费在线看| 亚洲色图欧美激情| 亚洲人快播电影网| 亚洲欧美日韩在线| 一区二区激情小说| 亚洲v日本v欧美v久久精品| 亚洲一区二区三区四区的| 亚洲精品视频一区二区| 亚洲一区二区三区爽爽爽爽爽| 亚洲成人先锋电影| 男女视频一区二区| 久久99精品久久久久久| 国产一区二区三区在线看麻豆| 韩国成人福利片在线播放| 国产精品12区| www.成人网.com| 欧美综合一区二区三区| 欧美疯狂性受xxxxx喷水图片| 欧美福利视频一区| 精品捆绑美女sm三区| 久久精品视频免费| 亚洲精品视频在线看| 日韩国产欧美在线视频| 经典一区二区三区| av激情综合网| 欧美日韩一区二区在线视频| 日韩欧美亚洲国产另类| 国产欧美一区二区三区网站| 亚洲三级在线免费| 天天综合日日夜夜精品| 久久国产精品色| 国产精品影视天天线| 成人免费毛片高清视频| 欧美在线观看视频在线| 日韩欧美电影一区| 国产精品久线在线观看| 亚洲成av人影院| 国产成人精品www牛牛影视| 欧美午夜片在线观看| 精品国产免费一区二区三区香蕉| 国产精品成人一区二区艾草| 天涯成人国产亚洲精品一区av| 国产剧情一区二区| 欧美亚洲动漫精品| 久久久久久久久久久黄色| 亚洲欧美激情在线| 久久99久久久欧美国产| jizz一区二区| 欧美一区二区免费| 中文字幕在线视频一区| 日韩精品五月天| 91在线国产观看| 精品欧美黑人一区二区三区| 亚洲精品日韩专区silk | 91麻豆免费观看| 日韩欧美的一区| 亚洲免费大片在线观看| 国产一区二区主播在线| 欧美日韩国产高清一区二区| 国产精品美女久久久久高潮| 蜜臂av日日欢夜夜爽一区| 在线亚洲欧美专区二区| 久久久久久**毛片大全| 亚洲成人av一区| 91免费国产在线观看| 久久噜噜亚洲综合| 丝袜亚洲另类欧美| 色综合天天做天天爱| 国产午夜亚洲精品羞羞网站| 香蕉加勒比综合久久| 色呦呦日韩精品| 中文字幕精品综合| 久久成人av少妇免费| 欧美电影一区二区| 一级女性全黄久久生活片免费| 成人一级片在线观看| 精品国产91亚洲一区二区三区婷婷 | 激情久久五月天| 欧美精品丝袜中出| 亚洲成人高清在线| 日韩精品自拍偷拍| 亚洲第一在线综合网站| 色婷婷香蕉在线一区二区| 国产精品乱码人人做人人爱| 国模少妇一区二区三区| 精品免费99久久| 免费观看日韩av| 日韩精品影音先锋| 蜜臀久久99精品久久久久久9| 欧美日韩国产精品成人| 五月婷婷久久丁香| 欧美色中文字幕| 亚洲国产综合91精品麻豆 | 精品国产伦一区二区三区免费| 天堂蜜桃一区二区三区| 欧美日韩mp4| 午夜欧美视频在线观看| 91精品国产手机| 免费观看一级特黄欧美大片| 欧美xxxxxxxx| 国产精品一区二区在线观看网站| 久久亚洲影视婷婷| 国产·精品毛片| 国产精品久久久久久久裸模| 91免费在线看| 亚洲国产成人av| 欧美一区二区精品在线| 免费人成在线不卡| 精品1区2区在线观看| 国产一区二区三区久久悠悠色av| 久久精品一区二区三区不卡| 懂色av一区二区夜夜嗨| 亚洲日本中文字幕区| 在线看国产一区| 石原莉奈在线亚洲三区| 欧美精品成人一区二区三区四区| 日本亚洲最大的色成网站www| 精品国产91乱码一区二区三区| 福利一区在线观看| 亚洲欧美电影院| 欧美一卡二卡在线观看| 国产一区二区三区蝌蚪| 国产精品久久久久影院色老大| 在线这里只有精品| 日本欧美肥老太交大片| 国产日产欧美一区| 在线观看日韩高清av| 久久精品国产久精国产| 国产精品免费aⅴ片在线观看| 欧洲国内综合视频| 精品一区二区成人精品| 中文av一区特黄| 欧美久久一二区| 国产精品99久久久久久久女警| 亚洲精品网站在线观看| 日韩女优电影在线观看| 成人午夜av在线| 五月婷婷另类国产| 国产精品私人影院| 欧美日韩免费不卡视频一区二区三区 | 亚洲专区一二三| 久久影院电视剧免费观看| 色狠狠av一区二区三区| 久久国产综合精品| 一区二区三区蜜桃网| 精品免费国产一区二区三区四区| 色8久久精品久久久久久蜜| 毛片一区二区三区| 亚洲已满18点击进入久久| 久久欧美一区二区| 欧美日韩激情一区| 成人小视频在线| 久久爱www久久做| 亚洲综合色区另类av| 国产精品人妖ts系列视频| 欧美一级片在线看| 91成人在线观看喷潮|