From 28c91fd13c97e679666a43a57012d27518768dfd Mon Sep 17 00:00:00 2001 From: Gerwin Gsenger Date: Thu, 29 Jan 2015 15:24:47 +0100 Subject: add inital (empty) implementation of the ProcessInstanceStoreDAO --- .../moa/id/process/dao/ProcessInstanceStore.java | 13 ++++++++++- .../id/process/dao/ProcessInstanceStoreDAO.java | 26 ++++++++++++++++++++++ .../process/dao/ProcessInstanceStoreDAOImpl.java | 25 +++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAO.java create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAOImpl.java (limited to 'id/server/idserverlib/src') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java index 5270e036a..ab71ef54d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java @@ -10,13 +10,16 @@ import javax.persistence.Table; @Table(name = "process_instance") public class ProcessInstanceStore { - @Column(name = "id", unique = true, nullable = false) + @Column(name = "id") @Id private String id; @Column(name = "processDefinitionID", unique = true, nullable = false) private String processDefinitionID; + @Column(name = "pointer", nullable = false) + private String pointer; + @Column(name = "executionContextData", nullable = false) @Lob private byte[] executionContextData; @@ -29,6 +32,10 @@ public class ProcessInstanceStore { return processDefinitionID; } + public String getPointer() { + return pointer; + } + public byte[] getExecutionContextData() { return executionContextData; } @@ -41,6 +48,10 @@ public class ProcessInstanceStore { this.processDefinitionID = processDefinitionID; } + public void setPointer(String pointer) { + this.pointer = pointer; + } + public void setExecutionContextData(byte[] executionContextData) { this.executionContextData = executionContextData; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAO.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAO.java new file mode 100644 index 000000000..5e2b12349 --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAO.java @@ -0,0 +1,26 @@ +package at.gv.egovernment.moa.id.process.dao; + +import at.gv.egovernment.moa.id.process.ProcessInstance; + +public interface ProcessInstanceStoreDAO { + + /** + * Stores a {@link ProcessInstance} defined by {@code pIStore} in the + * database. + * + * @param pIStore + * the {@link ProcessInstanceStore} to persist. + */ + public void save(ProcessInstanceStore pIStore); + + /** + * Loads a {@link ProcessInstanceStore}, defined by + * {@code processInstanceID} from the database. + * + * @param processInstanceID + * the id of the {@code ProcessInstanceStore} to retrieve. + * @return a ProcessInstanceStore. + */ + public ProcessInstanceStore load(String processInstanceID); + +} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAOImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAOImpl.java new file mode 100644 index 000000000..3480c4cfc --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAOImpl.java @@ -0,0 +1,25 @@ +package at.gv.egovernment.moa.id.process.dao; + + + +public class ProcessInstanceStoreDAOImpl implements ProcessInstanceStoreDAO { + + private static ProcessInstanceStoreDAO instance = new ProcessInstanceStoreDAOImpl(); + + public static ProcessInstanceStoreDAO getInstance() { + return instance; + } + + @Override + public void save(ProcessInstanceStore pIStore) { + // TODO Auto-generated method stub + + } + + @Override + public ProcessInstanceStore load(String processInstanceID) { + // TODO Auto-generated method stub + return null; + } + +} -- cgit v1.2.3