Advertisement
Guest User

Untitled

a guest
Sep 20th, 2012
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.89 KB | None | 0 0
  1. package grahamsprojserver.entity;
  2.  
  3. import java.io.Serializable;
  4. import javax.persistence.*;
  5. /**
  6.  *
  7.  * @author gbaldeck
  8.  */
  9.  
  10. @Entity
  11. @Table(name = "SCHEMAS")
  12. //@SequenceGenerator(name="seq_schemas")
  13. public class Schemas implements Serializable {
  14.     @Column(name = "USERNAME")
  15.     private String username;
  16.    
  17.     @Column(name = "PASSWORD")
  18.     private String password;
  19.    
  20.     @Column(name = "HOSTNAME")
  21.     private String hostname;
  22.    
  23.     @Column(name = "PORT")
  24.     private String port;
  25.    
  26.     @Column(name = "SID")
  27.     private String sid;
  28.    
  29.     @Column(name = "DATABASE")
  30.     private String database;
  31.    
  32.     @Column(name = "IS_SQL")
  33.     private int isSql;
  34.    
  35.     @Id
  36.     @SequenceGenerator( name = "seqSchemas", sequenceName = "SEQ_ID", allocationSize = 1, initialValue = 1 )
  37.     @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seqSchemas")
  38.     @Column(name = "ID")
  39.     private int id;
  40.    
  41.     public Schemas(){};
  42.  
  43. //    public Schemas(String username, String password, String hostname, String port, String sid, String database, int isSql, int id) {
  44. //        this.username = username;
  45. //        this.password = password;
  46. //        this.hostname = hostname;
  47. //        this.port = port;
  48. //        this.sid = sid;
  49. //        this.database = database;
  50. //        this.isSql = isSql;
  51. //        this.id = id;
  52. //    }
  53.  
  54.    
  55.     public String getDatabase() {
  56.         return database;
  57.     }
  58.  
  59.     public void setDatabase(String database) {
  60.         this.database = database;
  61.     }
  62.  
  63.    
  64.     public String getHostname() {
  65.         return hostname;
  66.     }
  67.  
  68.     public void setHostname(String hostname) {
  69.         this.hostname = hostname;
  70.     }
  71.    
  72.     public int getId() {
  73.         return id;
  74.     }
  75.  
  76.     public void setId(int id) {
  77.         this.id = id;
  78.     }
  79.  
  80.    
  81.     public int getIsSql() {
  82.         return isSql;
  83.     }
  84.  
  85.     public void setIsSql(int isSql) {
  86.         this.isSql = isSql;
  87.     }
  88.  
  89.    
  90.     public String getPassword() {
  91.         return password;
  92.     }
  93.  
  94.     public void setPassword(String password) {
  95.         this.password = password;
  96.     }
  97.  
  98.    
  99.     public String getPort() {
  100.         return port;
  101.     }
  102.  
  103.     public void setPort(String port) {
  104.         this.port = port;
  105.     }
  106.  
  107.    
  108.     public String getSid() {
  109.         return sid;
  110.     }
  111.  
  112.     public void setSid(String sid) {
  113.         this.sid = sid;
  114.     }
  115.  
  116.    
  117.     public String getUsername() {
  118.         return username;
  119.     }
  120.  
  121.     public void setUsername(String username) {
  122.         this.username = username;
  123.     }
  124.  
  125.     @Override
  126.     public String toString(){
  127.         return "Username: "+username+
  128.                "\nPassword: "+password+
  129.                "\nHostname: "+hostname+
  130.                "\nPort: "+port+
  131.                "\nSid: "+sid+
  132.                "\nDatabase: "+database+
  133.                "\nisSql: "+isSql+
  134.                "\nId: "+id;
  135.     }
  136. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement