1 10 11 package com.triactive.jdo.test.npt; 12 13 import com.triactive.jdo.test.*; 14 15 16 public class NptWidget extends Widget 17 { 18 private int txInteger; 19 private String txString; 20 21 22 public NptWidget() 23 { 24 super(); 25 } 26 27 28 public int getTxInteger() 29 { 30 return txInteger; 31 } 32 33 34 public String getTxString() 35 { 36 return txString; 37 } 38 39 40 public void setTxInteger(int txInteger) 41 { 42 this.txInteger = txInteger; 43 } 44 45 46 public void setTxString(String txString) 47 { 48 this.txString = txString; 49 } 50 51 52 57 58 public void fillRandom() 59 { 60 super.fillRandom(); 61 fillTxRandom(); 62 } 63 64 65 70 71 public void fillTxRandom() 72 { 73 txInteger = r.nextInt(); 74 txString = nextNull() ? null : nextString(r.nextInt(21)); 75 } 76 77 78 84 85 public String toString() 86 { 87 StringBuffer s = new StringBuffer (super.toString()); 88 89 s.append(" txInteger = ").append(txInteger); 90 s.append('\n'); 91 s.append(" txString = ").append(txString); 92 s.append('\n'); 93 94 return s.toString(); 95 } 96 } 97 | Popular Tags |