1 package org.objectweb.speedo.pobjects.inheritance.ejboo2; 2 3 4 import java.io.*; 5 6 7 11 public class CataloguePersistantImplId implements Serializable { 12 static { 13 Class c = CataloguePersistantImpl.class; 15 } 16 17 public Long id; 18 19 20 public CataloguePersistantImplId() { 21 } 22 23 24 public CataloguePersistantImplId(String fromString) { 25 if("null".equals(fromString)) 26 id = null; 27 else 28 id = new Long (fromString); 29 } 30 31 32 public String toString() { 33 return String.valueOf(id); 34 } 35 36 37 public int hashCode() { 38 return ((id == null) ? 0 : id.hashCode()); 39 } 40 41 42 public boolean equals(Object obj) { 43 if(this == obj) 44 return true; 45 if(!(obj instanceof CataloguePersistantImplId)) 46 return false; 47 48 CataloguePersistantImplId other = (CataloguePersistantImplId) obj; 49 return ((id == null && other.id == null) 50 || (id != null && id.equals(other.id))); 51 } 52 } | Popular Tags |