|
@@ -9,25 +9,21 @@ |
9 |
9 |
|
|
10 |
10 |
|
public abstract class ToDoStoryGO |
11 |
11 |
|
extends org.litesoft.orsup.nonpublic.PersistentObjectImpl<ToDoStory> |
12 |
|
- |
implements HasAttributes |
13 |
|
- |
{ |
|
12 |
+ |
implements HasAttributes { |
14 |
13 |
|
private static final ConstructionControl CONSTRUCTION_CONTROL = new ConstructionControl(); |
15 |
14 |
|
|
16 |
|
- |
public static SimpleFromIdentifier from() |
17 |
|
- |
{ |
|
15 |
+ |
public static SimpleFromIdentifier from() { |
18 |
16 |
|
return ToDoStoryMetaData.INSTANCE; |
19 |
17 |
|
} |
20 |
18 |
|
|
21 |
|
- |
protected ToDoStoryGO( Transaction pTransaction ) |
22 |
|
- |
{ |
|
19 |
+ |
protected ToDoStoryGO( Transaction pTransaction ) { |
23 |
20 |
|
super( ToDoStoryMetaData.INSTANCE, pTransaction ); |
24 |
21 |
|
mID = getNextSequenceNumber( getClass() ); |
25 |
22 |
|
registerWithTransaction(); |
26 |
23 |
|
setDefaults(); |
27 |
24 |
|
} |
28 |
25 |
|
|
29 |
|
- |
protected ToDoStoryGO( ConstructionControl pConstructionControl ) |
30 |
|
- |
{ |
|
26 |
+ |
protected ToDoStoryGO( ConstructionControl pConstructionControl ) { |
31 |
27 |
|
super( ToDoStoryMetaData.INSTANCE, CONSTRUCTION_CONTROL, pConstructionControl ); |
32 |
28 |
|
} |
33 |
29 |
|
|
|
@@ -35,22 +31,18 @@ |
35 |
31 |
|
|
36 |
32 |
|
protected final RecordVersionHelper mRecordVersion = new RecordVersionHelper(); |
37 |
33 |
|
|
38 |
|
- |
public Long getRecordVersion() |
39 |
|
- |
{ |
|
34 |
+ |
public Long getRecordVersion() { |
40 |
35 |
|
return mRecordVersion.getRecordVersion(); |
41 |
36 |
|
} |
42 |
37 |
|
|
43 |
38 |
|
private static class AttributeAccessor_RecordVersion |
44 |
|
- |
extends AttributeAccessorSCD_RecordVersion<ToDoStory> |
45 |
|
- |
{ |
46 |
|
- |
public AttributeAccessor_RecordVersion() |
47 |
|
- |
{ |
|
39 |
+ |
extends AttributeAccessorSCD_RecordVersion<ToDoStory> { |
|
40 |
+ |
public AttributeAccessor_RecordVersion() { |
48 |
41 |
|
super( "RecordVersion", "RecordVersion" ); |
49 |
42 |
|
} |
50 |
43 |
|
|
51 |
44 |
|
@Override |
52 |
|
- |
protected RecordVersionHelper getRecordVersionHelper( ToDoStory pPO ) |
53 |
|
- |
{ |
|
45 |
+ |
protected RecordVersionHelper getRecordVersionHelper( ToDoStory pPO ) { |
54 |
46 |
|
return pPO.mRecordVersion; |
55 |
47 |
|
} |
56 |
48 |
|
} |
|
@@ -59,35 +51,29 @@ |
59 |
51 |
|
|
60 |
52 |
|
private Long mID; |
61 |
53 |
|
|
62 |
|
- |
public Long getID() |
63 |
|
- |
{ |
|
54 |
+ |
public Long getID() { |
64 |
55 |
|
return mID; |
65 |
56 |
|
} |
66 |
57 |
|
|
67 |
|
- |
protected void LLsetID( Long pID ) |
68 |
|
- |
{ |
|
58 |
+ |
protected void LLsetID( Long pID ) { |
69 |
59 |
|
verifyMutability( CD_ID, mID, pID ); |
70 |
60 |
|
mID = pID; |
71 |
61 |
|
} |
72 |
62 |
|
|
73 |
63 |
|
private static class AttributeAccessor_ID |
74 |
64 |
|
extends AttributeAccessorSCDsimplePersistedSysSetOnly<ToDoStory> |
75 |
|
- |
implements NonImportableFeature |
76 |
|
- |
{ |
77 |
|
- |
public AttributeAccessor_ID() |
78 |
|
- |
{ |
|
65 |
+ |
implements NonImportableFeature { |
|
66 |
+ |
public AttributeAccessor_ID() { |
79 |
67 |
|
super( "ID", "ID", false, _Long.AddOnly() ); |
80 |
68 |
|
} |
81 |
69 |
|
|
82 |
70 |
|
@Override |
83 |
|
- |
public Object getValueOnPO( ToDoStory pPO ) |
84 |
|
- |
{ |
|
71 |
+ |
public Object getValueOnPO( ToDoStory pPO ) { |
85 |
72 |
|
return pPO.getID(); |
86 |
73 |
|
} |
87 |
74 |
|
|
88 |
75 |
|
@Override |
89 |
|
- |
public void db_setValueOnPO( ToDoStory pPO, Object pValue ) |
90 |
|
- |
{ |
|
76 |
+ |
public void db_setValueOnPO( ToDoStory pPO, Object pValue ) { |
91 |
77 |
|
pPO.LLsetID( to_Long( pValue ) ); |
92 |
78 |
|
} |
93 |
79 |
|
} |
|
@@ -96,35 +82,29 @@ |
96 |
82 |
|
|
97 |
83 |
|
private String mDescription; |
98 |
84 |
|
|
99 |
|
- |
public String getDescription() |
100 |
|
- |
{ |
|
85 |
+ |
public String getDescription() { |
101 |
86 |
|
return mDescription; |
102 |
87 |
|
} |
103 |
88 |
|
|
104 |
|
- |
public void setDescription( String pDescription ) |
105 |
|
- |
{ |
|
89 |
+ |
public void setDescription( String pDescription ) { |
106 |
90 |
|
verifyMutability( CD_Description, mDescription, pDescription ); |
107 |
91 |
|
mDescription = pDescription; |
108 |
92 |
|
} |
109 |
93 |
|
|
110 |
94 |
|
private static class AttributeAccessor_Description |
111 |
|
- |
extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> |
112 |
|
- |
{ |
113 |
|
- |
public AttributeAccessor_Description() |
114 |
|
- |
{ |
|
95 |
+ |
extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> { |
|
96 |
+ |
public AttributeAccessor_Description() { |
115 |
97 |
|
super( "Description", "Description", false, _Text.with( DisplayWidthInitial.of( 40 ), // |
116 |
98 |
|
DisplayHeightInitial.of( 4 ) ) ); |
117 |
99 |
|
} |
118 |
100 |
|
|
119 |
101 |
|
@Override |
120 |
|
- |
public Object getValueOnPO( ToDoStory pPO ) |
121 |
|
- |
{ |
|
102 |
+ |
public Object getValueOnPO( ToDoStory pPO ) { |
122 |
103 |
|
return pPO.getDescription(); |
123 |
104 |
|
} |
124 |
105 |
|
|
125 |
106 |
|
@Override |
126 |
|
- |
public void setValueOnPO( ToDoStory pPO, Object pValue ) |
127 |
|
- |
{ |
|
107 |
+ |
public void setValueOnPO( ToDoStory pPO, Object pValue ) { |
128 |
108 |
|
pPO.setDescription( to_String( pValue ) ); |
129 |
109 |
|
} |
130 |
110 |
|
} |
|
@@ -133,34 +113,28 @@ |
133 |
113 |
|
|
134 |
114 |
|
private Integer mEstimate; |
135 |
115 |
|
|
136 |
|
- |
public Integer getEstimate() |
137 |
|
- |
{ |
|
116 |
+ |
public Integer getEstimate() { |
138 |
117 |
|
return mEstimate; |
139 |
118 |
|
} |
140 |
119 |
|
|
141 |
|
- |
public void setEstimate( Integer pEstimate ) |
142 |
|
- |
{ |
|
120 |
+ |
public void setEstimate( Integer pEstimate ) { |
143 |
121 |
|
verifyMutability( CD_Estimate, mEstimate, pEstimate ); |
144 |
122 |
|
mEstimate = pEstimate; |
145 |
123 |
|
} |
146 |
124 |
|
|
147 |
125 |
|
private static class AttributeAccessor_Estimate |
148 |
|
- |
extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> |
149 |
|
- |
{ |
150 |
|
- |
public AttributeAccessor_Estimate() |
151 |
|
- |
{ |
|
126 |
+ |
extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> { |
|
127 |
+ |
public AttributeAccessor_Estimate() { |
152 |
128 |
|
super( "Estimate", "Estimate", false, _Integer.with( DisplayLength.of( 4 ) ) ); |
153 |
129 |
|
} |
154 |
130 |
|
|
155 |
131 |
|
@Override |
156 |
|
- |
public Object getValueOnPO( ToDoStory pPO ) |
157 |
|
- |
{ |
|
132 |
+ |
public Object getValueOnPO( ToDoStory pPO ) { |
158 |
133 |
|
return pPO.getEstimate(); |
159 |
134 |
|
} |
160 |
135 |
|
|
161 |
136 |
|
@Override |
162 |
|
- |
public void setValueOnPO( ToDoStory pPO, Object pValue ) |
163 |
|
- |
{ |
|
137 |
+ |
public void setValueOnPO( ToDoStory pPO, Object pValue ) { |
164 |
138 |
|
pPO.setEstimate( to_Integer( pValue ) ); |
165 |
139 |
|
} |
166 |
140 |
|
} |
|
@@ -172,40 +146,33 @@ |
172 |
146 |
|
/** |
173 |
147 |
|
* On change, update the StoryTrack's OpenStories |
174 |
148 |
|
*/ |
175 |
|
- |
public Boolean getOpenTasks() |
176 |
|
- |
{ |
|
149 |
+ |
public Boolean getOpenTasks() { |
177 |
150 |
|
return mOpenTasks; |
178 |
151 |
|
} |
179 |
152 |
|
|
180 |
|
- |
public void setOpenTasks( Boolean pOpenTasks ) |
181 |
|
- |
{ |
|
153 |
+ |
public void setOpenTasks( Boolean pOpenTasks ) { |
182 |
154 |
|
verifyMutability( CD_OpenTasks, mOpenTasks, pOpenTasks ); |
183 |
155 |
|
mOpenTasks = pOpenTasks; |
184 |
156 |
|
} |
185 |
157 |
|
|
186 |
158 |
|
private static class AttributeAccessor_OpenTasks |
187 |
|
- |
extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> |
188 |
|
- |
{ |
189 |
|
- |
public AttributeAccessor_OpenTasks() |
190 |
|
- |
{ |
|
159 |
+ |
extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> { |
|
160 |
+ |
public AttributeAccessor_OpenTasks() { |
191 |
161 |
|
super( "OpenTasks", "OpenTasks", false, _Boolean ); |
192 |
162 |
|
} |
193 |
163 |
|
|
194 |
164 |
|
@Override |
195 |
|
- |
public Object getDefault() |
196 |
|
- |
{ |
|
165 |
+ |
public Object getDefault() { |
197 |
166 |
|
return false; |
198 |
167 |
|
} |
199 |
168 |
|
|
200 |
169 |
|
@Override |
201 |
|
- |
public Object getValueOnPO( ToDoStory pPO ) |
202 |
|
- |
{ |
|
170 |
+ |
public Object getValueOnPO( ToDoStory pPO ) { |
203 |
171 |
|
return pPO.getOpenTasks(); |
204 |
172 |
|
} |
205 |
173 |
|
|
206 |
174 |
|
@Override |
207 |
|
- |
public void setValueOnPO( ToDoStory pPO, Object pValue ) |
208 |
|
- |
{ |
|
175 |
+ |
public void setValueOnPO( ToDoStory pPO, Object pValue ) { |
209 |
176 |
|
pPO.setOpenTasks( to_Boolean( pValue ) ); |
210 |
177 |
|
} |
211 |
178 |
|
} |
|
@@ -214,34 +181,28 @@ |
214 |
181 |
|
|
215 |
182 |
|
private Float mPriority; |
216 |
183 |
|
|
217 |
|
- |
public Float getPriority() |
218 |
|
- |
{ |
|
184 |
+ |
public Float getPriority() { |
219 |
185 |
|
return mPriority; |
220 |
186 |
|
} |
221 |
187 |
|
|
222 |
|
- |
public void setPriority( Float pPriority ) |
223 |
|
- |
{ |
|
188 |
+ |
public void setPriority( Float pPriority ) { |
224 |
189 |
|
verifyMutability( CD_Priority, mPriority, pPriority ); |
225 |
190 |
|
mPriority = pPriority; |
226 |
191 |
|
} |
227 |
192 |
|
|
228 |
193 |
|
private static class AttributeAccessor_Priority |
229 |
|
- |
extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> |
230 |
|
- |
{ |
231 |
|
- |
public AttributeAccessor_Priority() |
232 |
|
- |
{ |
|
194 |
+ |
extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> { |
|
195 |
+ |
public AttributeAccessor_Priority() { |
233 |
196 |
|
super( "Priority", "Priority", true, _Float.with( DisplayLength.of( 9 ) ) ); |
234 |
197 |
|
} |
235 |
198 |
|
|
236 |
199 |
|
@Override |
237 |
|
- |
public Object getValueOnPO( ToDoStory pPO ) |
238 |
|
- |
{ |
|
200 |
+ |
public Object getValueOnPO( ToDoStory pPO ) { |
239 |
201 |
|
return pPO.getPriority(); |
240 |
202 |
|
} |
241 |
203 |
|
|
242 |
204 |
|
@Override |
243 |
|
- |
public void setValueOnPO( ToDoStory pPO, Object pValue ) |
244 |
|
- |
{ |
|
205 |
+ |
public void setValueOnPO( ToDoStory pPO, Object pValue ) { |
245 |
206 |
|
pPO.setPriority( to_Float( pValue ) ); |
246 |
207 |
|
} |
247 |
208 |
|
} |
|
@@ -250,111 +211,92 @@ |
250 |
211 |
|
|
251 |
212 |
|
private String mTitle; |
252 |
213 |
|
|
253 |
|
- |
public String getTitle() |
254 |
|
- |
{ |
|
214 |
+ |
public String getTitle() { |
255 |
215 |
|
return mTitle; |
256 |
216 |
|
} |
257 |
217 |
|
|
258 |
|
- |
public void setTitle( String pTitle ) |
259 |
|
- |
{ |
|
218 |
+ |
public void setTitle( String pTitle ) { |
260 |
219 |
|
verifyMutability( CD_Title, mTitle, pTitle ); |
261 |
220 |
|
mTitle = pTitle; |
262 |
221 |
|
} |
263 |
222 |
|
|
264 |
223 |
|
private static class AttributeAccessor_Title |
265 |
|
- |
extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> |
266 |
|
- |
{ |
267 |
|
- |
public AttributeAccessor_Title() |
268 |
|
- |
{ |
|
224 |
+ |
extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> { |
|
225 |
+ |
public AttributeAccessor_Title() { |
269 |
226 |
|
super( "Title", "Title", true, _String.with( MaxLength.of( 100 ), // |
270 |
227 |
|
DisplayLength.of( 20 ) ) ); |
271 |
228 |
|
} |
272 |
229 |
|
|
273 |
230 |
|
@Override |
274 |
|
- |
public Object getValueOnPO( ToDoStory pPO ) |
275 |
|
- |
{ |
|
231 |
+ |
public Object getValueOnPO( ToDoStory pPO ) { |
276 |
232 |
|
return pPO.getTitle(); |
277 |
233 |
|
} |
278 |
234 |
|
|
279 |
235 |
|
@Override |
280 |
|
- |
public void setValueOnPO( ToDoStory pPO, Object pValue ) |
281 |
|
- |
{ |
|
236 |
+ |
public void setValueOnPO( ToDoStory pPO, Object pValue ) { |
282 |
237 |
|
pPO.setTitle( to_String( pValue ) ); |
283 |
238 |
|
} |
284 |
239 |
|
} |
285 |
240 |
|
|
286 |
|
- |
public static final AttributeAccessorSCDtoManyRegular<ToDoStory,ToDoTask> CD_Tasks = new AttributeAccessor_Tasks(); |
|
241 |
+ |
public static final AttributeAccessorSCDtoManyRegular<ToDoStory, ToDoTask> CD_Tasks = new AttributeAccessor_Tasks(); |
287 |
242 |
|
|
288 |
|
- |
protected org.litesoft.orsup.lazyload.LazyLoadToManyRegular<ToDoStory,ToDoTask> mTasks = // |
289 |
|
- |
new org.litesoft.orsup.lazyload.LazyLoadToManyRegular<ToDoStory,ToDoTask>( (ToDoStory) this, CD_Tasks ); |
|
243 |
+ |
protected org.litesoft.orsup.lazyload.LazyLoadToManyRegular<ToDoStory, ToDoTask> mTasks = // |
|
244 |
+ |
new org.litesoft.orsup.lazyload.LazyLoadToManyRegular<ToDoStory, ToDoTask>( (ToDoStory) this, CD_Tasks ); |
290 |
245 |
|
|
291 |
|
- |
public java.util.List<ToDoTask> getTasks() |
292 |
|
- |
{ |
|
246 |
+ |
public java.util.List<ToDoTask> getTasks() { |
293 |
247 |
|
return processLazyLoadAccess( mTasks ); |
294 |
248 |
|
} |
295 |
249 |
|
|
296 |
|
- |
public void setTasks( java.util.List<ToDoTask> pTasks ) |
297 |
|
- |
{ |
|
250 |
+ |
public void setTasks( java.util.List<ToDoTask> pTasks ) { |
298 |
251 |
|
processLazyLoadMutation( mTasks, pTasks ); |
299 |
252 |
|
} |
300 |
253 |
|
|
301 |
|
- |
public void addTasks( ToDoTask pTasks ) |
302 |
|
- |
{ |
|
254 |
+ |
public void addTasks( ToDoTask pTasks ) { |
303 |
255 |
|
processLazyLoadMutationAdd( mTasks, pTasks ); |
304 |
256 |
|
} |
305 |
257 |
|
|
306 |
|
- |
public void removeTasks( ToDoTask pTasks ) |
307 |
|
- |
{ |
|
258 |
+ |
public void removeTasks( ToDoTask pTasks ) { |
308 |
259 |
|
processLazyLoadMutationRemove( mTasks, pTasks ); |
309 |
260 |
|
} |
310 |
261 |
|
|
311 |
262 |
|
private static class AttributeAccessor_Tasks |
312 |
|
- |
extends AttributeAccessorSCDtoManyRegular<ToDoStory,ToDoTask> |
313 |
|
- |
{ |
314 |
|
- |
public AttributeAccessor_Tasks() |
315 |
|
- |
{ |
|
263 |
+ |
extends AttributeAccessorSCDtoManyRegular<ToDoStory, ToDoTask> { |
|
264 |
+ |
public AttributeAccessor_Tasks() { |
316 |
265 |
|
super( "Tasks", "ID", ToDoTask.class, "Story", null, Mutability.RW, false, true ); |
317 |
266 |
|
} |
318 |
267 |
|
|
319 |
268 |
|
@Override |
320 |
|
- |
public org.litesoft.orsup.lazyload.LazyLoadToManyRegular<ToDoStory,ToDoTask> getValueHolder( ToDoStory pPO ) |
321 |
|
- |
{ |
|
269 |
+ |
public org.litesoft.orsup.lazyload.LazyLoadToManyRegular<ToDoStory, ToDoTask> getValueHolder( ToDoStory pPO ) { |
322 |
270 |
|
return pPO.mTasks; |
323 |
271 |
|
} |
324 |
272 |
|
|
325 |
273 |
|
@Override |
326 |
|
- |
public Object getValueOnPO( ToDoStory pPO ) |
327 |
|
- |
{ |
|
274 |
+ |
public Object getValueOnPO( ToDoStory pPO ) { |
328 |
275 |
|
return pPO.getTasks(); |
329 |
276 |
|
} |
330 |
277 |
|
|
331 |
278 |
|
@Override |
332 |
|
- |
public void setValueOnPO( ToDoStory pPO, Object pValue ) |
333 |
|
- |
{ |
|
279 |
+ |
public void setValueOnPO( ToDoStory pPO, Object pValue ) { |
334 |
280 |
|
pPO.setTasks( to_POs( pPO, ToDoTask.class, pValue ) ); |
335 |
281 |
|
} |
336 |
282 |
|
|
337 |
283 |
|
@Override |
338 |
|
- |
public void addValueOnPO( ToDoStory pPO, Object pValue ) |
339 |
|
- |
{ |
|
284 |
+ |
public void addValueOnPO( ToDoStory pPO, Object pValue ) { |
340 |
285 |
|
pPO.addTasks( to_PO( pPO, ToDoTask.class, pValue ) ); |
341 |
286 |
|
} |
342 |
287 |
|
|
343 |
288 |
|
@Override |
344 |
|
- |
public void removeValueOnPO( ToDoStory pPO, Object pValue ) |
345 |
|
- |
{ |
|
289 |
+ |
public void removeValueOnPO( ToDoStory pPO, Object pValue ) { |
346 |
290 |
|
pPO.removeTasks( to_PO( pPO, ToDoTask.class, pValue ) ); |
347 |
291 |
|
} |
348 |
292 |
|
} |
349 |
293 |
|
|
350 |
294 |
|
static class MyMetaData |
351 |
|
- |
extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<ToDoStory> |
352 |
|
- |
{ |
|
295 |
+ |
extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<ToDoStory> { |
353 |
296 |
|
public static final String OBJECT_NAME = "ToDoStory"; |
354 |
297 |
|
public static final String TABLE_NAME = "ToDoStory"; |
355 |
298 |
|
|
356 |
|
- |
MyMetaData() |
357 |
|
- |
{ |
|
299 |
+ |
MyMetaData() { |
358 |
300 |
|
super( OBJECT_NAME, TABLE_NAME, new AttributeAccessorKeySet( CD_ID ), // |
359 |
301 |
|
|
360 |
302 |
|
CD_RecordVersion, /* .. */ |
|
@@ -374,32 +316,27 @@ |
374 |
316 |
|
} |
375 |
317 |
|
|
376 |
318 |
|
@Override |
377 |
|
- |
public Class getPOclass() |
378 |
|
- |
{ |
|
319 |
+ |
public Class getPOclass() { |
379 |
320 |
|
return ToDoStory.class; |
380 |
321 |
|
} |
381 |
322 |
|
|
382 |
323 |
|
@Override |
383 |
|
- |
public ToDoStory createNew( Transaction pTransaction ) |
384 |
|
- |
{ |
|
324 |
+ |
public ToDoStory createNew( Transaction pTransaction ) { |
385 |
325 |
|
return new ToDoStory( pTransaction ); |
386 |
326 |
|
} |
387 |
327 |
|
|
388 |
328 |
|
@Override |
389 |
|
- |
public ToDoStory createPOfromFinder() |
390 |
|
- |
{ |
|
329 |
+ |
public ToDoStory createPOfromFinder() { |
391 |
330 |
|
return new ToDoStory( CONSTRUCTION_CONTROL ); |
392 |
331 |
|
} |
393 |
332 |
|
|
394 |
333 |
|
@Override |
395 |
|
- |
public String getDisplayValueFormat() |
396 |
|
- |
{ |
|
334 |
+ |
public String getDisplayValueFormat() { |
397 |
335 |
|
return "${Title}"; |
398 |
336 |
|
} |
399 |
337 |
|
|
400 |
338 |
|
@Override |
401 |
|
- |
public String getRecordVersionAttributeName() |
402 |
|
- |
{ |
|
339 |
+ |
public String getRecordVersionAttributeName() { |
403 |
340 |
|
return CD_RecordVersion.getName(); |
404 |
341 |
|
} |
405 |
342 |
|
} |