1 23 24 package org.objectweb.jorm.runtime.multitable; 25 26 import org.objectweb.jorm.pobject.multitable.ClassRef_SN_MTAccessor; 27 import org.objectweb.jorm.pobject.multitable.ClassRef_CN_MTAccessor; 28 import org.objectweb.jorm.naming.api.PName; 29 import org.objectweb.jorm.api.PException; 30 import junit.framework.Assert; 31 32 35 public class ClassRef_MT 36 implements ClassRef_SN_MTAccessor, 37 ClassRef_CN_MTAccessor { 38 39 public PName c = null; 40 public PName d = null; 41 42 public ClassRef_MT() { 43 } 44 45 public ClassRef_MT(PName c, PName d) { 46 this.c = c; 47 this.d = d; 48 } 49 public String toString() { 50 return "ClassRef_MT(" + c + ", " + d + ")"; 51 } 52 53 61 public boolean equals(Object obj) { 62 Assert.assertNotNull("Null value", obj); 63 Assert.assertEquals("Bad class", ClassRef_MT.class, obj.getClass()); 64 ClassRef_MT cr = (ClassRef_MT) obj; 65 Assert.assertEquals("Bad c value", c, cr.c); 66 Assert.assertEquals("Bad d value", d, cr.d); 67 return true; 68 } 69 70 public void paSetD(PName val, Object connection) throws PException { 72 d = val; 73 } 74 75 public PName paGetD(Object connection) throws PException { 76 return d; 77 } 78 79 public void paSetC(PName val, Object connection) throws PException { 81 c = val; 82 } 83 84 public PName paGetC(Object connection) throws PException { 85 return c; 86 } 87 88 public Object getMemoryInstance() { 89 return this; 90 } 91 } 92 | Popular Tags |