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
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 EmailGO
        extends org.litesoft.orsup.nonpublic.PersistentObjectImpl<Email>
        implements HasAttributes {
    public static final String[] sValidOptionsStatus = //
            { //
              EmailNames.poStatus_Unverified, //
              EmailNames.poStatus_Verified, //
              EmailNames.poStatus_Failed, //
            };

    public static final String[] sValidOptionsType = //
            { //
              EmailNames.poType_Home, //
              EmailNames.poType_Work, //
            };

    private static final ConstructionControl CONSTRUCTION_CONTROL = new ConstructionControl();

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

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

    protected EmailGO( ConstructionControl pConstructionControl ) {
        super( EmailMetaData.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<Email> {
        public AttributeAccessor_RecordVersion() {
            super( "RecordVersion", "RecordVersion" );
        }

        @Override
        protected RecordVersionHelper getRecordVersionHelper( Email 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<Email>
            implements NonImportableFeature {
        public AttributeAccessor_ID() {
            super( "ID", "ID", false, _Long.AddOnly() );
        }

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

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

    public static final AttributeAccessorSCD CD_Active = new AttributeAccessor_Active();

    private Boolean mActive;

    /**
     * True if emails should be sent to this email address.|This is a way to list a set of emails for a person, but only send correspondence to ones that are
     * active or "current"
     */
    public Boolean getActive() {
        return mActive;
    }

    public void setActive( Boolean pActive ) {
        verifyMutability( CD_Active, mActive, pActive );
        mActive = pActive;
    }

    private static class AttributeAccessor_Active
            extends AttributeAccessorSCDsimplePersistedRegular<Email> {
        public AttributeAccessor_Active() {
            super( "Active", "Active", true, _Boolean );
        }

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

        @Override
        public Object getValueOnPO( Email pPO ) {
            return pPO.getActive();
        }

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

    public static final AttributeAccessorSCD CD_EmailAddress = new AttributeAccessor_EmailAddress();

    private String mEmailAddress;

    public String getEmailAddress() {
        return mEmailAddress;
    }

    public void setEmailAddress( String pEmailAddress ) {
        verifyMutability( CD_EmailAddress, mEmailAddress, pEmailAddress );
        mEmailAddress = pEmailAddress;
    }

    private static class AttributeAccessor_EmailAddress
            extends AttributeAccessorSCDsimplePersistedRegular<Email> {
        public AttributeAccessor_EmailAddress() {
            super( "EmailAddress", "EmailAddress", true, _String.with( MaxLength.of( 40 ), //
                                                                       DisplayLength.of( 20 ) ) );
        }

        @Override
        public Object getValueOnPO( Email pPO ) {
            return pPO.getEmailAddress();
        }

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

    public static final AttributeAccessorSCDtoOneVariable<Email> CD_Owner = new AttributeAccessor_Owner();

    protected org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Email> mOwner = //
            new org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Email>( (Email) this, CD_Owner );

    public org.litesoft.orsup.nonpublic.PersistentObjectImpl getOwner() {
        return processLazyLoadAccess( mOwner );
    }

    private static class AttributeAccessor_Owner
            extends AttributeAccessorSCDtoOneVariable<Email> {
        public AttributeAccessor_Owner() {
            super( "Owner", "Owner", true, Mutability.RW );
        }

        @Override
        public org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Email> getValueHolder( Email pPO ) {
            return pPO.mOwner;
        }

        @Override
        public Object getValueOnPO( Email pPO ) {
            return pPO.getOwner();
        }
    }

    public static final AttributeAccessorSCD CD_Status = new AttributeAccessor_Status();

    private String mStatus;

    public String getStatus() {
        return mStatus;
    }

    public void setStatus( String pStatus ) {
        verifyMutability( CD_Status, mStatus, pStatus );
        mStatus = pStatus;
    }

    private static class AttributeAccessor_Status
            extends AttributeAccessorSCDsimplePersistedRegular<Email> {
        public AttributeAccessor_Status() {
            super( "Status", "Status", true, _ValidOptions.with( Options.of( sValidOptionsStatus ) ) );
        }

        @Override
        public Object getValueOnPO( Email pPO ) {
            return pPO.getStatus();
        }

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

    public static final AttributeAccessorSCD CD_Type = new AttributeAccessor_Type();

    private String mType;

    public String getType() {
        return mType;
    }

    public void setType( String pType ) {
        verifyMutability( CD_Type, mType, pType );
        mType = pType;
    }

    private static class AttributeAccessor_Type
            extends AttributeAccessorSCDsimplePersistedRegular<Email> {
        public AttributeAccessor_Type() {
            super( "Type", "Type", true, _OpenValidOptions.with( Options.of( sValidOptionsType ) ) );
        }

        @Override
        public Object getValueOnPO( Email pPO ) {
            return pPO.getType();
        }

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

    public static final AttributeAccessorSCD CD_ViewOrder = new AttributeAccessor_ViewOrder();

    private Float mViewOrder;

    public Float getViewOrder() {
        return mViewOrder;
    }

    public void setViewOrder( Float pViewOrder ) {
        verifyMutability( CD_ViewOrder, mViewOrder, pViewOrder );
        mViewOrder = pViewOrder;
    }

    private static class AttributeAccessor_ViewOrder
            extends AttributeAccessorSCDsimplePersistedRegular<Email> {
        public AttributeAccessor_ViewOrder() {
            super( "ViewOrder", "ViewOrder", false, _Float.with( DisplayLength.of( 9 ) ) );
        }

        @Override
        public Object getValueOnPO( Email pPO ) {
            return pPO.getViewOrder();
        }

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

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

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

                   CD_RecordVersion, /* .. */

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

                   // Regular
                   CD_Active, /* ......... Required */
                   CD_EmailAddress, /* ... Required */
                   CD_Status, /* ......... Required */
                   CD_Type, /* ........... Required */
                   CD_ViewOrder, /* ...... */

                   // ToOne
                   CD_Owner /* ........... Required */ );
            setIndexes( new Index( "Email21AIDX1", null, false, CD_Owner ) );
        }

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

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

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

        @Override
        public String getDisplayValueFormat() {
            return null;
        }

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

Commits for litesoft/trunk/GWT_Sandbox/InitFrom/src/org/litesoft/initfrom/server/pos/EmailGO.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