Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
package org.litesoft.initfrom.server.pos;

import org.litesoft.bo.attributes.*;
import org.litesoft.core.util.*;
import org.litesoft.orsup.base.*;
import org.litesoft.orsup.otherattributeaccessors.*;
import org.litesoft.orsup.selection.*;
import org.litesoft.orsup.transact.*;

public abstract class ToDoStoryGO
        extends org.litesoft.orsup.nonpublic.PersistentObjectImpl<ToDoStory>
        implements HasAttributes {
    private static final ConstructionControl CONSTRUCTION_CONTROL = new ConstructionControl();

    public static SimpleFromIdentifier from() {
        return ToDoStoryMetaData.INSTANCE;
    }

    protected ToDoStoryGO( Transaction pTransaction ) {
        super( ToDoStoryMetaData.INSTANCE, pTransaction );
        mID = getNextSequenceNumber( getClass() );
        registerWithTransaction();
        setDefaults();
    }

    protected ToDoStoryGO( ConstructionControl pConstructionControl ) {
        super( ToDoStoryMetaData.INSTANCE, CONSTRUCTION_CONTROL, pConstructionControl );
    }

    public static final AttributeAccessorSCD CD_RecordVersion = new AttributeAccessor_RecordVersion();

    protected final RecordVersionHelper mRecordVersion = new RecordVersionHelper();

    public Long getRecordVersion() {
        return mRecordVersion.getRecordVersion();
    }

    private static class AttributeAccessor_RecordVersion
            extends AttributeAccessorSCD_RecordVersion<ToDoStory> {
        public AttributeAccessor_RecordVersion() {
            super( "RecordVersion", "RecordVersion" );
        }

        @Override
        protected RecordVersionHelper getRecordVersionHelper( ToDoStory pPO ) {
            return pPO.mRecordVersion;
        }
    }

    public static final AttributeAccessorSCD CD_ID = new AttributeAccessor_ID();

    private Long mID;

    public Long getID() {
        return mID;
    }

    protected void LLsetID( Long pID ) {
        verifyMutability( CD_ID, mID, pID );
        mID = pID;
    }

    private static class AttributeAccessor_ID
            extends AttributeAccessorSCDsimplePersistedSysSetOnly<ToDoStory>
            implements NonImportableFeature {
        public AttributeAccessor_ID() {
            super( "ID", "ID", false, _Long.AddOnly() );
        }

        @Override
        public Object getValueOnPO( ToDoStory pPO ) {
            return pPO.getID();
        }

        @Override
        public void db_setValueOnPO( ToDoStory pPO, Object pValue ) {
            pPO.LLsetID( to_Long( pValue ) );
        }
    }

    public static final AttributeAccessorSCD CD_Description = new AttributeAccessor_Description();

    private String mDescription;

    public String getDescription() {
        return mDescription;
    }

    public void setDescription( String pDescription ) {
        verifyMutability( CD_Description, mDescription, pDescription );
        mDescription = pDescription;
    }

    private static class AttributeAccessor_Description
            extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> {
        public AttributeAccessor_Description() {
            super( "Description", "Description", false, _Text.with( DisplayWidthInitial.of( 40 ), //
                                                                    DisplayHeightInitial.of( 4 ) ) );
        }

        @Override
        public Object getValueOnPO( ToDoStory pPO ) {
            return pPO.getDescription();
        }

        @Override
        public void setValueOnPO( ToDoStory pPO, Object pValue ) {
            pPO.setDescription( to_String( pValue ) );
        }
    }

    public static final AttributeAccessorSCD CD_Estimate = new AttributeAccessor_Estimate();

    private Integer mEstimate;

    public Integer getEstimate() {
        return mEstimate;
    }

    public void setEstimate( Integer pEstimate ) {
        verifyMutability( CD_Estimate, mEstimate, pEstimate );
        mEstimate = pEstimate;
    }

    private static class AttributeAccessor_Estimate
            extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> {
        public AttributeAccessor_Estimate() {
            super( "Estimate", "Estimate", false, _Integer.with( DisplayLength.of( 4 ) ) );
        }

        @Override
        public Object getValueOnPO( ToDoStory pPO ) {
            return pPO.getEstimate();
        }

        @Override
        public void setValueOnPO( ToDoStory pPO, Object pValue ) {
            pPO.setEstimate( to_Integer( pValue ) );
        }
    }

    public static final AttributeAccessorSCD CD_OpenTasks = new AttributeAccessor_OpenTasks();

    private Boolean mOpenTasks;

    /**
     * On change, update the StoryTrack's OpenStories
     */
    public Boolean getOpenTasks() {
        return mOpenTasks;
    }

    public void setOpenTasks( Boolean pOpenTasks ) {
        verifyMutability( CD_OpenTasks, mOpenTasks, pOpenTasks );
        mOpenTasks = pOpenTasks;
    }

    private static class AttributeAccessor_OpenTasks
            extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> {
        public AttributeAccessor_OpenTasks() {
            super( "OpenTasks", "OpenTasks", false, _Boolean );
        }

        @Override
        public Object getDefault() {
            return false;
        }

        @Override
        public Object getValueOnPO( ToDoStory pPO ) {
            return pPO.getOpenTasks();
        }

        @Override
        public void setValueOnPO( ToDoStory pPO, Object pValue ) {
            pPO.setOpenTasks( to_Boolean( pValue ) );
        }
    }

    public static final AttributeAccessorSCD CD_Priority = new AttributeAccessor_Priority();

    private Float mPriority;

    public Float getPriority() {
        return mPriority;
    }

    public void setPriority( Float pPriority ) {
        verifyMutability( CD_Priority, mPriority, pPriority );
        mPriority = pPriority;
    }

    private static class AttributeAccessor_Priority
            extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> {
        public AttributeAccessor_Priority() {
            super( "Priority", "Priority", true, _Float.with( DisplayLength.of( 9 ) ) );
        }

        @Override
        public Object getValueOnPO( ToDoStory pPO ) {
            return pPO.getPriority();
        }

        @Override
        public void setValueOnPO( ToDoStory pPO, Object pValue ) {
            pPO.setPriority( to_Float( pValue ) );
        }
    }

    public static final AttributeAccessorSCD CD_Title = new AttributeAccessor_Title();

    private String mTitle;

    public String getTitle() {
        return mTitle;
    }

    public void setTitle( String pTitle ) {
        verifyMutability( CD_Title, mTitle, pTitle );
        mTitle = pTitle;
    }

    private static class AttributeAccessor_Title
            extends AttributeAccessorSCDsimplePersistedRegular<ToDoStory> {
        public AttributeAccessor_Title() {
            super( "Title", "Title", true, _String.with( MaxLength.of( 100 ), //
                                                         DisplayLength.of( 20 ) ) );
        }

        @Override
        public Object getValueOnPO( ToDoStory pPO ) {
            return pPO.getTitle();
        }

        @Override
        public void setValueOnPO( ToDoStory pPO, Object pValue ) {
            pPO.setTitle( to_String( pValue ) );
        }
    }

    public static final AttributeAccessorSCDtoManyRegular<ToDoStory, ToDoTask> CD_Tasks = new AttributeAccessor_Tasks();

    protected org.litesoft.orsup.lazyload.LazyLoadToManyRegular<ToDoStory, ToDoTask> mTasks = //
            new org.litesoft.orsup.lazyload.LazyLoadToManyRegular<ToDoStory, ToDoTask>( (ToDoStory) this, CD_Tasks );

    public java.util.List<ToDoTask> getTasks() {
        return processLazyLoadAccess( mTasks );
    }

    public void setTasks( java.util.List<ToDoTask> pTasks ) {
        processLazyLoadMutation( mTasks, pTasks );
    }

    public void addTasks( ToDoTask pTasks ) {
        processLazyLoadMutationAdd( mTasks, pTasks );
    }

    public void removeTasks( ToDoTask pTasks ) {
        processLazyLoadMutationRemove( mTasks, pTasks );
    }

    private static class AttributeAccessor_Tasks
            extends AttributeAccessorSCDtoManyRegular<ToDoStory, ToDoTask> {
        public AttributeAccessor_Tasks() {
            super( "Tasks", "ID", ToDoTask.class, "Story", null, Mutability.RW, false, true );
        }

        @Override
        public org.litesoft.orsup.lazyload.LazyLoadToManyRegular<ToDoStory, ToDoTask> getValueHolder( ToDoStory pPO ) {
            return pPO.mTasks;
        }

        @Override
        public Object getValueOnPO( ToDoStory pPO ) {
            return pPO.getTasks();
        }

        @Override
        public void setValueOnPO( ToDoStory pPO, Object pValue ) {
            pPO.setTasks( to_POs( pPO, ToDoTask.class, pValue ) );
        }

        @Override
        public void addValueOnPO( ToDoStory pPO, Object pValue ) {
            pPO.addTasks( to_PO( pPO, ToDoTask.class, pValue ) );
        }

        @Override
        public void removeValueOnPO( ToDoStory pPO, Object pValue ) {
            pPO.removeTasks( to_PO( pPO, ToDoTask.class, pValue ) );
        }
    }

    static class MyMetaData
            extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<ToDoStory> {
        public static final String OBJECT_NAME = "ToDoStory";
        public static final String TABLE_NAME = "ToDoStory";

        MyMetaData() {
            super( OBJECT_NAME, TABLE_NAME, new AttributeAccessorKeySet( CD_ID ), //

                   CD_RecordVersion, /* .. */

                   CD_ID, /* ............. */

                   // Regular
                   CD_Description, /* .... */
                   CD_Estimate, /* ....... */
                   CD_OpenTasks, /* ...... */
                   CD_Priority, /* ....... Required */
                   CD_Title, /* .......... Required */

                   // ToMany
                   CD_Tasks /* ........... */ );
            setIndexes( new Index( "ToDoStoryMUGIDX1", null, true, CD_Title ) );
        }

        @Override
        public Class getPOclass() {
            return ToDoStory.class;
        }

        @Override
        public ToDoStory createNew( Transaction pTransaction ) {
            return new ToDoStory( pTransaction );
        }

        @Override
        public ToDoStory createPOfromFinder() {
            return new ToDoStory( CONSTRUCTION_CONTROL );
        }

        @Override
        public String getDisplayValueFormat() {
            return "${Title}";
        }

        @Override
        public String getRecordVersionAttributeName() {
            return CD_RecordVersion.getName();
        }
    }
}

Commits for litesoft/trunk/GWT_Sandbox/InitFrom/src/org/litesoft/initfrom/server/pos/ToDoStoryGO.java

Diff revisions: vs.
Revision Author Commited Message
948 Diff Diff GeorgeS picture GeorgeS Sat 07 Jun, 2014 23:42:39 +0000

Jusefuls Formatter Updated to New Code Format

459 GeorgeS picture GeorgeS Sun 21 Aug, 2011 00:42:41 +0000