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
// This Source Code is in the Public Domain per: http://unlicense.org
package org.litesoft.or;

import java.sql.*;

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

public abstract class DBTagPO extends PersistentObjectImpl<DBTag>
{
    private static final ConstructionControl CONSTRUCTION_CONTROL = new ConstructionControl();

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

    protected DBTagPO( Transaction pTransaction ) // Only used for New
    {
        super( DBTagMetaData.INSTANCE, pTransaction );
        mID = getNextSequenceNumber( getClass() );
        registerWithTransaction();
    }

    protected DBTagPO( ConstructionControl pConstructionControl )
    {
        super( DBTagMetaData.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<DBTag>
    {
        public AttributeAccessor_RecordVersion()
        {
            super( "RecordVersion", "RecordVersion" );
        }

        protected RecordVersionHelper getRecordVersionHelper( DBTag pPO )
        {
            return pPO.mRecordVersion;
        }
    }

    public static final AttributeAccessorSCD CD_LastModified = new AttributeAccessor_LastModified();

    private Timestamp mLastModified = null;

    public Timestamp getLastModified()
    {
        return mLastModified;
    }

    protected void LLsetLastModified( Timestamp pLastModified )
    {
        verifyMutability( CD_LastModified, mLastModified, pLastModified );
        mLastModified = pLastModified;
    }

    private static class AttributeAccessor_LastModified extends AttributeAccessorSCDsimplePersistedSysSetOnly<DBTag> implements NonImportableFeature
    {
        public AttributeAccessor_LastModified()
        {
            super( "LastModified", "LastModified", true, _SimpleTimestamp );
        }

        public Object getValueOnPO( DBTag pPO )
        {
            return pPO.getLastModified();
        }

        public void db_setValueOnPO( DBTag pPO, Object pValue )
        {
            pPO.LLsetLastModified( to_Timestamp( pValue ) );
        }
    }

    public static final AttributeAccessorSCD CD_ID = new AttributeAccessor_ID();

    private Long mID = null;

    public Long getID()
    {
        return mID;
    }

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

    private static class AttributeAccessor_ID extends AttributeAccessorSCDsimplePersistedReadOnly<DBTag> implements NonImportableFeature
    {
        public AttributeAccessor_ID()
        {
            super( "ID", "id", true, _Long );
        }

        public Object getValueOnPO( DBTag pPO )
        {
            return pPO.getID();
        }

        public void db_setValueOnPO( DBTag pPO, Object pValue )
        {
            pPO.LLsetID( to_Long( pValue ) );
        }
    }

    public static final AttributeAccessorSCDtoOneRegular<DBTag, DBInvoice> CD_Invoice = new AttributeAccessor_Invoice();

    protected LazyLoadToOneRegular<DBTag, DBInvoice> mInvoice = new LazyLoadToOneRegular<DBTag, DBInvoice>( (DBTag) this, CD_Invoice );

    public DBInvoice getInvoice()
    {
        return processLazyLoadAccess( mInvoice );
    }

    public void setInvoice( DBInvoice pInvoice )
    {
        processLazyLoadMutation( mInvoice, pInvoice );
    }

    private static class AttributeAccessor_Invoice extends AttributeAccessorSCDtoOneRegular<DBTag, DBInvoice>
    {
        public AttributeAccessor_Invoice()
        {
            super( "Invoice", "invoice_id", DBInvoice.class, "ID", "DBTagSetForInvoice", false, true, Mutability.RW );
        }

        public LazyLoadToOneRegular<DBTag, DBInvoice> getValueHolder( DBTag pPO )
        {
            return pPO.mInvoice;
        }

        public Object getValueOnPO( DBTag pPO )
        {
            return pPO.getInvoice();
        }

        public void setValueOnPO( DBTag pPO, Object pValue )
        {
            pPO.setInvoice( to_PO( pPO, DBInvoice.class, pValue ) );
        }

        public Object db_getValueOnPO( DBTag pPO )
        {
            return pPO.mInvoice.db_getValue();
        }

        public void db_setValueOnPO( DBTag pPO, Object pValue )
        {
            pPO.mInvoice.db_setValue( to_Long( pValue ) );
        }

        public boolean changedPOflagsPeerChanged()
        {
            return true;
        }
    }

    public static final AttributeAccessorSCD CD_Tag = new AttributeAccessor_Tag();

    private String mTag;

    public String getTag()
    {
        return mTag;
    }

    public void setTag( String pTag )
    {
        verifyMutability( CD_Tag, mTag, pTag );
        mTag = pTag;
    }

    private static class AttributeAccessor_Tag extends AttributeAccessorSCDsimplePersistedRegular<DBTag>
    {
        public AttributeAccessor_Tag()
        {
            super( "Tag", "Tag", false, _Text.with( MaxLength.of( 4000 ) ) );
        }

        public Object getValueOnPO( DBTag pPO )
        {
            return pPO.getTag();
        }

        public void setValueOnPO( DBTag pPO, Object pValue )
        {
            pPO.setTag( to_String( pValue ) );
        }
    }

    static class MyMetaData extends PersistentObjectImplMetaData<DBTag>
    {
        public static final String OBJECT_NAME = "DBTag";
        public static final String TABLE_NAME = "DBTag";

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

                   CD_LastModified, //
                   CD_RecordVersion, //
                   CD_Tag, //

                   CD_Invoice );
            setIndexes( new Index( "DBTagIDX1", null, false, CD_Invoice ) );
        }

        public Class getPOclass()
        {
            return DBTag.class;
        }

        public DBTag createNew( Transaction pTransaction )
        {
            return new DBTag( pTransaction );
        }

        public DBTag createPOfromFinder()
        {
            return new DBTag( CONSTRUCTION_CONTROL );
        }

        public boolean isReferencePO()
        {
            return true;
        }

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

        public String getTransactionTimestampAttributeName()
        {
            return CD_LastModified.getName();
        }

        protected void setTransactionTimestamp( DBTag pPersistentObject, Timestamp pTransactionTimeStamp )
        {
            pPersistentObject.LLsetLastModified( pTransactionTimeStamp );
        }

        public String getDisplayValueFormat()
        {
            return "${Tag}";
        }
    }
}

Commits for litesoft/trunk/Java/core/Server/tests/org/litesoft/or/DBTagPO.java

Diff revisions: vs.
Revision Author Commited Message
947 Diff Diff GeorgeS picture GeorgeS Fri 06 Jun, 2014 23:36:56 +0000

Correct Spelling of package!

151 Diff Diff GeorgeS picture GeorgeS Thu 17 Mar, 2011 04:16:22 +0000
49 Diff Diff GeorgeS picture GeorgeS Mon 12 Apr, 2010 02:59:10 +0000

License Text

21 Diff Diff GeorgeS picture GeorgeS Tue 23 Feb, 2010 21:11:25 +0000
2 GeorgeS picture GeorgeS Sun 07 Feb, 2010 12:50:58 +0000