Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: None  |  size: 2.21 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package net.iocanel.blog.management.support.persistence;
  2.  
  3. import java.io.Serializable;
  4. import javax.persistence.Basic;
  5. import javax.persistence.Column;
  6. import javax.persistence.Entity;
  7. import javax.persistence.Id;
  8. import javax.persistence.Lob;
  9. import javax.persistence.Table;
  10.  
  11. /**
  12.  *
  13.  * @author iocanel
  14.  */
  15. @Entity
  16. @Table(name = "ENDPOINT_CONFIGURATION", catalog = "blog", schema = "")
  17. public class EndpointConfiguration implements Serializable {
  18.     private static final long serialVersionUID = 1L;
  19.     @Id
  20.     @Basic(optional = false)
  21.     @Column(name = "ENDPOINT_ID", nullable = false, length = 80)
  22.     private String endpointId;
  23.     @Basic(optional = false)
  24.     @Lob
  25.     @Column(name = "CONFIGURATION", nullable = false, length = 65535)
  26.     private String configuration;
  27.  
  28.     public EndpointConfiguration() {
  29.     }
  30.  
  31.     public EndpointConfiguration(String endpointId) {
  32.         this.endpointId = endpointId;
  33.     }
  34.  
  35.     public EndpointConfiguration(String endpointId, String configuration) {
  36.         this.endpointId = endpointId;
  37.         this.configuration = configuration;
  38.     }
  39.  
  40.     public String getEndpointId() {
  41.         return endpointId;
  42.     }
  43.  
  44.     public void setEndpointId(String endpointId) {
  45.         this.endpointId = endpointId;
  46.     }
  47.  
  48.     public String getConfiguration() {
  49.         return configuration;
  50.     }
  51.  
  52.     public void setConfiguration(String configuration) {
  53.         this.configuration = configuration;
  54.     }
  55.  
  56.     @Override
  57.     public int hashCode() {
  58.         int hash = 0;
  59.         hash += (endpointId != null ? endpointId.hashCode() : 0);
  60.         return hash;
  61.     }
  62.  
  63.     @Override
  64.     public boolean equals(Object object) {
  65.         // TODO: Warning - this method won't work in the case the id fields are not set
  66.         if (!(object instanceof EndpointConfiguration)) {
  67.             return false;
  68.         }
  69.         EndpointConfiguration other = (EndpointConfiguration) object;
  70.         if ((this.endpointId == null && other.endpointId != null) || (this.endpointId != null && !this.endpointId.equals(other.endpointId))) {
  71.             return false;
  72.         }
  73.         return true;
  74.     }
  75.  
  76.     @Override
  77.     public String toString() {
  78.         return "net.iocanel.blog.management.support.EndpointConfiguration[endpointId=" + endpointId + "]";
  79.     }
  80. }