Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/DATT/src/org/litesoft/datt/server/pos/EmailGO.java

Diff revisions: vs.
  @@ -9,8 +9,7 @@
9 9
10 10 public abstract class EmailGO
11 11 extends org.litesoft.orsup.nonpublic.PersistentObjectImpl<Email>
12 - implements HasAttributes
13 - {
12 + implements HasAttributes {
14 13 public static final String[] sValidOptionsStatus = //
15 14 { //
16 15 EmailNames.poStatus_Unverified, //
  @@ -26,21 +25,18 @@
26 25
27 26 private static final ConstructionControl CONSTRUCTION_CONTROL = new ConstructionControl();
28 27
29 - public static SimpleFromIdentifier from()
30 - {
28 + public static SimpleFromIdentifier from() {
31 29 return EmailMetaData.INSTANCE;
32 30 }
33 31
34 - protected EmailGO( Transaction pTransaction )
35 - {
32 + protected EmailGO( Transaction pTransaction ) {
36 33 super( EmailMetaData.INSTANCE, pTransaction );
37 34 mID = getNextSequenceNumber( getClass() );
38 35 registerWithTransaction();
39 36 setDefaults();
40 37 }
41 38
42 - protected EmailGO( ConstructionControl pConstructionControl )
43 - {
39 + protected EmailGO( ConstructionControl pConstructionControl ) {
44 40 super( EmailMetaData.INSTANCE, CONSTRUCTION_CONTROL, pConstructionControl );
45 41 }
46 42
  @@ -48,22 +44,18 @@
48 44
49 45 protected final RecordVersionHelper mRecordVersion = new RecordVersionHelper();
50 46
51 - public Long getRecordVersion()
52 - {
47 + public Long getRecordVersion() {
53 48 return mRecordVersion.getRecordVersion();
54 49 }
55 50
56 51 private static class AttributeAccessor_RecordVersion
57 - extends AttributeAccessorSCD_RecordVersion<Email>
58 - {
59 - public AttributeAccessor_RecordVersion()
60 - {
52 + extends AttributeAccessorSCD_RecordVersion<Email> {
53 + public AttributeAccessor_RecordVersion() {
61 54 super( "RecordVersion", "RecordVersion" );
62 55 }
63 56
64 57 @Override
65 - protected RecordVersionHelper getRecordVersionHelper( Email pPO )
66 - {
58 + protected RecordVersionHelper getRecordVersionHelper( Email pPO ) {
67 59 return pPO.mRecordVersion;
68 60 }
69 61 }
  @@ -72,35 +64,29 @@
72 64
73 65 private Long mID;
74 66
75 - public Long getID()
76 - {
67 + public Long getID() {
77 68 return mID;
78 69 }
79 70
80 - protected void LLsetID( Long pID )
81 - {
71 + protected void LLsetID( Long pID ) {
82 72 verifyMutability( CD_ID, mID, pID );
83 73 mID = pID;
84 74 }
85 75
86 76 private static class AttributeAccessor_ID
87 77 extends AttributeAccessorSCDsimplePersistedSysSetOnly<Email>
88 - implements NonImportableFeature
89 - {
90 - public AttributeAccessor_ID()
91 - {
78 + implements NonImportableFeature {
79 + public AttributeAccessor_ID() {
92 80 super( "ID", "ID", false, _Long.AddOnly() );
93 81 }
94 82
95 83 @Override
96 - public Object getValueOnPO( Email pPO )
97 - {
84 + public Object getValueOnPO( Email pPO ) {
98 85 return pPO.getID();
99 86 }
100 87
101 88 @Override
102 - public void db_setValueOnPO( Email pPO, Object pValue )
103 - {
89 + public void db_setValueOnPO( Email pPO, Object pValue ) {
104 90 pPO.LLsetID( to_Long( pValue ) );
105 91 }
106 92 }
  @@ -110,42 +96,36 @@
110 96 private Boolean mActive;
111 97
112 98 /**
113 - * 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"
99 + * 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
100 + * active or "current"
114 101 */
115 - public Boolean getActive()
116 - {
102 + public Boolean getActive() {
117 103 return mActive;
118 104 }
119 105
120 - public void setActive( Boolean pActive )
121 - {
106 + public void setActive( Boolean pActive ) {
122 107 verifyMutability( CD_Active, mActive, pActive );
123 108 mActive = pActive;
124 109 }
125 110
126 111 private static class AttributeAccessor_Active
127 - extends AttributeAccessorSCDsimplePersistedRegular<Email>
128 - {
129 - public AttributeAccessor_Active()
130 - {
112 + extends AttributeAccessorSCDsimplePersistedRegular<Email> {
113 + public AttributeAccessor_Active() {
131 114 super( "Active", "Active", true, _Boolean );
132 115 }
133 116
134 117 @Override
135 - public Object getDefault()
136 - {
118 + public Object getDefault() {
137 119 return true;
138 120 }
139 121
140 122 @Override
141 - public Object getValueOnPO( Email pPO )
142 - {
123 + public Object getValueOnPO( Email pPO ) {
143 124 return pPO.getActive();
144 125 }
145 126
146 127 @Override
147 - public void setValueOnPO( Email pPO, Object pValue )
148 - {
128 + public void setValueOnPO( Email pPO, Object pValue ) {
149 129 pPO.setActive( to_Boolean( pValue ) );
150 130 }
151 131 }
  @@ -154,35 +134,29 @@
154 134
155 135 private String mEmailAddress;
156 136
157 - public String getEmailAddress()
158 - {
137 + public String getEmailAddress() {
159 138 return mEmailAddress;
160 139 }
161 140
162 - public void setEmailAddress( String pEmailAddress )
163 - {
141 + public void setEmailAddress( String pEmailAddress ) {
164 142 verifyMutability( CD_EmailAddress, mEmailAddress, pEmailAddress );
165 143 mEmailAddress = pEmailAddress;
166 144 }
167 145
168 146 private static class AttributeAccessor_EmailAddress
169 - extends AttributeAccessorSCDsimplePersistedRegular<Email>
170 - {
171 - public AttributeAccessor_EmailAddress()
172 - {
147 + extends AttributeAccessorSCDsimplePersistedRegular<Email> {
148 + public AttributeAccessor_EmailAddress() {
173 149 super( "EmailAddress", "EmailAddress", true, _String.with( MaxLength.of( 40 ), //
174 150 DisplayLength.of( 20 ) ) );
175 151 }
176 152
177 153 @Override
178 - public Object getValueOnPO( Email pPO )
179 - {
154 + public Object getValueOnPO( Email pPO ) {
180 155 return pPO.getEmailAddress();
181 156 }
182 157
183 158 @Override
184 - public void setValueOnPO( Email pPO, Object pValue )
185 - {
159 + public void setValueOnPO( Email pPO, Object pValue ) {
186 160 pPO.setEmailAddress( to_String( pValue ) );
187 161 }
188 162 }
  @@ -192,28 +166,23 @@
192 166 protected org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Email> mOwner = //
193 167 new org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Email>( (Email) this, CD_Owner );
194 168
195 - public org.litesoft.orsup.nonpublic.PersistentObjectImpl getOwner()
196 - {
169 + public org.litesoft.orsup.nonpublic.PersistentObjectImpl getOwner() {
197 170 return processLazyLoadAccess( mOwner );
198 171 }
199 172
200 173 private static class AttributeAccessor_Owner
201 - extends AttributeAccessorSCDtoOneVariable<Email>
202 - {
203 - public AttributeAccessor_Owner()
204 - {
174 + extends AttributeAccessorSCDtoOneVariable<Email> {
175 + public AttributeAccessor_Owner() {
205 176 super( "Owner", "Owner", true, Mutability.RW );
206 177 }
207 178
208 179 @Override
209 - public org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Email> getValueHolder( Email pPO )
210 - {
180 + public org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Email> getValueHolder( Email pPO ) {
211 181 return pPO.mOwner;
212 182 }
213 183
214 184 @Override
215 - public Object getValueOnPO( Email pPO )
216 - {
185 + public Object getValueOnPO( Email pPO ) {
217 186 return pPO.getOwner();
218 187 }
219 188 }
  @@ -222,34 +191,28 @@
222 191
223 192 private String mStatus;
224 193
225 - public String getStatus()
226 - {
194 + public String getStatus() {
227 195 return mStatus;
228 196 }
229 197
230 - public void setStatus( String pStatus )
231 - {
198 + public void setStatus( String pStatus ) {
232 199 verifyMutability( CD_Status, mStatus, pStatus );
233 200 mStatus = pStatus;
234 201 }
235 202
236 203 private static class AttributeAccessor_Status
237 - extends AttributeAccessorSCDsimplePersistedRegular<Email>
238 - {
239 - public AttributeAccessor_Status()
240 - {
204 + extends AttributeAccessorSCDsimplePersistedRegular<Email> {
205 + public AttributeAccessor_Status() {
241 206 super( "Status", "Status", true, _ValidOptions.with( Options.of( sValidOptionsStatus ) ) );
242 207 }
243 208
244 209 @Override
245 - public Object getValueOnPO( Email pPO )
246 - {
210 + public Object getValueOnPO( Email pPO ) {
247 211 return pPO.getStatus();
248 212 }
249 213
250 214 @Override
251 - public void setValueOnPO( Email pPO, Object pValue )
252 - {
215 + public void setValueOnPO( Email pPO, Object pValue ) {
253 216 pPO.setStatus( to_String( pValue ) );
254 217 }
255 218 }
  @@ -258,34 +221,28 @@
258 221
259 222 private String mType;
260 223
261 - public String getType()
262 - {
224 + public String getType() {
263 225 return mType;
264 226 }
265 227
266 - public void setType( String pType )
267 - {
228 + public void setType( String pType ) {
268 229 verifyMutability( CD_Type, mType, pType );
269 230 mType = pType;
270 231 }
271 232
272 233 private static class AttributeAccessor_Type
273 - extends AttributeAccessorSCDsimplePersistedRegular<Email>
274 - {
275 - public AttributeAccessor_Type()
276 - {
234 + extends AttributeAccessorSCDsimplePersistedRegular<Email> {
235 + public AttributeAccessor_Type() {
277 236 super( "Type", "Type", true, _OpenValidOptions.with( Options.of( sValidOptionsType ) ) );
278 237 }
279 238
280 239 @Override
281 - public Object getValueOnPO( Email pPO )
282 - {
240 + public Object getValueOnPO( Email pPO ) {
283 241 return pPO.getType();
284 242 }
285 243
286 244 @Override
287 - public void setValueOnPO( Email pPO, Object pValue )
288 - {
245 + public void setValueOnPO( Email pPO, Object pValue ) {
289 246 pPO.setType( to_String( pValue ) );
290 247 }
291 248 }
  @@ -294,46 +251,38 @@
294 251
295 252 private Float mViewOrder;
296 253
297 - public Float getViewOrder()
298 - {
254 + public Float getViewOrder() {
299 255 return mViewOrder;
300 256 }
301 257
302 - public void setViewOrder( Float pViewOrder )
303 - {
258 + public void setViewOrder( Float pViewOrder ) {
304 259 verifyMutability( CD_ViewOrder, mViewOrder, pViewOrder );
305 260 mViewOrder = pViewOrder;
306 261 }
307 262
308 263 private static class AttributeAccessor_ViewOrder
309 - extends AttributeAccessorSCDsimplePersistedRegular<Email>
310 - {
311 - public AttributeAccessor_ViewOrder()
312 - {
264 + extends AttributeAccessorSCDsimplePersistedRegular<Email> {
265 + public AttributeAccessor_ViewOrder() {
313 266 super( "ViewOrder", "ViewOrder", false, _Float.with( DisplayLength.of( 9 ) ) );
314 267 }
315 268
316 269 @Override
317 - public Object getValueOnPO( Email pPO )
318 - {
270 + public Object getValueOnPO( Email pPO ) {
319 271 return pPO.getViewOrder();
320 272 }
321 273
322 274 @Override
323 - public void setValueOnPO( Email pPO, Object pValue )
324 - {
275 + public void setValueOnPO( Email pPO, Object pValue ) {
325 276 pPO.setViewOrder( to_Float( pValue ) );
326 277 }
327 278 }
328 279
329 280 static class MyMetaData
330 - extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<Email>
331 - {
281 + extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<Email> {
332 282 public static final String OBJECT_NAME = "Email";
333 283 public static final String TABLE_NAME = "Email";
334 284
335 - MyMetaData()
336 - {
285 + MyMetaData() {
337 286 super( OBJECT_NAME, TABLE_NAME, new AttributeAccessorKeySet( CD_ID ), //
338 287
339 288 CD_RecordVersion, /* .. */
  @@ -353,32 +302,27 @@
353 302 }
354 303
355 304 @Override
356 - public Class getPOclass()
357 - {
305 + public Class getPOclass() {
358 306 return Email.class;
359 307 }
360 308
361 309 @Override
362 - public Email createNew( Transaction pTransaction )
363 - {
310 + public Email createNew( Transaction pTransaction ) {
364 311 return new Email( pTransaction );
365 312 }
366 313
367 314 @Override
368 - public Email createPOfromFinder()
369 - {
315 + public Email createPOfromFinder() {
370 316 return new Email( CONSTRUCTION_CONTROL );
371 317 }
372 318
373 319 @Override
374 - public String getDisplayValueFormat()
375 - {
320 + public String getDisplayValueFormat() {
376 321 return null;
377 322 }
378 323
379 324 @Override
380 - public String getRecordVersionAttributeName()
381 - {
325 + public String getRecordVersionAttributeName() {
382 326 return CD_RecordVersion.getName();
383 327 }
384 328 }