2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

Coverage Report - org.apache.mailreaderjpa.Protocol
 
Classes in this File Line Coverage Branch Coverage Complexity
Protocol
0%
0/18
0%
0/2
0
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to you under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.mailreaderjpa;
 18  
 
 19  
 import java.io.Serializable;
 20  
 import java.sql.Timestamp;
 21  
 import javax.persistence.Column;
 22  
 import javax.persistence.Entity;
 23  
 import javax.persistence.GeneratedValue;
 24  
 import javax.persistence.GenerationType;
 25  
 import javax.persistence.Id;
 26  
 import javax.persistence.NamedQueries;
 27  
 import javax.persistence.NamedQuery;
 28  
 import javax.persistence.Version;
 29  
 
 30  
 /**
 31  
  * <p>JPA entity class for the <code>MAILREADER_PROTOCOLS</code> table.</p>
 32  
  */
 33  
 @Entity(name="mailreader_protocols")
 34  
 @NamedQueries({
 35  
     @NamedQuery(name="Protocol.findAll", query="SELECT p FROM mailreader_protocols p")
 36  
 })
 37  
 public class Protocol implements Serializable {
 38  
 
 39  
     @Id
 40  
     @Column(name="protocol_id")
 41  
     @GeneratedValue(strategy = GenerationType.AUTO)
 42  
     private Integer id;
 43  
     
 44  
     /** Creates a new instance of Protocol */
 45  0
     public Protocol() {
 46  0
     }
 47  
 
 48  
     public Integer getId() {
 49  0
         return id;
 50  
     }
 51  
 
 52  
     public void setId(Integer id) {
 53  0
         this.id = id;
 54  0
     }
 55  
 
 56  
     public int hashCode() {
 57  0
         if (getId() != null) {
 58  0
             return getId().intValue();
 59  
         } else {
 60  0
             return super.hashCode();
 61  
         }
 62  
     }
 63  
 
 64  
     public boolean equals(Object obj) {
 65  0
         if ((obj instanceof Protocol)
 66  
             && (getId() != null)) {
 67  0
             return getId().equals(((Protocol) obj).getId());
 68  
         } else {
 69  0
             return false;
 70  
         }
 71  
     }
 72  
 
 73  
     public String toString() {
 74  0
         return "org.apache.mailreaderjpa.Protocol[id=" + id + "]";
 75  
     }
 76  
     
 77  
     @Column(nullable=false)
 78  
     private String description;
 79  
     @Column(name="last_update")
 80  
     @Version()
 81  
     private Timestamp lastUpdate;
 82  
 
 83  
     public String getDescription() {
 84  0
         return description;
 85  
     }
 86  
 
 87  
     public void setDescription(String description) {
 88  0
         this.description = description;
 89  0
     }
 90  
 
 91  
     public Timestamp getLastUpdate() {
 92  0
         return lastUpdate;
 93  
     }
 94  
 
 95  
     public void setLastUpdate(Timestamp lastUpdate) {
 96  0
         this.lastUpdate = lastUpdate;
 97  0
     }
 98  
 
 99  
 }