Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/GWT_Sandbox/InitFrom/src/org/litesoft/initfrom/server/pos/StoryGO.java

Diff revisions: vs.
  @@ -9,25 +9,21 @@
9 9
10 10 public abstract class StoryGO
11 11 extends org.litesoft.orsup.nonpublic.PersistentObjectImpl<Story>
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 StoryMetaData.INSTANCE;
19 17 }
20 18
21 - protected StoryGO( Transaction pTransaction )
22 - {
19 + protected StoryGO( Transaction pTransaction ) {
23 20 super( StoryMetaData.INSTANCE, pTransaction );
24 21 mID = getNextSequenceNumber( getClass() );
25 22 registerWithTransaction();
26 23 setDefaults();
27 24 }
28 25
29 - protected StoryGO( ConstructionControl pConstructionControl )
30 - {
26 + protected StoryGO( ConstructionControl pConstructionControl ) {
31 27 super( StoryMetaData.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<Story>
45 - {
46 - public AttributeAccessor_RecordVersion()
47 - {
39 + extends AttributeAccessorSCD_RecordVersion<Story> {
40 + public AttributeAccessor_RecordVersion() {
48 41 super( "RecordVersion", "RecordVersion" );
49 42 }
50 43
51 44 @Override
52 - protected RecordVersionHelper getRecordVersionHelper( Story pPO )
53 - {
45 + protected RecordVersionHelper getRecordVersionHelper( Story pPO ) {
54 46 return pPO.mRecordVersion;
55 47 }
56 48 }
  @@ -59,89 +51,74 @@
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<Story>
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( Story pPO )
84 - {
71 + public Object getValueOnPO( Story pPO ) {
85 72 return pPO.getID();
86 73 }
87 74
88 75 @Override
89 - public void db_setValueOnPO( Story pPO, Object pValue )
90 - {
76 + public void db_setValueOnPO( Story pPO, Object pValue ) {
91 77 pPO.LLsetID( to_Long( pValue ) );
92 78 }
93 79 }
94 80
95 - public static final AttributeAccessorSCDtoOneRegular<Story,User> CD_Creator = new AttributeAccessor_Creator();
81 + public static final AttributeAccessorSCDtoOneRegular<Story, User> CD_Creator = new AttributeAccessor_Creator();
96 82
97 - protected org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story,User> mCreator = //
98 - new org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story,User>( (Story) this, CD_Creator );
83 + protected org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story, User> mCreator = //
84 + new org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story, User>( (Story) this, CD_Creator );
99 85
100 - public User getCreator()
101 - {
86 + public User getCreator() {
102 87 return processLazyLoadAccess( mCreator );
103 88 }
104 89
105 - public void setCreator( User pCreator )
106 - {
90 + public void setCreator( User pCreator ) {
107 91 processLazyLoadMutation( mCreator, pCreator );
108 92 }
109 93
110 94 private static class AttributeAccessor_Creator
111 - extends AttributeAccessorSCDtoOneRegular<Story,User>
112 - {
113 - public AttributeAccessor_Creator()
114 - {
95 + extends AttributeAccessorSCDtoOneRegular<Story, User> {
96 + public AttributeAccessor_Creator() {
115 97 super( "Creator", "Creator_id", User.class, "ID", "Stories", false, true, Mutability.RW );
116 98 }
117 99
118 100 @Override
119 - public org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story,User> getValueHolder( Story pPO )
120 - {
101 + public org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story, User> getValueHolder( Story pPO ) {
121 102 return pPO.mCreator;
122 103 }
123 104
124 105 @Override
125 - public Object getValueOnPO( Story pPO )
126 - {
106 + public Object getValueOnPO( Story pPO ) {
127 107 return pPO.getCreator();
128 108 }
129 109
130 110 @Override
131 - public void setValueOnPO( Story pPO, Object pValue )
132 - {
111 + public void setValueOnPO( Story pPO, Object pValue ) {
133 112 pPO.setCreator( to_PO( pPO, User.class, pValue ) );
134 113 }
135 114
136 115 @Override
137 - public Object db_getValueOnPO( Story pPO )
138 - {
116 + public Object db_getValueOnPO( Story pPO ) {
139 117 return pPO.mCreator.db_getValue();
140 118 }
141 119
142 120 @Override
143 - public void db_setValueOnPO( Story pPO, Object pValue )
144 - {
121 + public void db_setValueOnPO( Story pPO, Object pValue ) {
145 122 pPO.mCreator.db_setValue( to_Long( pValue ) );
146 123 }
147 124 }
  @@ -150,35 +127,29 @@
150 127
151 128 private String mDescription;
152 129
153 - public String getDescription()
154 - {
130 + public String getDescription() {
155 131 return mDescription;
156 132 }
157 133
158 - public void setDescription( String pDescription )
159 - {
134 + public void setDescription( String pDescription ) {
160 135 verifyMutability( CD_Description, mDescription, pDescription );
161 136 mDescription = pDescription;
162 137 }
163 138
164 139 private static class AttributeAccessor_Description
165 - extends AttributeAccessorSCDsimplePersistedRegular<Story>
166 - {
167 - public AttributeAccessor_Description()
168 - {
140 + extends AttributeAccessorSCDsimplePersistedRegular<Story> {
141 + public AttributeAccessor_Description() {
169 142 super( "Description", "Description", false, _Text.with( DisplayWidthInitial.of( 40 ), //
170 143 DisplayHeightInitial.of( 4 ) ) );
171 144 }
172 145
173 146 @Override
174 - public Object getValueOnPO( Story pPO )
175 - {
147 + public Object getValueOnPO( Story pPO ) {
176 148 return pPO.getDescription();
177 149 }
178 150
179 151 @Override
180 - public void setValueOnPO( Story pPO, Object pValue )
181 - {
152 + public void setValueOnPO( Story pPO, Object pValue ) {
182 153 pPO.setDescription( to_String( pValue ) );
183 154 }
184 155 }
  @@ -187,34 +158,28 @@
187 158
188 159 private Boolean mIsDone;
189 160
190 - public Boolean getIsDone()
191 - {
161 + public Boolean getIsDone() {
192 162 return mIsDone;
193 163 }
194 164
195 - public void setIsDone( Boolean pIsDone )
196 - {
165 + public void setIsDone( Boolean pIsDone ) {
197 166 verifyMutability( CD_IsDone, mIsDone, pIsDone );
198 167 mIsDone = pIsDone;
199 168 }
200 169
201 170 private static class AttributeAccessor_IsDone
202 - extends AttributeAccessorSCDsimplePersistedRegular<Story>
203 - {
204 - public AttributeAccessor_IsDone()
205 - {
171 + extends AttributeAccessorSCDsimplePersistedRegular<Story> {
172 + public AttributeAccessor_IsDone() {
206 173 super( "IsDone", "IsDone", false, _Boolean );
207 174 }
208 175
209 176 @Override
210 - public Object getValueOnPO( Story pPO )
211 - {
177 + public Object getValueOnPO( Story pPO ) {
212 178 return pPO.getIsDone();
213 179 }
214 180
215 181 @Override
216 - public void setValueOnPO( Story pPO, Object pValue )
217 - {
182 + public void setValueOnPO( Story pPO, Object pValue ) {
218 183 pPO.setIsDone( to_Boolean( pValue ) );
219 184 }
220 185 }
  @@ -223,35 +188,29 @@
223 188
224 189 private String mName;
225 190
226 - public String getName()
227 - {
191 + public String getName() {
228 192 return mName;
229 193 }
230 194
231 - public void setName( String pName )
232 - {
195 + public void setName( String pName ) {
233 196 verifyMutability( CD_Name, mName, pName );
234 197 mName = pName;
235 198 }
236 199
237 200 private static class AttributeAccessor_Name
238 - extends AttributeAccessorSCDsimplePersistedRegular<Story>
239 - {
240 - public AttributeAccessor_Name()
241 - {
201 + extends AttributeAccessorSCDsimplePersistedRegular<Story> {
202 + public AttributeAccessor_Name() {
242 203 super( "Name", "Name", true, _String.with( MaxLength.of( 40 ), //
243 204 DisplayLength.of( 20 ) ) );
244 205 }
245 206
246 207 @Override
247 - public Object getValueOnPO( Story pPO )
248 - {
208 + public Object getValueOnPO( Story pPO ) {
249 209 return pPO.getName();
250 210 }
251 211
252 212 @Override
253 - public void setValueOnPO( Story pPO, Object pValue )
254 - {
213 + public void setValueOnPO( Story pPO, Object pValue ) {
255 214 pPO.setName( to_String( pValue ) );
256 215 }
257 216 }
  @@ -263,218 +222,181 @@
263 222 /**
264 223 * Allow insertion of priorities in between
265 224 */
266 - public Float getPriority()
267 - {
225 + public Float getPriority() {
268 226 return mPriority;
269 227 }
270 228
271 - public void setPriority( Float pPriority )
272 - {
229 + public void setPriority( Float pPriority ) {
273 230 verifyMutability( CD_Priority, mPriority, pPriority );
274 231 mPriority = pPriority;
275 232 }
276 233
277 234 private static class AttributeAccessor_Priority
278 - extends AttributeAccessorSCDsimplePersistedRegular<Story>
279 - {
280 - public AttributeAccessor_Priority()
281 - {
235 + extends AttributeAccessorSCDsimplePersistedRegular<Story> {
236 + public AttributeAccessor_Priority() {
282 237 super( "Priority", "Priority", false, _Float.with( DisplayLength.of( 9 ) ) );
283 238 }
284 239
285 240 @Override
286 - public Object getValueOnPO( Story pPO )
287 - {
241 + public Object getValueOnPO( Story pPO ) {
288 242 return pPO.getPriority();
289 243 }
290 244
291 245 @Override
292 - public void setValueOnPO( Story pPO, Object pValue )
293 - {
246 + public void setValueOnPO( Story pPO, Object pValue ) {
294 247 pPO.setPriority( to_Float( pValue ) );
295 248 }
296 249 }
297 250
298 - public static final AttributeAccessorSCDtoOneRegular<Story,RestrictedResource> CD_RestrictedResource = new AttributeAccessor_RestrictedResource();
251 + public static final AttributeAccessorSCDtoOneRegular<Story, RestrictedResource> CD_RestrictedResource = new AttributeAccessor_RestrictedResource();
299 252
300 - protected org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story,RestrictedResource> mRestrictedResource = //
301 - new org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story,RestrictedResource>( (Story) this, CD_RestrictedResource );
253 + protected org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story, RestrictedResource> mRestrictedResource = //
254 + new org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story, RestrictedResource>( (Story) this, CD_RestrictedResource );
302 255
303 - public RestrictedResource getRestrictedResource()
304 - {
256 + public RestrictedResource getRestrictedResource() {
305 257 return processLazyLoadAccess( mRestrictedResource );
306 258 }
307 259
308 - public void setRestrictedResource( RestrictedResource pRestrictedResource )
309 - {
260 + public void setRestrictedResource( RestrictedResource pRestrictedResource ) {
310 261 processLazyLoadMutation( mRestrictedResource, pRestrictedResource );
311 262 }
312 263
313 264 private static class AttributeAccessor_RestrictedResource
314 - extends AttributeAccessorSCDtoOneRegular<Story,RestrictedResource>
315 - {
316 - public AttributeAccessor_RestrictedResource()
317 - {
265 + extends AttributeAccessorSCDtoOneRegular<Story, RestrictedResource> {
266 + public AttributeAccessor_RestrictedResource() {
318 267 super( "RestrictedResource", "RestrictedResource_id", RestrictedResource.class, "ID", "Stories", false, false, Mutability.RW );
319 268 }
320 269
321 270 @Override
322 - public org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story,RestrictedResource> getValueHolder( Story pPO )
323 - {
271 + public org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story, RestrictedResource> getValueHolder( Story pPO ) {
324 272 return pPO.mRestrictedResource;
325 273 }
326 274
327 275 @Override
328 - public Object getValueOnPO( Story pPO )
329 - {
276 + public Object getValueOnPO( Story pPO ) {
330 277 return pPO.getRestrictedResource();
331 278 }
332 279
333 280 @Override
334 - public void setValueOnPO( Story pPO, Object pValue )
335 - {
281 + public void setValueOnPO( Story pPO, Object pValue ) {
336 282 pPO.setRestrictedResource( to_PO( pPO, RestrictedResource.class, pValue ) );
337 283 }
338 284
339 285 @Override
340 - public Object db_getValueOnPO( Story pPO )
341 - {
286 + public Object db_getValueOnPO( Story pPO ) {
342 287 return pPO.mRestrictedResource.db_getValue();
343 288 }
344 289
345 290 @Override
346 - public void db_setValueOnPO( Story pPO, Object pValue )
347 - {
291 + public void db_setValueOnPO( Story pPO, Object pValue ) {
348 292 pPO.mRestrictedResource.db_setValue( to_Long( pValue ) );
349 293 }
350 294 }
351 295
352 - public static final AttributeAccessorSCDtoOneRegular<Story,StoryTemplate> CD_StoryTemplate = new AttributeAccessor_StoryTemplate();
296 + public static final AttributeAccessorSCDtoOneRegular<Story, StoryTemplate> CD_StoryTemplate = new AttributeAccessor_StoryTemplate();
353 297
354 - protected org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story,StoryTemplate> mStoryTemplate = //
355 - new org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story,StoryTemplate>( (Story) this, CD_StoryTemplate );
298 + protected org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story, StoryTemplate> mStoryTemplate = //
299 + new org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story, StoryTemplate>( (Story) this, CD_StoryTemplate );
356 300
357 - public StoryTemplate getStoryTemplate()
358 - {
301 + public StoryTemplate getStoryTemplate() {
359 302 return processLazyLoadAccess( mStoryTemplate );
360 303 }
361 304
362 - public void setStoryTemplate( StoryTemplate pStoryTemplate )
363 - {
305 + public void setStoryTemplate( StoryTemplate pStoryTemplate ) {
364 306 processLazyLoadMutation( mStoryTemplate, pStoryTemplate );
365 307 }
366 308
367 309 private static class AttributeAccessor_StoryTemplate
368 - extends AttributeAccessorSCDtoOneRegular<Story,StoryTemplate>
369 - {
370 - public AttributeAccessor_StoryTemplate()
371 - {
310 + extends AttributeAccessorSCDtoOneRegular<Story, StoryTemplate> {
311 + public AttributeAccessor_StoryTemplate() {
372 312 super( "StoryTemplate", "StoryTemplate_id", StoryTemplate.class, "ID", "Stories", false, false, Mutability.RW );
373 313 }
374 314
375 315 @Override
376 - public org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story,StoryTemplate> getValueHolder( Story pPO )
377 - {
316 + public org.litesoft.orsup.lazyload.LazyLoadToOneRegular<Story, StoryTemplate> getValueHolder( Story pPO ) {
378 317 return pPO.mStoryTemplate;
379 318 }
380 319
381 320 @Override
382 - public Object getValueOnPO( Story pPO )
383 - {
321 + public Object getValueOnPO( Story pPO ) {
384 322 return pPO.getStoryTemplate();
385 323 }
386 324
387 325 @Override
388 - public void setValueOnPO( Story pPO, Object pValue )
389 - {
326 + public void setValueOnPO( Story pPO, Object pValue ) {
390 327 pPO.setStoryTemplate( to_PO( pPO, StoryTemplate.class, pValue ) );
391 328 }
392 329
393 330 @Override
394 - public Object db_getValueOnPO( Story pPO )
395 - {
331 + public Object db_getValueOnPO( Story pPO ) {
396 332 return pPO.mStoryTemplate.db_getValue();
397 333 }
398 334
399 335 @Override
400 - public void db_setValueOnPO( Story pPO, Object pValue )
401 - {
336 + public void db_setValueOnPO( Story pPO, Object pValue ) {
402 337 pPO.mStoryTemplate.db_setValue( to_Long( pValue ) );
403 338 }
404 339 }
405 340
406 - public static final AttributeAccessorSCDtoManyRegular<Story,Task> CD_Tasks = new AttributeAccessor_Tasks();
341 + public static final AttributeAccessorSCDtoManyRegular<Story, Task> CD_Tasks = new AttributeAccessor_Tasks();
407 342
408 - protected org.litesoft.orsup.lazyload.LazyLoadToManyRegular<Story,Task> mTasks = //
409 - new org.litesoft.orsup.lazyload.LazyLoadToManyRegular<Story,Task>( (Story) this, CD_Tasks );
343 + protected org.litesoft.orsup.lazyload.LazyLoadToManyRegular<Story, Task> mTasks = //
344 + new org.litesoft.orsup.lazyload.LazyLoadToManyRegular<Story, Task>( (Story) this, CD_Tasks );
410 345
411 - public java.util.List<Task> getTasks()
412 - {
346 + public java.util.List<Task> getTasks() {
413 347 return processLazyLoadAccess( mTasks );
414 348 }
415 349
416 - public void setTasks( java.util.List<Task> pTasks )
417 - {
350 + public void setTasks( java.util.List<Task> pTasks ) {
418 351 processLazyLoadMutation( mTasks, pTasks );
419 352 }
420 353
421 - public void addTasks( Task pTasks )
422 - {
354 + public void addTasks( Task pTasks ) {
423 355 processLazyLoadMutationAdd( mTasks, pTasks );
424 356 }
425 357
426 - public void removeTasks( Task pTasks )
427 - {
358 + public void removeTasks( Task pTasks ) {
428 359 processLazyLoadMutationRemove( mTasks, pTasks );
429 360 }
430 361
431 362 private static class AttributeAccessor_Tasks
432 - extends AttributeAccessorSCDtoManyRegular<Story,Task>
433 - {
434 - public AttributeAccessor_Tasks()
435 - {
363 + extends AttributeAccessorSCDtoManyRegular<Story, Task> {
364 + public AttributeAccessor_Tasks() {
436 365 super( "Tasks", "ID", Task.class, "Story", null, Mutability.RW, false, true );
437 366 }
438 367
439 368 @Override
440 - public org.litesoft.orsup.lazyload.LazyLoadToManyRegular<Story,Task> getValueHolder( Story pPO )
441 - {
369 + public org.litesoft.orsup.lazyload.LazyLoadToManyRegular<Story, Task> getValueHolder( Story pPO ) {
442 370 return pPO.mTasks;
443 371 }
444 372
445 373 @Override
446 - public Object getValueOnPO( Story pPO )
447 - {
374 + public Object getValueOnPO( Story pPO ) {
448 375 return pPO.getTasks();
449 376 }
450 377
451 378 @Override
452 - public void setValueOnPO( Story pPO, Object pValue )
453 - {
379 + public void setValueOnPO( Story pPO, Object pValue ) {
454 380 pPO.setTasks( to_POs( pPO, Task.class, pValue ) );
455 381 }
456 382
457 383 @Override
458 - public void addValueOnPO( Story pPO, Object pValue )
459 - {
384 + public void addValueOnPO( Story pPO, Object pValue ) {
460 385 pPO.addTasks( to_PO( pPO, Task.class, pValue ) );
461 386 }
462 387
463 388 @Override
464 - public void removeValueOnPO( Story pPO, Object pValue )
465 - {
389 + public void removeValueOnPO( Story pPO, Object pValue ) {
466 390 pPO.removeTasks( to_PO( pPO, Task.class, pValue ) );
467 391 }
468 392 }
469 393
470 394 static class MyMetaData
471 - extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<Story>
472 - {
395 + extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<Story> {
473 396 public static final String OBJECT_NAME = "Story";
474 397 public static final String TABLE_NAME = "Story";
475 398
476 - MyMetaData()
477 - {
399 + MyMetaData() {
478 400 super( OBJECT_NAME, TABLE_NAME, new AttributeAccessorKeySet( CD_ID ), //
479 401
480 402 CD_RecordVersion, /* ....... */
  @@ -501,32 +423,27 @@
501 423 }
502 424
503 425 @Override
504 - public Class getPOclass()
505 - {
426 + public Class getPOclass() {
506 427 return Story.class;
507 428 }
508 429
509 430 @Override
510 - public Story createNew( Transaction pTransaction )
511 - {
431 + public Story createNew( Transaction pTransaction ) {
512 432 return new Story( pTransaction );
513 433 }
514 434
515 435 @Override
516 - public Story createPOfromFinder()
517 - {
436 + public Story createPOfromFinder() {
518 437 return new Story( CONSTRUCTION_CONTROL );
519 438 }
520 439
521 440 @Override
522 - public String getDisplayValueFormat()
523 - {
441 + public String getDisplayValueFormat() {
524 442 return null;
525 443 }
526 444
527 445 @Override
528 - public String getRecordVersionAttributeName()
529 - {
446 + public String getRecordVersionAttributeName() {
530 447 return CD_RecordVersion.getName();
531 448 }
532 449 }