1 package org.objectweb.jonas.jtests.beans.relation.tier; 2 3 import javax.ejb.EJBException ; 4 5 public abstract class TierBean 6 7 implements javax.ejb.EntityBean { 8 9 protected javax.ejb.EntityContext entityCtx = null; 10 11 protected TierValue TierValue = 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 getEmailtie(); 30 31 35 public abstract void setEmailtie(java.lang.String emailtie); 36 37 38 42 public abstract TiephyLocal getTiephy(); 43 44 47 public TiephyValue getTiephyValue() { 48 return getTiephy().getTiephyValue(); 50 } 51 52 55 public void setTiephyValue(TiephyValue value) { 56 getTiephy().update(value); 57 } 58 59 62 public abstract void setTiephy(TiephyLocal tiephy); 63 64 68 public abstract TiemorLocal getTiemor(); 69 70 73 public TiemorValue getTiemorValue() { 74 return getTiemor().getTiemorValue(); 76 } 77 78 81 public void setTiemorValue(TiemorValue value) { 82 getTiemor().update(value); 83 } 84 85 89 public abstract void setTiemor(TiemorLocal tiemor); 90 91 94 public TierValue getTierValue() { 95 try { 96 TierValue = new TierValue(); 97 TierValue = setColumns(TierValue); 98 return TierValue; 99 } catch (EJBException e) { 100 e.printStackTrace(); 102 } catch (IllegalStateException e) { 103 e.printStackTrace(); 105 } 106 return null; 107 108 } 109 110 114 public void update(TierValue value) { 115 if (value.emailtieHasBeenSet()) setEmailtie(value.getEmailtie()); 116 } 117 118 131 public java.lang.Integer ejbCreate(TierValue value) throws javax.ejb.CreateException { 132 try { 135 SequenceSessionLocal sequenceGenerator = SequenceSessionUtil.getLocalHome().create(); 136 setNuminttie(new java.lang.Integer (Integer.toString(sequenceGenerator 137 .getNextSequenceNumber("CNEDI.TIERS.NUMINTTIE")))); 138 } catch (javax.naming.NamingException e) { 139 throw new javax.ejb.CreateException (e.getMessage()); 140 } 141 144 setEmailtie(value.getEmailtie()); 145 return null; 147 } 148 149 153 public void ejbPostCreate(TierValue value) throws javax.ejb.CreateException { 154 } 155 156 157 public void setEntityContext(javax.ejb.EntityContext entityCtx) { 158 this.entityCtx = entityCtx; 159 } 160 161 public void unsetEntityContext() { 162 this.entityCtx = null; 163 } 164 165 private TierValue setColumns(TierValue value) { 166 value.setNuminttie(getNuminttie()); 167 value.setEmailtie(getEmailtie()); 168 return value; 169 } 170 } | Popular Tags |