1 package org.objectweb.jonas.jtests.beans.relation.tier; 2 3 import javax.ejb.EJBException ; 4 5 public abstract class TiephyBean 6 7 implements javax.ejb.EntityBean { 8 9 protected javax.ejb.EntityContext entityCtx = null; 10 11 protected TiephyValue TiephyValue = null; 12 13 17 public abstract java.lang.Integer getNuminttie(); 18 19 23 public abstract void setNuminttie(java.lang.Integer numinttie); 24 25 29 public abstract java.lang.String getNomusatie(); 30 31 35 public abstract void setNomusatie(java.lang.String nomusatie); 36 37 41 public abstract TierLocal getTier(); 42 43 46 public TierValue getTierValue() { 47 return getTier().getTierValue(); 49 } 50 51 55 public void setTierValue(TierValue value) { 56 getTier().update(value); 57 } 58 59 63 public abstract void setTier(TierLocal tier); 64 65 68 public TiephyValue getTiephyValue() { 69 try { 70 TiephyValue = new TiephyValue(); 71 TiephyValue = setColumns(TiephyValue); 72 return TiephyValue; 73 } catch (EJBException e) { 74 e.printStackTrace(); 76 } catch (IllegalStateException e) { 77 e.printStackTrace(); 79 } 80 return null; 81 82 } 83 84 88 public void update(TiephyValue value) { 89 if (value.nomusatieHasBeenSet()) setNomusatie(value.getNomusatie()); 90 } 91 92 104 public java.lang.Integer ejbCreate(TiephyValue value, TierLocal tier) 105 throws javax.ejb.CreateException { 106 try { 109 SequenceSessionLocal sequenceGenerator = SequenceSessionUtil.getLocalHome().create(); 110 setNuminttie(new java.lang.Integer (Integer.toString(sequenceGenerator 111 .getNextSequenceNumber("CNEDI.TIEPHY.NUMINTTIE")))); 112 } catch (javax.naming.NamingException e) { 113 throw new javax.ejb.CreateException (e.getMessage()); 114 } 115 118 setNomusatie(value.getNomusatie()); 119 return null; 121 } 122 123 127 public void ejbPostCreate(TiephyValue value, TierLocal tier) 128 throws javax.ejb.CreateException { 129 setTier(tier); 131 } 132 133 137 public void setEntityContext(javax.ejb.EntityContext entityCtx) { 138 this.entityCtx = entityCtx; 139 } 140 141 public void unsetEntityContext() { 142 this.entityCtx = null; 143 } 144 145 private TiephyValue setColumns(TiephyValue value) { 146 value.setNuminttie(getNuminttie()); 147 value.setNomusatie(getNomusatie()); 148 return value; 149 } 150 } | Popular Tags |