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
package org.litesoft.prioritizer.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 DocumentReferenceGO
        extends org.litesoft.orsup.nonpublic.PersistentObjectImpl<DocumentReference>
        implements HasAttributes {
    private static final ConstructionControl CONSTRUCTION_CONTROL = new ConstructionControl();

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

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

    protected DocumentReferenceGO( ConstructionControl pConstructionControl ) {
        super( DocumentReferenceMetaData.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<DocumentReference> {
        public AttributeAccessor_RecordVersion() {
            super( "RecordVersion", "RecordVersion" );
        }

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

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

        @Override
        public void db_setValueOnPO( DocumentReference 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<DocumentReference> {
        public AttributeAccessor_Description() {
            super( "Description", "Description", false, _Text.with( DisplayWidthInitial.of( 40 ), //
                                                                    DisplayHeightInitial.of( 4 ) ) );
        }

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

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

    public static final AttributeAccessorSCD CD_Document = new AttributeAccessor_Document();

    private String mDocument;

    /**
     * GeorgeToDo: Blob
     */
    public String getDocument() {
        return mDocument;
    }

    public void setDocument( String pDocument ) {
        verifyMutability( CD_Document, mDocument, pDocument );
        mDocument = pDocument;
    }

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

        @Override
        public Object getValueOnPO( DocumentReference pPO ) {
            return pPO.getDocument();
        }

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

    public static final AttributeAccessorSCD CD_NumberOfOwners = new AttributeAccessor_NumberOfOwners();

    private Integer mNumberOfOwners;

    /**
     * Used for ease of docuemnt removal|ToDo: Implement tracking and autodeletion in code.
     */
    public Integer getNumberOfOwners() {
        return mNumberOfOwners;
    }

    public void setNumberOfOwners( Integer pNumberOfOwners ) {
        verifyMutability( CD_NumberOfOwners, mNumberOfOwners, pNumberOfOwners );
        mNumberOfOwners = pNumberOfOwners;
    }

    private static class AttributeAccessor_NumberOfOwners
            extends AttributeAccessorSCDsimplePersistedRegular<DocumentReference> {
        public AttributeAccessor_NumberOfOwners() {
            super( "NumberOfOwners", "NumberOfOwners", false, _Integer.with( DisplayLength.of( 10 ) ) );
        }

        @Override
        public Object getValueOnPO( DocumentReference pPO ) {
            return pPO.getNumberOfOwners();
        }

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

    public static final AttributeAccessorSCD CD_OriginalFileName = new AttributeAccessor_OriginalFileName();

    private String mOriginalFileName;

    public String getOriginalFileName() {
        return mOriginalFileName;
    }

    public void setOriginalFileName( String pOriginalFileName ) {
        verifyMutability( CD_OriginalFileName, mOriginalFileName, pOriginalFileName );
        mOriginalFileName = pOriginalFileName;
    }

    private static class AttributeAccessor_OriginalFileName
            extends AttributeAccessorSCDsimplePersistedRegular<DocumentReference> {
        public AttributeAccessor_OriginalFileName() {
            super( "OriginalFileName", "OriginalFileName", false, _String.with( MaxLength.of( 40 ), //
                                                                                DisplayLength.of( 20 ) ) );
        }

        @Override
        public Object getValueOnPO( DocumentReference pPO ) {
            return pPO.getOriginalFileName();
        }

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

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

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

                   CD_RecordVersion, /* ..... */

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

                   // Regular
                   CD_Description, /* ....... */
                   CD_Document, /* .......... Required */
                   CD_NumberOfOwners, /* .... */
                   CD_OriginalFileName /* ... */ );
        }

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

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

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

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

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

Commits for litesoft/trunk/GWT_Sandbox/Prioritizer/src/org/litesoft/prioritizer/server/pos/DocumentReferenceGO.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

398 GeorgeS picture GeorgeS Mon 15 Aug, 2011 19:57:47 +0000