1 | |
package org.paneris.jammyjoes.model; |
2 | |
|
3 | |
import java.sql.ResultSet; |
4 | |
|
5 | |
import org.melati.poem.Database; |
6 | |
import org.melati.poem.DefinitionSource; |
7 | |
import org.melati.poem.PoemException; |
8 | |
import org.paneris.jammyjoes.model.generated.StockTransactionTypeTableBase; |
9 | |
|
10 | |
public class StockTransactionTypeTable extends StockTransactionTypeTableBase { |
11 | |
|
12 | |
private StockTransactionType InternetSale, Purchase, ShopSale, StockCheckDecrease, StockCheckIncrease, TelephoneSale; |
13 | |
|
14 | |
public StockTransactionTypeTable( |
15 | |
Database database, String name, |
16 | |
DefinitionSource definitionSource) throws PoemException { |
17 | 0 | super(database, name, definitionSource); |
18 | 0 | InternetSale = (StockTransactionType)newPersistent(); |
19 | 0 | InternetSale.setType_unsafe("Internet Sale"); |
20 | 0 | InternetSale.setReducestock_unsafe(Boolean.TRUE); |
21 | 0 | TelephoneSale = (StockTransactionType)newPersistent(); |
22 | 0 | TelephoneSale.setType_unsafe("Telephone Sale"); |
23 | 0 | TelephoneSale.setReducestock_unsafe(Boolean.TRUE); |
24 | 0 | Purchase = (StockTransactionType)newPersistent(); |
25 | 0 | Purchase.setType_unsafe("Purchase"); |
26 | 0 | Purchase.setReducestock_unsafe(Boolean.FALSE); |
27 | 0 | ShopSale = (StockTransactionType)newPersistent(); |
28 | 0 | ShopSale.setType_unsafe("Shop Sale"); |
29 | 0 | ShopSale.setReducestock_unsafe(Boolean.TRUE); |
30 | 0 | StockCheckDecrease = (StockTransactionType)newPersistent(); |
31 | 0 | StockCheckDecrease.setType_unsafe("Stock Check (Decrease)"); |
32 | 0 | StockCheckDecrease.setReducestock_unsafe(Boolean.TRUE); |
33 | 0 | StockCheckIncrease = (StockTransactionType)newPersistent(); |
34 | 0 | StockCheckIncrease.setType_unsafe("Stock Check (Increase)"); |
35 | 0 | StockCheckIncrease.setReducestock_unsafe(Boolean.FALSE); |
36 | 0 | } |
37 | |
|
38 | |
public synchronized void unifyWithDB(ResultSet colDescs) |
39 | |
throws PoemException { |
40 | 0 | super.unifyWithDB(colDescs); |
41 | 0 | InternetSale = (StockTransactionType)getTypeColumn().ensure(InternetSale); |
42 | 0 | TelephoneSale = (StockTransactionType)getTypeColumn().ensure(TelephoneSale); |
43 | 0 | Purchase = (StockTransactionType)getTypeColumn().ensure(Purchase); |
44 | 0 | ShopSale = (StockTransactionType)getTypeColumn().ensure(ShopSale); |
45 | 0 | StockCheckDecrease = (StockTransactionType)getTypeColumn().ensure(StockCheckDecrease); |
46 | 0 | StockCheckIncrease = (StockTransactionType)getTypeColumn().ensure(StockCheckIncrease); |
47 | 0 | } |
48 | |
|
49 | |
public StockTransactionType getInternetSale() { |
50 | 0 | return InternetSale; |
51 | |
} |
52 | |
|
53 | |
public StockTransactionType getTelephoneSale() { |
54 | 0 | return TelephoneSale; |
55 | |
} |
56 | |
|
57 | |
public StockTransactionType getPurchase() { |
58 | 0 | return Purchase; |
59 | |
} |
60 | |
|
61 | |
public StockTransactionType getShopSale() { |
62 | 0 | return ShopSale; |
63 | |
} |
64 | |
|
65 | |
public StockTransactionType getStockCheckDecrease() { |
66 | 0 | return StockCheckDecrease; |
67 | |
} |
68 | |
|
69 | |
public StockTransactionType getStockCheckIncreasee() { |
70 | 0 | return StockCheckIncrease; |
71 | |
} |
72 | |
|
73 | |
} |