Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package grahamsprojserver.entity;
- import java.io.Serializable;
- import javax.persistence.*;
- /**
- *
- * @author gbaldeck
- */
- @Entity
- @Table(name = "SCHEMAS")
- //@SequenceGenerator(name="seq_schemas")
- public class Schemas implements Serializable {
- @Column(name = "USERNAME")
- private String username;
- @Column(name = "PASSWORD")
- private String password;
- @Column(name = "HOSTNAME")
- private String hostname;
- @Column(name = "PORT")
- private String port;
- @Column(name = "SID")
- private String sid;
- @Column(name = "DATABASE")
- private String database;
- @Column(name = "IS_SQL")
- private int isSql;
- @Id
- @SequenceGenerator( name = "seqSchemas", sequenceName = "SEQ_ID", allocationSize = 1, initialValue = 1 )
- @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seqSchemas")
- @Column(name = "ID")
- private int id;
- public Schemas(){};
- // public Schemas(String username, String password, String hostname, String port, String sid, String database, int isSql, int id) {
- // this.username = username;
- // this.password = password;
- // this.hostname = hostname;
- // this.port = port;
- // this.sid = sid;
- // this.database = database;
- // this.isSql = isSql;
- // this.id = id;
- // }
- public String getDatabase() {
- return database;
- }
- public void setDatabase(String database) {
- this.database = database;
- }
- public String getHostname() {
- return hostname;
- }
- public void setHostname(String hostname) {
- this.hostname = hostname;
- }
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public int getIsSql() {
- return isSql;
- }
- public void setIsSql(int isSql) {
- this.isSql = isSql;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public String getPort() {
- return port;
- }
- public void setPort(String port) {
- this.port = port;
- }
- public String getSid() {
- return sid;
- }
- public void setSid(String sid) {
- this.sid = sid;
- }
- public String getUsername() {
- return username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- @Override
- public String toString(){
- return "Username: "+username+
- "\nPassword: "+password+
- "\nHostname: "+hostname+
- "\nPort: "+port+
- "\nSid: "+sid+
- "\nDatabase: "+database+
- "\nisSql: "+isSql+
- "\nId: "+id;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement