diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2013-06-07 11:50:13 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2013-06-07 11:50:13 +0200 |
commit | 1c0d27a1d5da91019ed2f51d4184282ea7ffe4f0 (patch) | |
tree | 305292fcf059560379307278edd0e99471ef2ae0 /id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao | |
parent | 261294df86c33105eb2113808fc6f171e9250ac7 (diff) | |
download | moa-id-spss-1c0d27a1d5da91019ed2f51d4184282ea7ffe4f0.tar.gz moa-id-spss-1c0d27a1d5da91019ed2f51d4184282ea7ffe4f0.tar.bz2 moa-id-spss-1c0d27a1d5da91019ed2f51d4184282ea7ffe4f0.zip |
Common classes for Hibernate initializing and database handling
Diffstat (limited to 'id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao')
-rw-r--r-- | id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/AssertionStore.java | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/AssertionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/AssertionStore.java new file mode 100644 index 000000000..9dff193d6 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/AssertionStore.java @@ -0,0 +1,74 @@ +package at.gv.egovernment.moa.id.commons.db.dao; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Table; + +import org.hibernate.annotations.DynamicUpdate; +import org.hibernate.annotations.NamedQueries; +import org.hibernate.annotations.NamedQuery; + + +@Entity +@DynamicUpdate(value=true) +@Table(name = "assertionstore") +@NamedQueries({ + @NamedQuery(name="getAssertionWithArtifact", query = "select assertionstore from AssertionStore assertionstore where assertionstore.artifact = :artifact") +}) + +public class AssertionStore implements Serializable{ + + private static final long serialVersionUID = 1L; + + @Id + @Column(name = "artifact", unique=true, nullable=false) + private String artifact; + + @Column(name = "type", nullable=false) + private String type; + + @Column(name = "assertion", nullable=false) + @Lob private byte [] assertion; + + @Column(name = "datetime", nullable=false) + Date datatime; + + public String getArtifact() { + return artifact; + } + + public void setArtifact(String artifact) { + this.artifact = artifact; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public byte[] getAssertion() { + return assertion; + } + + public void setAssertion(byte[] assertion) { + this.assertion = assertion; + } + + public Date getDatatime() { + return datatime; + } + + public void setDatatime(Date datatime) { + this.datatime = datatime; + } + + +} |