1 package org.objectweb.jonas.jtests.beans.relation.tier; 2 3 import javax.ejb.EJBException ; 4 5 6 10 public abstract class TiemorBean 11 12 13 implements javax.ejb.EntityBean { 14 15 protected javax.ejb.EntityContext entityCtx = null; 16 protected TiemorValue TiemorValue = null; 17 18 22 public abstract java.lang.Integer getNuminttie(); 23 24 28 public abstract void setNuminttie(java.lang.Integer numinttie); 29 30 34 public abstract java.lang.String getRaisoctie(); 35 36 40 public abstract void setRaisoctie(java.lang.String raisoctie); 41 42 43 47 public abstract TierLocal getTier(); 48 49 52 public TierValue getTierValue() { 53 return getTier().getTierValue(); 55 } 56 57 60 public void setTierValue(TierValue value) { 61 getTier().update(value); 62 } 63 68 public abstract void setTier(TierLocal tier); 69 70 71 72 73 74 77 public TiemorValue getTiemorValue() { 78 try { 79 TiemorValue = new TiemorValue(); 80 TiemorValue = setColumns(TiemorValue); 81 return TiemorValue; 82 } catch (EJBException e) { 83 e.printStackTrace(); 85 } catch (IllegalStateException e) { 86 e.printStackTrace(); 88 } 89 return null; 90 91 } 92 93 96 public void update(TiemorValue value) { 97 if (value.raisoctieHasBeenSet()) 98 setRaisoctie(value.getRaisoctie()); 99 } 100 101 118 public java.lang.Integer ejbCreate(TiemorValue value, TierLocal tier) throws javax.ejb.CreateException { 119 try { 121 SequenceSessionLocal sequenceGenerator = 122 SequenceSessionUtil.getLocalHome().create(); 123 setNuminttie(new java.lang.Integer (Integer.toString(sequenceGenerator.getNextSequenceNumber( "CNEDI.TIEMOR.NUMINTTIE" )))); 124 } catch( javax.naming.NamingException e ) { 125 throw new javax.ejb.CreateException (e.getMessage()); 126 } 127 130 131 setRaisoctie(value.getRaisoctie()); 132 return null; 134 } 135 136 140 public void ejbPostCreate(TiemorValue value, TierLocal tier) throws javax.ejb.CreateException { 141 setTier(tier); 143 } 144 145 public void setEntityContext(javax.ejb.EntityContext entityCtx) 146 { 147 this.entityCtx = entityCtx; 148 } 149 150 public void unsetEntityContext() 151 { 152 this.entityCtx = null; 153 } 154 155 private TiemorValue setColumns(TiemorValue value) { 156 value.setNuminttie(getNuminttie()); 157 value.setRaisoctie(getRaisoctie()); 158 return value; 159 } 160 } 161 | Popular Tags |