1 5 package com.opensymphony.workflow.spi.ejb; 6 7 import com.opensymphony.ejb.ExceptionlessEntityAdapter; 8 9 import javax.ejb.CreateException ; 10 11 12 50 public abstract class WorkflowEntryEJB extends ExceptionlessEntityAdapter { 51 53 public abstract void setId(Long id); 54 55 60 public abstract Long getId(); 61 62 65 public abstract void setState(int state); 66 67 71 public abstract int getState(); 72 73 public abstract void setWorkflowName(String workflowName); 74 75 79 public abstract String getWorkflowName(); 80 81 84 public Long ejbCreate(String workflowName) throws CreateException { 85 try { 86 Long id = new Long (nextLong()); 87 setId(id); 88 setWorkflowName(workflowName); 89 setState(0); 90 91 return null; 92 } catch (Exception e) { 93 throw new CreateException (e.getMessage()); 94 } 95 } 96 97 public void ejbPostCreate(String workflowName) throws CreateException { 98 } 99 } 100 | Popular Tags |