|
@@ -9,25 +9,21 @@ |
9 |
9 |
|
|
10 |
10 |
|
public abstract class StoryTemplateGO |
11 |
11 |
|
extends org.litesoft.orsup.nonpublic.PersistentObjectImpl<StoryTemplate> |
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 StoryTemplateMetaData.INSTANCE; |
19 |
17 |
|
} |
20 |
18 |
|
|
21 |
|
- |
protected StoryTemplateGO( Transaction pTransaction ) |
22 |
|
- |
{ |
|
19 |
+ |
protected StoryTemplateGO( Transaction pTransaction ) { |
23 |
20 |
|
super( StoryTemplateMetaData.INSTANCE, pTransaction ); |
24 |
21 |
|
mID = getNextSequenceNumber( getClass() ); |
25 |
22 |
|
registerWithTransaction(); |
26 |
23 |
|
setDefaults(); |
27 |
24 |
|
} |
28 |
25 |
|
|
29 |
|
- |
protected StoryTemplateGO( ConstructionControl pConstructionControl ) |
30 |
|
- |
{ |
|
26 |
+ |
protected StoryTemplateGO( ConstructionControl pConstructionControl ) { |
31 |
27 |
|
super( StoryTemplateMetaData.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<StoryTemplate> |
45 |
|
- |
{ |
46 |
|
- |
public AttributeAccessor_RecordVersion() |
47 |
|
- |
{ |
|
39 |
+ |
extends AttributeAccessorSCD_RecordVersion<StoryTemplate> { |
|
40 |
+ |
public AttributeAccessor_RecordVersion() { |
48 |
41 |
|
super( "RecordVersion", "RecordVersion" ); |
49 |
42 |
|
} |
50 |
43 |
|
|
51 |
44 |
|
@Override |
52 |
|
- |
protected RecordVersionHelper getRecordVersionHelper( StoryTemplate pPO ) |
53 |
|
- |
{ |
|
45 |
+ |
protected RecordVersionHelper getRecordVersionHelper( StoryTemplate 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<StoryTemplate> |
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( StoryTemplate pPO ) |
84 |
|
- |
{ |
|
71 |
+ |
public Object getValueOnPO( StoryTemplate pPO ) { |
85 |
72 |
|
return pPO.getID(); |
86 |
73 |
|
} |
87 |
74 |
|
|
88 |
75 |
|
@Override |
89 |
|
- |
public void db_setValueOnPO( StoryTemplate pPO, Object pValue ) |
90 |
|
- |
{ |
|
76 |
+ |
public void db_setValueOnPO( StoryTemplate pPO, Object pValue ) { |
91 |
77 |
|
pPO.LLsetID( to_Long( pValue ) ); |
92 |
78 |
|
} |
93 |
79 |
|
} |
|
@@ -96,35 +82,29 @@ |
96 |
82 |
|
|
97 |
83 |
|
private String mDescripiton; |
98 |
84 |
|
|
99 |
|
- |
public String getDescripiton() |
100 |
|
- |
{ |
|
85 |
+ |
public String getDescripiton() { |
101 |
86 |
|
return mDescripiton; |
102 |
87 |
|
} |
103 |
88 |
|
|
104 |
|
- |
public void setDescripiton( String pDescripiton ) |
105 |
|
- |
{ |
|
89 |
+ |
public void setDescripiton( String pDescripiton ) { |
106 |
90 |
|
verifyMutability( CD_Descripiton, mDescripiton, pDescripiton ); |
107 |
91 |
|
mDescripiton = pDescripiton; |
108 |
92 |
|
} |
109 |
93 |
|
|
110 |
94 |
|
private static class AttributeAccessor_Descripiton |
111 |
|
- |
extends AttributeAccessorSCDsimplePersistedRegular<StoryTemplate> |
112 |
|
- |
{ |
113 |
|
- |
public AttributeAccessor_Descripiton() |
114 |
|
- |
{ |
|
95 |
+ |
extends AttributeAccessorSCDsimplePersistedRegular<StoryTemplate> { |
|
96 |
+ |
public AttributeAccessor_Descripiton() { |
115 |
97 |
|
super( "Descripiton", "Descripiton", false, _Text.with( DisplayWidthInitial.of( 40 ), // |
116 |
98 |
|
DisplayHeightInitial.of( 4 ) ) ); |
117 |
99 |
|
} |
118 |
100 |
|
|
119 |
101 |
|
@Override |
120 |
|
- |
public Object getValueOnPO( StoryTemplate pPO ) |
121 |
|
- |
{ |
|
102 |
+ |
public Object getValueOnPO( StoryTemplate pPO ) { |
122 |
103 |
|
return pPO.getDescripiton(); |
123 |
104 |
|
} |
124 |
105 |
|
|
125 |
106 |
|
@Override |
126 |
|
- |
public void setValueOnPO( StoryTemplate pPO, Object pValue ) |
127 |
|
- |
{ |
|
107 |
+ |
public void setValueOnPO( StoryTemplate pPO, Object pValue ) { |
128 |
108 |
|
pPO.setDescripiton( to_String( pValue ) ); |
129 |
109 |
|
} |
130 |
110 |
|
} |
|
@@ -136,175 +116,145 @@ |
136 |
116 |
|
/** |
137 |
117 |
|
* UniqueGroup:1 |
138 |
118 |
|
*/ |
139 |
|
- |
public String getName() |
140 |
|
- |
{ |
|
119 |
+ |
public String getName() { |
141 |
120 |
|
return mName; |
142 |
121 |
|
} |
143 |
122 |
|
|
144 |
|
- |
public void setName( String pName ) |
145 |
|
- |
{ |
|
123 |
+ |
public void setName( String pName ) { |
146 |
124 |
|
verifyMutability( CD_Name, mName, pName ); |
147 |
125 |
|
mName = pName; |
148 |
126 |
|
} |
149 |
127 |
|
|
150 |
128 |
|
private static class AttributeAccessor_Name |
151 |
|
- |
extends AttributeAccessorSCDsimplePersistedRegular<StoryTemplate> |
152 |
|
- |
{ |
153 |
|
- |
public AttributeAccessor_Name() |
154 |
|
- |
{ |
|
129 |
+ |
extends AttributeAccessorSCDsimplePersistedRegular<StoryTemplate> { |
|
130 |
+ |
public AttributeAccessor_Name() { |
155 |
131 |
|
super( "Name", "Name", false, _String.with( MaxLength.of( 40 ), // |
156 |
132 |
|
DisplayLength.of( 20 ) ) ); |
157 |
133 |
|
} |
158 |
134 |
|
|
159 |
135 |
|
@Override |
160 |
|
- |
public Object getValueOnPO( StoryTemplate pPO ) |
161 |
|
- |
{ |
|
136 |
+ |
public Object getValueOnPO( StoryTemplate pPO ) { |
162 |
137 |
|
return pPO.getName(); |
163 |
138 |
|
} |
164 |
139 |
|
|
165 |
140 |
|
@Override |
166 |
|
- |
public void setValueOnPO( StoryTemplate pPO, Object pValue ) |
167 |
|
- |
{ |
|
141 |
+ |
public void setValueOnPO( StoryTemplate pPO, Object pValue ) { |
168 |
142 |
|
pPO.setName( to_String( pValue ) ); |
169 |
143 |
|
} |
170 |
144 |
|
} |
171 |
145 |
|
|
172 |
|
- |
public static final AttributeAccessorSCDtoManyRegular<StoryTemplate,Story> CD_Stories = new AttributeAccessor_Stories(); |
|
146 |
+ |
public static final AttributeAccessorSCDtoManyRegular<StoryTemplate, Story> CD_Stories = new AttributeAccessor_Stories(); |
173 |
147 |
|
|
174 |
|
- |
protected org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate,Story> mStories = // |
175 |
|
- |
new org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate,Story>( (StoryTemplate) this, CD_Stories ); |
|
148 |
+ |
protected org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate, Story> mStories = // |
|
149 |
+ |
new org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate, Story>( (StoryTemplate) this, CD_Stories ); |
176 |
150 |
|
|
177 |
|
- |
public java.util.List<Story> getStories() |
178 |
|
- |
{ |
|
151 |
+ |
public java.util.List<Story> getStories() { |
179 |
152 |
|
return processLazyLoadAccess( mStories ); |
180 |
153 |
|
} |
181 |
154 |
|
|
182 |
|
- |
public void setStories( java.util.List<Story> pStories ) |
183 |
|
- |
{ |
|
155 |
+ |
public void setStories( java.util.List<Story> pStories ) { |
184 |
156 |
|
processLazyLoadMutation( mStories, pStories ); |
185 |
157 |
|
} |
186 |
158 |
|
|
187 |
|
- |
public void addStories( Story pStories ) |
188 |
|
- |
{ |
|
159 |
+ |
public void addStories( Story pStories ) { |
189 |
160 |
|
processLazyLoadMutationAdd( mStories, pStories ); |
190 |
161 |
|
} |
191 |
162 |
|
|
192 |
|
- |
public void removeStories( Story pStories ) |
193 |
|
- |
{ |
|
163 |
+ |
public void removeStories( Story pStories ) { |
194 |
164 |
|
processLazyLoadMutationRemove( mStories, pStories ); |
195 |
165 |
|
} |
196 |
166 |
|
|
197 |
167 |
|
private static class AttributeAccessor_Stories |
198 |
|
- |
extends AttributeAccessorSCDtoManyRegular<StoryTemplate,Story> |
199 |
|
- |
{ |
200 |
|
- |
public AttributeAccessor_Stories() |
201 |
|
- |
{ |
|
168 |
+ |
extends AttributeAccessorSCDtoManyRegular<StoryTemplate, Story> { |
|
169 |
+ |
public AttributeAccessor_Stories() { |
202 |
170 |
|
super( "Stories", "ID", Story.class, "StoryTemplate", null, Mutability.RW, false, false ); |
203 |
171 |
|
} |
204 |
172 |
|
|
205 |
173 |
|
@Override |
206 |
|
- |
public org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate,Story> getValueHolder( StoryTemplate pPO ) |
207 |
|
- |
{ |
|
174 |
+ |
public org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate, Story> getValueHolder( StoryTemplate pPO ) { |
208 |
175 |
|
return pPO.mStories; |
209 |
176 |
|
} |
210 |
177 |
|
|
211 |
178 |
|
@Override |
212 |
|
- |
public Object getValueOnPO( StoryTemplate pPO ) |
213 |
|
- |
{ |
|
179 |
+ |
public Object getValueOnPO( StoryTemplate pPO ) { |
214 |
180 |
|
return pPO.getStories(); |
215 |
181 |
|
} |
216 |
182 |
|
|
217 |
183 |
|
@Override |
218 |
|
- |
public void setValueOnPO( StoryTemplate pPO, Object pValue ) |
219 |
|
- |
{ |
|
184 |
+ |
public void setValueOnPO( StoryTemplate pPO, Object pValue ) { |
220 |
185 |
|
pPO.setStories( to_POs( pPO, Story.class, pValue ) ); |
221 |
186 |
|
} |
222 |
187 |
|
|
223 |
188 |
|
@Override |
224 |
|
- |
public void addValueOnPO( StoryTemplate pPO, Object pValue ) |
225 |
|
- |
{ |
|
189 |
+ |
public void addValueOnPO( StoryTemplate pPO, Object pValue ) { |
226 |
190 |
|
pPO.addStories( to_PO( pPO, Story.class, pValue ) ); |
227 |
191 |
|
} |
228 |
192 |
|
|
229 |
193 |
|
@Override |
230 |
|
- |
public void removeValueOnPO( StoryTemplate pPO, Object pValue ) |
231 |
|
- |
{ |
|
194 |
+ |
public void removeValueOnPO( StoryTemplate pPO, Object pValue ) { |
232 |
195 |
|
pPO.removeStories( to_PO( pPO, Story.class, pValue ) ); |
233 |
196 |
|
} |
234 |
197 |
|
} |
235 |
198 |
|
|
236 |
|
- |
public static final AttributeAccessorSCDtoManyRegular<StoryTemplate,TaskTemplate> CD_TaskTemplates = new AttributeAccessor_TaskTemplates(); |
|
199 |
+ |
public static final AttributeAccessorSCDtoManyRegular<StoryTemplate, TaskTemplate> CD_TaskTemplates = new AttributeAccessor_TaskTemplates(); |
237 |
200 |
|
|
238 |
|
- |
protected org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate,TaskTemplate> mTaskTemplates = // |
239 |
|
- |
new org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate,TaskTemplate>( (StoryTemplate) this, CD_TaskTemplates ); |
|
201 |
+ |
protected org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate, TaskTemplate> mTaskTemplates = // |
|
202 |
+ |
new org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate, TaskTemplate>( (StoryTemplate) this, CD_TaskTemplates ); |
240 |
203 |
|
|
241 |
|
- |
public java.util.List<TaskTemplate> getTaskTemplates() |
242 |
|
- |
{ |
|
204 |
+ |
public java.util.List<TaskTemplate> getTaskTemplates() { |
243 |
205 |
|
return processLazyLoadAccess( mTaskTemplates ); |
244 |
206 |
|
} |
245 |
207 |
|
|
246 |
|
- |
public void setTaskTemplates( java.util.List<TaskTemplate> pTaskTemplates ) |
247 |
|
- |
{ |
|
208 |
+ |
public void setTaskTemplates( java.util.List<TaskTemplate> pTaskTemplates ) { |
248 |
209 |
|
processLazyLoadMutation( mTaskTemplates, pTaskTemplates ); |
249 |
210 |
|
} |
250 |
211 |
|
|
251 |
|
- |
public void addTaskTemplates( TaskTemplate pTaskTemplates ) |
252 |
|
- |
{ |
|
212 |
+ |
public void addTaskTemplates( TaskTemplate pTaskTemplates ) { |
253 |
213 |
|
processLazyLoadMutationAdd( mTaskTemplates, pTaskTemplates ); |
254 |
214 |
|
} |
255 |
215 |
|
|
256 |
|
- |
public void removeTaskTemplates( TaskTemplate pTaskTemplates ) |
257 |
|
- |
{ |
|
216 |
+ |
public void removeTaskTemplates( TaskTemplate pTaskTemplates ) { |
258 |
217 |
|
processLazyLoadMutationRemove( mTaskTemplates, pTaskTemplates ); |
259 |
218 |
|
} |
260 |
219 |
|
|
261 |
220 |
|
private static class AttributeAccessor_TaskTemplates |
262 |
|
- |
extends AttributeAccessorSCDtoManyRegular<StoryTemplate,TaskTemplate> |
263 |
|
- |
{ |
264 |
|
- |
public AttributeAccessor_TaskTemplates() |
265 |
|
- |
{ |
|
221 |
+ |
extends AttributeAccessorSCDtoManyRegular<StoryTemplate, TaskTemplate> { |
|
222 |
+ |
public AttributeAccessor_TaskTemplates() { |
266 |
223 |
|
super( "TaskTemplates", "ID", TaskTemplate.class, "StoryTemplate", null, Mutability.RW, false, false ); |
267 |
224 |
|
} |
268 |
225 |
|
|
269 |
226 |
|
@Override |
270 |
|
- |
public org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate,TaskTemplate> getValueHolder( StoryTemplate pPO ) |
271 |
|
- |
{ |
|
227 |
+ |
public org.litesoft.orsup.lazyload.LazyLoadToManyRegular<StoryTemplate, TaskTemplate> getValueHolder( StoryTemplate pPO ) { |
272 |
228 |
|
return pPO.mTaskTemplates; |
273 |
229 |
|
} |
274 |
230 |
|
|
275 |
231 |
|
@Override |
276 |
|
- |
public Object getValueOnPO( StoryTemplate pPO ) |
277 |
|
- |
{ |
|
232 |
+ |
public Object getValueOnPO( StoryTemplate pPO ) { |
278 |
233 |
|
return pPO.getTaskTemplates(); |
279 |
234 |
|
} |
280 |
235 |
|
|
281 |
236 |
|
@Override |
282 |
|
- |
public void setValueOnPO( StoryTemplate pPO, Object pValue ) |
283 |
|
- |
{ |
|
237 |
+ |
public void setValueOnPO( StoryTemplate pPO, Object pValue ) { |
284 |
238 |
|
pPO.setTaskTemplates( to_POs( pPO, TaskTemplate.class, pValue ) ); |
285 |
239 |
|
} |
286 |
240 |
|
|
287 |
241 |
|
@Override |
288 |
|
- |
public void addValueOnPO( StoryTemplate pPO, Object pValue ) |
289 |
|
- |
{ |
|
242 |
+ |
public void addValueOnPO( StoryTemplate pPO, Object pValue ) { |
290 |
243 |
|
pPO.addTaskTemplates( to_PO( pPO, TaskTemplate.class, pValue ) ); |
291 |
244 |
|
} |
292 |
245 |
|
|
293 |
246 |
|
@Override |
294 |
|
- |
public void removeValueOnPO( StoryTemplate pPO, Object pValue ) |
295 |
|
- |
{ |
|
247 |
+ |
public void removeValueOnPO( StoryTemplate pPO, Object pValue ) { |
296 |
248 |
|
pPO.removeTaskTemplates( to_PO( pPO, TaskTemplate.class, pValue ) ); |
297 |
249 |
|
} |
298 |
250 |
|
} |
299 |
251 |
|
|
300 |
252 |
|
static class MyMetaData |
301 |
|
- |
extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<StoryTemplate> |
302 |
|
- |
{ |
|
253 |
+ |
extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<StoryTemplate> { |
303 |
254 |
|
public static final String OBJECT_NAME = "StoryTemplate"; |
304 |
255 |
|
public static final String TABLE_NAME = "StoryTemplate"; |
305 |
256 |
|
|
306 |
|
- |
MyMetaData() |
307 |
|
- |
{ |
|
257 |
+ |
MyMetaData() { |
308 |
258 |
|
super( OBJECT_NAME, TABLE_NAME, new AttributeAccessorKeySet( CD_ID ), // |
309 |
259 |
|
|
310 |
260 |
|
CD_RecordVersion, /* .. */ |
|
@@ -321,32 +271,27 @@ |
321 |
271 |
|
} |
322 |
272 |
|
|
323 |
273 |
|
@Override |
324 |
|
- |
public Class getPOclass() |
325 |
|
- |
{ |
|
274 |
+ |
public Class getPOclass() { |
326 |
275 |
|
return StoryTemplate.class; |
327 |
276 |
|
} |
328 |
277 |
|
|
329 |
278 |
|
@Override |
330 |
|
- |
public StoryTemplate createNew( Transaction pTransaction ) |
331 |
|
- |
{ |
|
279 |
+ |
public StoryTemplate createNew( Transaction pTransaction ) { |
332 |
280 |
|
return new StoryTemplate( pTransaction ); |
333 |
281 |
|
} |
334 |
282 |
|
|
335 |
283 |
|
@Override |
336 |
|
- |
public StoryTemplate createPOfromFinder() |
337 |
|
- |
{ |
|
284 |
+ |
public StoryTemplate createPOfromFinder() { |
338 |
285 |
|
return new StoryTemplate( CONSTRUCTION_CONTROL ); |
339 |
286 |
|
} |
340 |
287 |
|
|
341 |
288 |
|
@Override |
342 |
|
- |
public String getDisplayValueFormat() |
343 |
|
- |
{ |
|
289 |
+ |
public String getDisplayValueFormat() { |
344 |
290 |
|
return null; |
345 |
291 |
|
} |
346 |
292 |
|
|
347 |
293 |
|
@Override |
348 |
|
- |
public String getRecordVersionAttributeName() |
349 |
|
- |
{ |
|
294 |
+ |
public String getRecordVersionAttributeName() { |
350 |
295 |
|
return CD_RecordVersion.getName(); |
351 |
296 |
|
} |
352 |
297 |
|
} |