1 4 package org.jboss.test.entity.interfaces; 5 6 import java.util.*; 7 8 12 public class TestEntityValue 13 extends 14 java.lang.Object 15 implements java.io.Serializable 16 { 17 private java.lang.String entityID; 18 private boolean entityIDHasBeenSet = false; 19 private java.lang.String value1; 20 private boolean value1HasBeenSet = false; 21 22 private java.lang.String pk; 23 24 public TestEntityValue() 25 { 26 } 27 28 public TestEntityValue( java.lang.String entityID,java.lang.String value1 ) 29 { 30 this.entityID = entityID; 31 entityIDHasBeenSet = true; 32 this.value1 = value1; 33 value1HasBeenSet = true; 34 pk = this.getEntityID(); 35 } 36 37 public TestEntityValue( TestEntityValue otherValue ) 39 { 40 this.entityID = otherValue.entityID; 41 entityIDHasBeenSet = true; 42 this.value1 = otherValue.value1; 43 value1HasBeenSet = true; 44 45 pk = this.getEntityID(); 46 } 47 48 public java.lang.String getPrimaryKey() 49 { 50 return pk; 51 } 52 53 public void setPrimaryKey( java.lang.String pk ) 54 { 55 this.pk = pk; 58 setEntityID( pk ); 59 } 60 61 public java.lang.String getEntityID() 62 { 63 return this.entityID; 64 } 65 66 public void setEntityID( java.lang.String entityID ) 67 { 68 this.entityID = entityID; 69 entityIDHasBeenSet = true; 70 71 pk = entityID; 72 } 73 74 public boolean entityIDHasBeenSet(){ 75 return entityIDHasBeenSet; 76 } 77 public java.lang.String getValue1() 78 { 79 return this.value1; 80 } 81 82 public void setValue1( java.lang.String value1 ) 83 { 84 this.value1 = value1; 85 value1HasBeenSet = true; 86 87 } 88 89 public boolean value1HasBeenSet(){ 90 return value1HasBeenSet; 91 } 92 93 public String toString() 94 { 95 StringBuffer str = new StringBuffer ("{"); 96 97 str.append("entityID=" + getEntityID() + " " + "value1=" + getValue1()); 98 str.append('}'); 99 100 return(str.toString()); 101 } 102 103 108 protected boolean hasIdentity() 109 { 110 return entityIDHasBeenSet; 111 } 112 113 public boolean equals(Object other) 114 { 115 if (this == other) 116 return true; 117 if ( ! hasIdentity() ) return false; 118 if (other instanceof TestEntityValue) 119 { 120 TestEntityValue that = (TestEntityValue) other; 121 if ( ! that.hasIdentity() ) return false; 122 boolean lEquals = true; 123 124 lEquals = lEquals && isIdentical(that); 125 126 return lEquals; 127 } 128 else 129 { 130 return false; 131 } 132 } 133 134 public boolean isIdentical(Object other) 135 { 136 if (other instanceof TestEntityValue) 137 { 138 TestEntityValue that = (TestEntityValue) other; 139 boolean lEquals = true; 140 if( this.entityID == null ) 141 { 142 lEquals = lEquals && ( that.entityID == null ); 143 } 144 else 145 { 146 lEquals = lEquals && this.entityID.equals( that.entityID ); 147 } 148 if( this.value1 == null ) 149 { 150 lEquals = lEquals && ( that.value1 == null ); 151 } 152 else 153 { 154 lEquals = lEquals && this.value1.equals( that.value1 ); 155 } 156 157 return lEquals; 158 } 159 else 160 { 161 return false; 162 } 163 } 164 165 public int hashCode(){ 166 int result = 17; 167 result = 37*result + ((this.entityID != null) ? this.entityID.hashCode() : 0); 168 169 result = 37*result + ((this.value1 != null) ? this.value1.hashCode() : 0); 170 171 return result; 172 } 173 174 } 175 | Popular Tags |