📄 hibernatestep.cs
字号:
using System;
using System.Collections;
/*
* Copyright (c) 2002-2003 by OpenSymphony
* All rights reserved.
*/
namespace DotNetTools.Workflow.Spi.Hibernate
{
/// <summary> This abstract class provides all the implementation of the step interface
/// It is abstract because the current and historical steps are stored in seperate tables.
/// To split the history and current steps into two tables in hibernate, the easiest approach is to use
/// two separate classes.
/// </summary>
/// <author>jjx (.net)</author>
public abstract class HibernateStep : IStep
{
virtual public int ActionId
{
get
{
return actionId;
}
//~ Methods ////////////////////////////////////////////////////////////////
set
{
this.actionId = value;
}
}
virtual public String Caller
{
get
{
return caller;
}
set
{
this.caller = value;
}
}
virtual public DateTime DueDate
{
get
{
return dueDate;
}
set
{
this.dueDate = value;
}
}
virtual public HibernateWorkflowEntry Entry
{
get
{
return entry;
}
set
{
this.entry = value;
}
}
virtual public long EntryId
{
get
{
return entry.Id;
}
}
virtual public DateTime FinishDate
{
get
{
return finishDate;
}
set
{
this.finishDate = value;
}
}
virtual public long Id
{
get
{
return id;
}
set
{
this.id = value;
}
}
virtual public String Owner
{
get
{
return owner;
}
set
{
this.owner = value;
}
}
virtual public long[] PreviousStepIds
{
get
{
if (previousSteps == null)
{
return new long[0];
}
long[] previousStepIds = new long[previousSteps.Count];
int i = 0;
foreach(HibernateStep hibernateStep in previousSteps){
previousStepIds[i] = hibernateStep.Id;
i++;
}
return previousStepIds;
}
}
virtual public IList PreviousSteps
{
get
{
return previousSteps;
}
set
{
this.previousSteps = value;
}
}
virtual public DateTime StartDate
{
get
{
return startDate;
}
set
{
this.startDate = value;
}
}
virtual public String Status
{
get
{
return status;
}
set
{
this.status = value;
}
}
virtual public int StepId
{
get
{
return stepId;
}
set
{
this.stepId = value;
}
}
//~ Instance fields ////////////////////////////////////////////////////////
internal DateTime dueDate;
internal DateTime finishDate;
internal DateTime startDate;
internal HibernateWorkflowEntry entry;
internal IList previousSteps;
internal String caller;
internal String owner;
internal String status;
internal int actionId;
internal int stepId;
internal long id = - 1;
//~ Constructors ///////////////////////////////////////////////////////////
public HibernateStep()
{
}
public HibernateStep(HibernateStep step)
{
this.actionId = step.ActionId;
this.caller = step.Caller;
this.finishDate = step.FinishDate;
this.dueDate = step.DueDate;
this.startDate = step.StartDate;
//do not copy this value, it's for unsaved-value
//this.id = step.getId();
this.owner = step.Owner;
this.status = step.Status;
this.stepId = step.StepId;
this.previousSteps = step.PreviousSteps;
this.entry = step.entry;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -