1 package org.roller.business; 2 3 9 public class PubTimeData 10 extends org.roller.pojos.PersistentObject 11 implements java.io.Serializable 12 { 13 static final long serialVersionUID = -5669288520200229343L; 14 15 protected java.lang.String id; 16 protected java.sql.Timestamp pubTime; 17 18 public PubTimeData() 19 { 20 } 21 22 public PubTimeData( java.lang.String id,java.sql.Timestamp pubTime ) 23 { 24 this.id = id; 25 this.pubTime = pubTime; 26 } 27 28 public PubTimeData( PubTimeData otherData ) 29 { 30 this.id = otherData.id; 31 this.pubTime = otherData.pubTime; 32 33 } 34 35 39 public java.lang.String getId() 40 { 41 return this.id; 42 } 43 public void setId( java.lang.String id ) 44 { 45 this.id = id; 46 } 47 48 52 public java.sql.Timestamp getPubTime() 53 { 54 return this.pubTime; 55 } 56 public void setPubTime( java.sql.Timestamp pubTime ) 57 { 58 this.pubTime = pubTime; 59 } 60 61 public String toString() 62 { 63 StringBuffer str = new StringBuffer ("{"); 64 65 str.append("id=" + id + " " + "pubTime=" + pubTime); 66 str.append('}'); 67 68 return(str.toString()); 69 } 70 71 public boolean equals( Object pOther ) 72 { 73 if( pOther instanceof PubTimeData ) 74 { 75 PubTimeData lTest = (PubTimeData) pOther; 76 boolean lEquals = true; 77 78 if( this.id == null ) 79 { 80 lEquals = lEquals && ( lTest.id == null ); 81 } 82 else 83 { 84 lEquals = lEquals && this.id.equals( lTest.id ); 85 } 86 if( this.pubTime == null ) 87 { 88 lEquals = lEquals && ( lTest.pubTime == null ); 89 } 90 else 91 { 92 lEquals = lEquals && this.pubTime.equals( lTest.pubTime ); 93 } 94 95 return lEquals; 96 } 97 else 98 { 99 return false; 100 } 101 } 102 103 public int hashCode() 104 { 105 int result = 17; 106 result = 37*result + ((this.id != null) ? this.id.hashCode() : 0); 107 result = 37*result + ((this.pubTime != null) ? this.pubTime.hashCode() : 0); 108 return result; 109 } 110 111 114 public void setData( org.roller.pojos.PersistentObject otherData ) 115 { 116 117 this.id = ((PubTimeData)otherData).id; 118 119 this.pubTime = ((PubTimeData)otherData).pubTime; 120 } 121 122 } 123 | Popular Tags |