1 package org.roller.business; 2 3 10 public class HitCountData 11 extends org.roller.pojos.PersistentObject 12 implements java.io.Serializable 13 { 14 static final long serialVersionUID = -7998453141931097201L; 15 16 protected java.lang.String id; 17 protected java.lang.Integer dayHitCount; 18 protected java.lang.Integer totalHitCount; 19 protected org.roller.pojos.WebsiteData website; 20 21 public HitCountData() 22 { 23 } 24 25 public HitCountData( java.lang.String id, 26 java.lang.Integer dayHitCount, java.lang.Integer totalHitCount ) 27 { 28 this.id = id; 29 this.totalHitCount = totalHitCount; 30 this.dayHitCount = dayHitCount; 31 } 32 33 public HitCountData( HitCountData otherData ) 34 { 35 this.id = otherData.id; 36 this.totalHitCount = otherData.totalHitCount; 37 this.dayHitCount = otherData.dayHitCount; 38 } 39 40 46 public java.lang.String getId() 47 { 48 return this.id; 49 } 50 public void setId( java.lang.String id ) 51 { 52 this.id = id; 53 } 54 55 60 public java.lang.Integer getDayHitCount() 61 { 62 return this.dayHitCount; 63 } 64 public void setDayHitCount( java.lang.Integer dayHitCount ) 65 { 66 this.dayHitCount = dayHitCount; 67 } 68 69 74 public java.lang.Integer getTotalHitCount() 75 { 76 return this.totalHitCount; 77 } 78 public void setTotalHitCount( java.lang.Integer hitCount ) 79 { 80 this.totalHitCount = hitCount; 81 } 82 83 87 public org.roller.pojos.WebsiteData getWebsite() 88 { 89 return this.website; 90 } 91 public void setWebsite( org.roller.pojos.WebsiteData website ) 92 { 93 this.website = website; 94 } 95 96 public String toString() 97 { 98 StringBuffer str = new StringBuffer ("{"); 99 100 str.append("id=" + id + " " + "dayHitCount=" + dayHitCount); 101 str.append('}'); 102 103 return(str.toString()); 104 } 105 106 public boolean equals( Object pOther ) 107 { 108 if( pOther instanceof HitCountData ) 109 { 110 HitCountData lTest = (HitCountData) pOther; 111 boolean lEquals = true; 112 113 if( this.id == null ) 114 { 115 lEquals = lEquals && ( lTest.id == null ); 116 } 117 else 118 { 119 lEquals = lEquals && this.id.equals( lTest.id ); 120 } 121 if( this.dayHitCount == null ) 122 { 123 lEquals = lEquals && ( lTest.dayHitCount == null ); 124 } 125 else 126 { 127 lEquals = lEquals && this.dayHitCount.equals( lTest.dayHitCount ); 128 } 129 if( this.totalHitCount == null ) 130 { 131 lEquals = lEquals && ( lTest.totalHitCount == null ); 132 } 133 else 134 { 135 lEquals= lEquals && this.totalHitCount.equals(lTest.totalHitCount); 136 } 137 138 return lEquals; 139 } 140 else 141 { 142 return false; 143 } 144 } 145 146 public int hashCode() 147 { 148 int result = 17; 149 result = 37*result + ((this.id != null) ? this.id.hashCode() : 0); 150 result = 37*result + ((this.dayHitCount != null) ? this.dayHitCount.hashCode() : 0); 151 result = 37*result + ((this.totalHitCount != null) ? this.totalHitCount.hashCode() : 0); 152 return result; 153 } 154 155 158 public void setData( org.roller.pojos.PersistentObject otherData ) 159 { 160 161 this.id = ((HitCountData)otherData).id; 162 163 this.dayHitCount = ((HitCountData)otherData).dayHitCount; 164 this.totalHitCount = ((HitCountData)otherData).totalHitCount; 165 } 166 167 } 168 | Popular Tags |