1 package com.genimen.djeneric.test.strong.impl; 2 3 import com.genimen.djeneric.repository.DjExtent; 4 import com.genimen.djeneric.repository.DjQueryByExample; 5 import com.genimen.djeneric.repository.DjSession; 6 import com.genimen.djeneric.repository.exceptions.DjenericException; 7 import com.genimen.djeneric.test.strong.Order; 8 import com.genimen.djeneric.test.strong.OrderlineQbe; 9 import com.genimen.djeneric.test.strong.Product; 10 import com.genimen.djeneric.test.strong.TestException; 11 12 public class OrderlineQbeImpl extends DjQueryByExample implements OrderlineQbe 16 { 17 private static boolean propidx_set = false; 18 private static int PROPIDX_ID; 19 private static int PROPIDX_LINE; 20 private static int PROPIDX_QUANTITY; 21 private static int PROPIDX_THEORDER; 22 private static int PROPIDX_PRODUCT; 23 24 protected OrderlineQbeImpl(DjSession session, DjExtent extent) throws DjenericException 25 { 26 super(session, extent); 27 if (!propidx_set) 28 { 29 propidx_set = true; 30 PROPIDX_ID = extent.getPropertyIndex("id"); 31 PROPIDX_LINE = extent.getPropertyIndex("line"); 32 PROPIDX_QUANTITY = extent.getPropertyIndex("quantity"); 33 PROPIDX_THEORDER = extent.getPropertyIndex("theOrder"); 34 PROPIDX_PRODUCT = extent.getPropertyIndex("product"); 35 } 36 } 37 38 public void setQueryOperator(String propertyName, String operator) throws TestException 39 { 40 try 41 { 42 setOperator(propertyName, operator); 43 } 44 catch (Exception x) 45 { 46 throw new TestException(x); 47 } 48 } 49 50 public long getId() 51 { 52 return getLong(PROPIDX_ID); 53 } 54 55 public void setId(long value) throws TestException 56 { 57 try 58 { 59 setLong(PROPIDX_ID, value); 60 } 61 catch (Exception x) 62 { 63 throw new TestException(x); 64 } 65 } 66 67 public int getLine() 68 { 69 return getInt(PROPIDX_LINE); 70 } 71 72 public void setLine(int value) throws TestException 73 { 74 try 75 { 76 setInt(PROPIDX_LINE, value); 77 } 78 catch (Exception x) 79 { 80 throw new TestException(x); 81 } 82 } 83 84 public int getQuantity() 85 { 86 return getInt(PROPIDX_QUANTITY); 87 } 88 89 public void setQuantity(int value) throws TestException 90 { 91 try 92 { 93 setInt(PROPIDX_QUANTITY, value); 94 } 95 catch (Exception x) 96 { 97 throw new TestException(x); 98 } 99 } 100 101 public Order getTheOrder() throws TestException 102 { 103 try 104 { 105 return (Order) get(PROPIDX_THEORDER); 106 } 107 catch (Exception x) 108 { 109 throw new TestException(x); 110 } 111 } 112 113 public void setTheOrder(Order value) throws TestException 114 { 115 try 116 { 117 set(PROPIDX_THEORDER, (OrderImpl) value); 118 } 119 catch (Exception x) 120 { 121 throw new TestException(x); 122 } 123 } 124 125 public Product getProduct() throws TestException 126 { 127 try 128 { 129 return (Product) get(PROPIDX_PRODUCT); 130 } 131 catch (Exception x) 132 { 133 throw new TestException(x); 134 } 135 } 136 137 public void setProduct(Product value) throws TestException 138 { 139 try 140 { 141 set(PROPIDX_PRODUCT, (ProductImpl) value); 142 } 143 catch (Exception x) 144 { 145 throw new TestException(x); 146 } 147 } 148 149 } | Popular Tags |