1 4 package test.bea.cmr; 5 6 13 public class MagazineData 14 extends java.lang.Object 15 implements java.io.Serializable 16 { 17 private java.lang.String title; 18 private java.lang.String boid; 19 20 21 22 23 24 public MagazineData() 25 { 26 } 27 28 public MagazineData( java.lang.String title,java.lang.String boid ) 29 { 30 setTitle(title); 31 setBoid(boid); 32 } 33 34 public MagazineData( MagazineData otherData ) 35 { 36 setTitle(otherData.getTitle()); 37 setBoid(otherData.getBoid()); 38 39 } 40 41 public java.lang.String getPrimaryKey() { 42 return getBoid(); 43 } 44 45 public java.lang.String getTitle() 46 { 47 return this.title; 48 } 49 public void setTitle( java.lang.String title ) 50 { 51 this.title = title; 52 } 53 54 public java.lang.String getBoid() 55 { 56 return this.boid; 57 } 58 public void setBoid( java.lang.String boid ) 59 { 60 this.boid = boid; 61 } 62 63 public String toString() 64 { 65 StringBuffer str = new StringBuffer ("{"); 66 67 str.append("title=" + getTitle() + " " + "boid=" + getBoid()); 68 str.append('}'); 69 70 return(str.toString()); 71 } 72 73 public boolean equals( Object pOther ) 74 { 75 if( pOther instanceof MagazineData ) 76 { 77 MagazineData lTest = (MagazineData) pOther; 78 boolean lEquals = true; 79 80 if( this.title == null ) 81 { 82 lEquals = lEquals && ( lTest.title == null ); 83 } 84 else 85 { 86 lEquals = lEquals && this.title.equals( lTest.title ); 87 } 88 if( this.boid == null ) 89 { 90 lEquals = lEquals && ( lTest.boid == null ); 91 } 92 else 93 { 94 lEquals = lEquals && this.boid.equals( lTest.boid ); 95 } 96 97 return lEquals; 98 } 99 else 100 { 101 return false; 102 } 103 } 104 105 public int hashCode() 106 { 107 int result = 17; 108 109 result = 37*result + ((this.title != null) ? this.title.hashCode() : 0); 110 111 result = 37*result + ((this.boid != null) ? this.boid.hashCode() : 0); 112 113 return result; 114 } 115 116 } 117 | Popular Tags |