Foo.java
1 |
package sandbox; |
---|---|
2 |
|
3 |
import com.goldencode.p2j.persist.*; |
4 |
import com.goldencode.p2j.persist.annotation.*; |
5 |
import com.goldencode.p2j.util.*; |
6 |
|
7 |
/**
|
8 |
* Data Model Object corresponding with table <code>p2j_test.foo</code> (previously
|
9 |
* <code>p2j_test.foo</code>).
|
10 |
*/
|
11 |
@Table(name = "foo", legacy = "foo", label = "Foo") |
12 |
@Indices(
|
13 |
{ |
14 |
@Index(name = "foo__pi_make", legacy = "pi-make", primary = true, unique = true, components = |
15 |
{ |
16 |
@IndexComponent(field = "make") |
17 |
}), |
18 |
@Index(name = "foo__si_msrp", legacy = "si-msrp", components = |
19 |
{ |
20 |
@IndexComponent(field = "msrp", descending = true) |
21 |
}) |
22 |
}) |
23 |
public interface Foo |
24 |
{ |
25 |
/**
|
26 |
* Getter: Manufacturer
|
27 |
*
|
28 |
* @return Make
|
29 |
*/
|
30 |
@Property(id = 1, name = "make", legacy = "make", column = "make", format = "x(12)", label = "Make", mandatory = true, order = 5) |
31 |
public character getMake();
|
32 |
|
33 |
/**
|
34 |
* Setter: Manufacturer
|
35 |
*
|
36 |
* @param make
|
37 |
* Make
|
38 |
*/
|
39 |
public void setMake(Text make); |
40 |
|
41 |
/**
|
42 |
* Getter: Number of axles
|
43 |
*
|
44 |
* @return Number of axles
|
45 |
*/
|
46 |
@Property(id = 2, name = "axles", legacy = "axles", column = "axles", format = ">,>>>,>>9", initial = "2", label = "Number of axles", order = 20) |
47 |
public integer getAxles();
|
48 |
|
49 |
/**
|
50 |
* Setter: Number of axles
|
51 |
*
|
52 |
* @param axles
|
53 |
* Number of axles
|
54 |
*/
|
55 |
public void setAxles(NumberType axles); |
56 |
|
57 |
/**
|
58 |
* Indexed Getter: Optional features
|
59 |
*
|
60 |
* @param index
|
61 |
* Index of element (where <code>0 <= <em>index</em> < 10</code>).
|
62 |
*
|
63 |
* @return Option
|
64 |
*/
|
65 |
@Property(id = 3, name = "options", legacy = "options", column = "options", format = "x(32)", label = "Options", order = 50, extent = 10) |
66 |
public character getOptions(int index); |
67 |
|
68 |
/**
|
69 |
* Indexed Setter: Optional features
|
70 |
*
|
71 |
* @param index
|
72 |
* Index of element (where <code>0 <= <em>index</em> < 10</code>).
|
73 |
* @param element
|
74 |
* Option
|
75 |
*/
|
76 |
public void setOptions(int index, Text element); |
77 |
|
78 |
/**
|
79 |
* Indexed Getter: Optional feature prices
|
80 |
*
|
81 |
* @param index
|
82 |
* Index of element (where <code>0 <= <em>index</em> < 10</code>).
|
83 |
*
|
84 |
* @return Option price
|
85 |
*/
|
86 |
@Property(id = 4, name = "prices", legacy = "prices", column = "prices", format = "->>>,>>9.99", initial = "0", label = "Option Prices", order = 50, extent = 10) |
87 |
public decimal getPrices(int index); |
88 |
|
89 |
/**
|
90 |
* Indexed Setter: Optional feature prices
|
91 |
*
|
92 |
* @param index
|
93 |
* Index of element (where <code>0 <= <em>index</em> < 10</code>).
|
94 |
* @param element
|
95 |
* Option price
|
96 |
*/
|
97 |
public void setPrices(int index, NumberType element); |
98 |
|
99 |
/**
|
100 |
* Getter: Manufacturer suggested retail price
|
101 |
*
|
102 |
* @return MSRP
|
103 |
*/
|
104 |
@Property(id = 5, name = "msrp", legacy = "msrp", column = "msrp", format = "->>>,>>9.99", initial = "0", label = "MSRP", order = 60) |
105 |
public decimal getMsrp();
|
106 |
|
107 |
/**
|
108 |
* Setter: Manufacturer suggested retail price
|
109 |
*
|
110 |
* @param msrp
|
111 |
* MSRP
|
112 |
*/
|
113 |
public void setMsrp(NumberType msrp); |
114 |
|
115 |
/**
|
116 |
* DMO interface for use by converted business logic.
|
117 |
*/
|
118 |
public interface Buf |
119 |
extends Foo, Buffer |
120 |
{ |
121 |
/**
|
122 |
* Getter: Optional features
|
123 |
*
|
124 |
* @return Options
|
125 |
*/
|
126 |
public character[] getOptions(); |
127 |
|
128 |
/**
|
129 |
* Indexed Getter: Optional features
|
130 |
*
|
131 |
* @param index
|
132 |
* Index of element (where <code>0 <= <em>index</em> < 10</code>).
|
133 |
*
|
134 |
* @return Options
|
135 |
*/
|
136 |
public character getOptions(NumberType index);
|
137 |
|
138 |
/**
|
139 |
* Indexed Setter: Optional features
|
140 |
*
|
141 |
* @param index
|
142 |
* Index of element (where <code>0 <= <em>index</em> < 10</code>).
|
143 |
* @param element
|
144 |
* Options
|
145 |
*/
|
146 |
public void setOptions(NumberType index, Text element); |
147 |
|
148 |
/**
|
149 |
* Set all elements of the target list property to the given scalar value. Modifies the
|
150 |
* contents of: Optional features
|
151 |
*
|
152 |
* @param element
|
153 |
* Scalar value to which to set all elements of: Options
|
154 |
*/
|
155 |
public void setOptions(Text element); |
156 |
|
157 |
/**
|
158 |
* Set as many elements of the target list property as are provided in the given array of
|
159 |
* scalar values. Modifies the contents of: Optional features
|
160 |
* <p>
|
161 |
* If the given array is larger than the target list, any additional elements in the given
|
162 |
* array are ignored. If the target array is smaller than the target list, only those
|
163 |
* elements whose array indices match are updated.
|
164 |
*
|
165 |
* @param elements
|
166 |
* Array of scalar values to which to set the corresponding elements of: Options
|
167 |
*/
|
168 |
public void setOptions(Text[] elements); |
169 |
|
170 |
} |
171 |
} |