From c58001fdf1defd03ff30cd9c39160b03eec02434 Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Mon, 9 Nov 2015 09:37:31 +0100 Subject: Use JPA for storing the user accounts in a database --- .../fhswf/in/inf/fit/aufgabe5/model/Account.java | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/de/fhswf/in/inf/fit/aufgabe5/model/Account.java (limited to 'src/de/fhswf/in/inf/fit/aufgabe5/model/Account.java') diff --git a/src/de/fhswf/in/inf/fit/aufgabe5/model/Account.java b/src/de/fhswf/in/inf/fit/aufgabe5/model/Account.java new file mode 100644 index 0000000..539353c --- /dev/null +++ b/src/de/fhswf/in/inf/fit/aufgabe5/model/Account.java @@ -0,0 +1,54 @@ +package de.fhswf.in.inf.fit.aufgabe5.model; + +import java.io.Serializable; +import javax.persistence.*; + + +/** + * The persistent class for the account database table. + * + */ +@Entity +@Table(name="account") +@NamedQuery(name="Account.findAll", query="SELECT a FROM Account a") +public class Account implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @Column(name="Username") + private String username; + + @Column(name="Password") + private String password; + + @Column(name="Salt") + private String salt; + + public Account() { + } + + public String getUsername() { + return this.username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return this.password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getSalt() { + return this.salt; + } + + public void setSalt(String salt) { + this.salt = salt; + } + +} \ No newline at end of file -- cgit v1.2.3-70-g09d2