|
@@ -9,8 +9,7 @@ |
9 |
9 |
|
|
10 |
10 |
|
public abstract class PhoneGO |
11 |
11 |
|
extends org.litesoft.orsup.nonpublic.PersistentObjectImpl<Phone> |
12 |
|
- |
implements HasAttributes |
13 |
|
- |
{ |
|
12 |
+ |
implements HasAttributes { |
14 |
13 |
|
public static final String[] sValidOptionsType = // |
15 |
14 |
|
{ // |
16 |
15 |
|
PhoneNames.poType_Home, // |
|
@@ -22,21 +21,18 @@ |
22 |
21 |
|
|
23 |
22 |
|
private static final ConstructionControl CONSTRUCTION_CONTROL = new ConstructionControl(); |
24 |
23 |
|
|
25 |
|
- |
public static SimpleFromIdentifier from() |
26 |
|
- |
{ |
|
24 |
+ |
public static SimpleFromIdentifier from() { |
27 |
25 |
|
return PhoneMetaData.INSTANCE; |
28 |
26 |
|
} |
29 |
27 |
|
|
30 |
|
- |
protected PhoneGO( Transaction pTransaction ) |
31 |
|
- |
{ |
|
28 |
+ |
protected PhoneGO( Transaction pTransaction ) { |
32 |
29 |
|
super( PhoneMetaData.INSTANCE, pTransaction ); |
33 |
30 |
|
mID = getNextSequenceNumber( getClass() ); |
34 |
31 |
|
registerWithTransaction(); |
35 |
32 |
|
setDefaults(); |
36 |
33 |
|
} |
37 |
34 |
|
|
38 |
|
- |
protected PhoneGO( ConstructionControl pConstructionControl ) |
39 |
|
- |
{ |
|
35 |
+ |
protected PhoneGO( ConstructionControl pConstructionControl ) { |
40 |
36 |
|
super( PhoneMetaData.INSTANCE, CONSTRUCTION_CONTROL, pConstructionControl ); |
41 |
37 |
|
} |
42 |
38 |
|
|
|
@@ -44,22 +40,18 @@ |
44 |
40 |
|
|
45 |
41 |
|
protected final RecordVersionHelper mRecordVersion = new RecordVersionHelper(); |
46 |
42 |
|
|
47 |
|
- |
public Long getRecordVersion() |
48 |
|
- |
{ |
|
43 |
+ |
public Long getRecordVersion() { |
49 |
44 |
|
return mRecordVersion.getRecordVersion(); |
50 |
45 |
|
} |
51 |
46 |
|
|
52 |
47 |
|
private static class AttributeAccessor_RecordVersion |
53 |
|
- |
extends AttributeAccessorSCD_RecordVersion<Phone> |
54 |
|
- |
{ |
55 |
|
- |
public AttributeAccessor_RecordVersion() |
56 |
|
- |
{ |
|
48 |
+ |
extends AttributeAccessorSCD_RecordVersion<Phone> { |
|
49 |
+ |
public AttributeAccessor_RecordVersion() { |
57 |
50 |
|
super( "RecordVersion", "RecordVersion" ); |
58 |
51 |
|
} |
59 |
52 |
|
|
60 |
53 |
|
@Override |
61 |
|
- |
protected RecordVersionHelper getRecordVersionHelper( Phone pPO ) |
62 |
|
- |
{ |
|
54 |
+ |
protected RecordVersionHelper getRecordVersionHelper( Phone pPO ) { |
63 |
55 |
|
return pPO.mRecordVersion; |
64 |
56 |
|
} |
65 |
57 |
|
} |
|
@@ -68,35 +60,29 @@ |
68 |
60 |
|
|
69 |
61 |
|
private Long mID; |
70 |
62 |
|
|
71 |
|
- |
public Long getID() |
72 |
|
- |
{ |
|
63 |
+ |
public Long getID() { |
73 |
64 |
|
return mID; |
74 |
65 |
|
} |
75 |
66 |
|
|
76 |
|
- |
protected void LLsetID( Long pID ) |
77 |
|
- |
{ |
|
67 |
+ |
protected void LLsetID( Long pID ) { |
78 |
68 |
|
verifyMutability( CD_ID, mID, pID ); |
79 |
69 |
|
mID = pID; |
80 |
70 |
|
} |
81 |
71 |
|
|
82 |
72 |
|
private static class AttributeAccessor_ID |
83 |
73 |
|
extends AttributeAccessorSCDsimplePersistedSysSetOnly<Phone> |
84 |
|
- |
implements NonImportableFeature |
85 |
|
- |
{ |
86 |
|
- |
public AttributeAccessor_ID() |
87 |
|
- |
{ |
|
74 |
+ |
implements NonImportableFeature { |
|
75 |
+ |
public AttributeAccessor_ID() { |
88 |
76 |
|
super( "ID", "ID", false, _Long.AddOnly() ); |
89 |
77 |
|
} |
90 |
78 |
|
|
91 |
79 |
|
@Override |
92 |
|
- |
public Object getValueOnPO( Phone pPO ) |
93 |
|
- |
{ |
|
80 |
+ |
public Object getValueOnPO( Phone pPO ) { |
94 |
81 |
|
return pPO.getID(); |
95 |
82 |
|
} |
96 |
83 |
|
|
97 |
84 |
|
@Override |
98 |
|
- |
public void db_setValueOnPO( Phone pPO, Object pValue ) |
99 |
|
- |
{ |
|
85 |
+ |
public void db_setValueOnPO( Phone pPO, Object pValue ) { |
100 |
86 |
|
pPO.LLsetID( to_Long( pValue ) ); |
101 |
87 |
|
} |
102 |
88 |
|
} |
|
@@ -106,28 +92,23 @@ |
106 |
92 |
|
protected org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Phone> mOwner = // |
107 |
93 |
|
new org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Phone>( (Phone) this, CD_Owner ); |
108 |
94 |
|
|
109 |
|
- |
public org.litesoft.orsup.nonpublic.PersistentObjectImpl getOwner() |
110 |
|
- |
{ |
|
95 |
+ |
public org.litesoft.orsup.nonpublic.PersistentObjectImpl getOwner() { |
111 |
96 |
|
return processLazyLoadAccess( mOwner ); |
112 |
97 |
|
} |
113 |
98 |
|
|
114 |
99 |
|
private static class AttributeAccessor_Owner |
115 |
|
- |
extends AttributeAccessorSCDtoOneVariable<Phone> |
116 |
|
- |
{ |
117 |
|
- |
public AttributeAccessor_Owner() |
118 |
|
- |
{ |
|
100 |
+ |
extends AttributeAccessorSCDtoOneVariable<Phone> { |
|
101 |
+ |
public AttributeAccessor_Owner() { |
119 |
102 |
|
super( "Owner", "Owner", true, Mutability.RW ); |
120 |
103 |
|
} |
121 |
104 |
|
|
122 |
105 |
|
@Override |
123 |
|
- |
public org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Phone> getValueHolder( Phone pPO ) |
124 |
|
- |
{ |
|
106 |
+ |
public org.litesoft.orsup.lazyload.LazyLoadToOneVariable<Phone> getValueHolder( Phone pPO ) { |
125 |
107 |
|
return pPO.mOwner; |
126 |
108 |
|
} |
127 |
109 |
|
|
128 |
110 |
|
@Override |
129 |
|
- |
public Object getValueOnPO( Phone pPO ) |
130 |
|
- |
{ |
|
111 |
+ |
public Object getValueOnPO( Phone pPO ) { |
131 |
112 |
|
return pPO.getOwner(); |
132 |
113 |
|
} |
133 |
114 |
|
} |
|
@@ -136,35 +117,29 @@ |
136 |
117 |
|
|
137 |
118 |
|
private String mPhoneNumber; |
138 |
119 |
|
|
139 |
|
- |
public String getPhoneNumber() |
140 |
|
- |
{ |
|
120 |
+ |
public String getPhoneNumber() { |
141 |
121 |
|
return mPhoneNumber; |
142 |
122 |
|
} |
143 |
123 |
|
|
144 |
|
- |
public void setPhoneNumber( String pPhoneNumber ) |
145 |
|
- |
{ |
|
124 |
+ |
public void setPhoneNumber( String pPhoneNumber ) { |
146 |
125 |
|
verifyMutability( CD_PhoneNumber, mPhoneNumber, pPhoneNumber ); |
147 |
126 |
|
mPhoneNumber = pPhoneNumber; |
148 |
127 |
|
} |
149 |
128 |
|
|
150 |
129 |
|
private static class AttributeAccessor_PhoneNumber |
151 |
|
- |
extends AttributeAccessorSCDsimplePersistedRegular<Phone> |
152 |
|
- |
{ |
153 |
|
- |
public AttributeAccessor_PhoneNumber() |
154 |
|
- |
{ |
|
130 |
+ |
extends AttributeAccessorSCDsimplePersistedRegular<Phone> { |
|
131 |
+ |
public AttributeAccessor_PhoneNumber() { |
155 |
132 |
|
super( "PhoneNumber", "PhoneNumber", true, _String.with( MaxLength.of( 40 ), // |
156 |
133 |
|
DisplayLength.of( 20 ) ) ); |
157 |
134 |
|
} |
158 |
135 |
|
|
159 |
136 |
|
@Override |
160 |
|
- |
public Object getValueOnPO( Phone pPO ) |
161 |
|
- |
{ |
|
137 |
+ |
public Object getValueOnPO( Phone pPO ) { |
162 |
138 |
|
return pPO.getPhoneNumber(); |
163 |
139 |
|
} |
164 |
140 |
|
|
165 |
141 |
|
@Override |
166 |
|
- |
public void setValueOnPO( Phone pPO, Object pValue ) |
167 |
|
- |
{ |
|
142 |
+ |
public void setValueOnPO( Phone pPO, Object pValue ) { |
168 |
143 |
|
pPO.setPhoneNumber( to_String( pValue ) ); |
169 |
144 |
|
} |
170 |
145 |
|
} |
|
@@ -173,34 +148,28 @@ |
173 |
148 |
|
|
174 |
149 |
|
private String mType; |
175 |
150 |
|
|
176 |
|
- |
public String getType() |
177 |
|
- |
{ |
|
151 |
+ |
public String getType() { |
178 |
152 |
|
return mType; |
179 |
153 |
|
} |
180 |
154 |
|
|
181 |
|
- |
public void setType( String pType ) |
182 |
|
- |
{ |
|
155 |
+ |
public void setType( String pType ) { |
183 |
156 |
|
verifyMutability( CD_Type, mType, pType ); |
184 |
157 |
|
mType = pType; |
185 |
158 |
|
} |
186 |
159 |
|
|
187 |
160 |
|
private static class AttributeAccessor_Type |
188 |
|
- |
extends AttributeAccessorSCDsimplePersistedRegular<Phone> |
189 |
|
- |
{ |
190 |
|
- |
public AttributeAccessor_Type() |
191 |
|
- |
{ |
|
161 |
+ |
extends AttributeAccessorSCDsimplePersistedRegular<Phone> { |
|
162 |
+ |
public AttributeAccessor_Type() { |
192 |
163 |
|
super( "Type", "Type", true, _OpenValidOptions.with( Options.of( sValidOptionsType ) ) ); |
193 |
164 |
|
} |
194 |
165 |
|
|
195 |
166 |
|
@Override |
196 |
|
- |
public Object getValueOnPO( Phone pPO ) |
197 |
|
- |
{ |
|
167 |
+ |
public Object getValueOnPO( Phone pPO ) { |
198 |
168 |
|
return pPO.getType(); |
199 |
169 |
|
} |
200 |
170 |
|
|
201 |
171 |
|
@Override |
202 |
|
- |
public void setValueOnPO( Phone pPO, Object pValue ) |
203 |
|
- |
{ |
|
172 |
+ |
public void setValueOnPO( Phone pPO, Object pValue ) { |
204 |
173 |
|
pPO.setType( to_String( pValue ) ); |
205 |
174 |
|
} |
206 |
175 |
|
} |
|
@@ -209,46 +178,38 @@ |
209 |
178 |
|
|
210 |
179 |
|
private Float mViewOrder; |
211 |
180 |
|
|
212 |
|
- |
public Float getViewOrder() |
213 |
|
- |
{ |
|
181 |
+ |
public Float getViewOrder() { |
214 |
182 |
|
return mViewOrder; |
215 |
183 |
|
} |
216 |
184 |
|
|
217 |
|
- |
public void setViewOrder( Float pViewOrder ) |
218 |
|
- |
{ |
|
185 |
+ |
public void setViewOrder( Float pViewOrder ) { |
219 |
186 |
|
verifyMutability( CD_ViewOrder, mViewOrder, pViewOrder ); |
220 |
187 |
|
mViewOrder = pViewOrder; |
221 |
188 |
|
} |
222 |
189 |
|
|
223 |
190 |
|
private static class AttributeAccessor_ViewOrder |
224 |
|
- |
extends AttributeAccessorSCDsimplePersistedRegular<Phone> |
225 |
|
- |
{ |
226 |
|
- |
public AttributeAccessor_ViewOrder() |
227 |
|
- |
{ |
|
191 |
+ |
extends AttributeAccessorSCDsimplePersistedRegular<Phone> { |
|
192 |
+ |
public AttributeAccessor_ViewOrder() { |
228 |
193 |
|
super( "ViewOrder", "ViewOrder", false, _Float.with( DisplayLength.of( 9 ) ) ); |
229 |
194 |
|
} |
230 |
195 |
|
|
231 |
196 |
|
@Override |
232 |
|
- |
public Object getValueOnPO( Phone pPO ) |
233 |
|
- |
{ |
|
197 |
+ |
public Object getValueOnPO( Phone pPO ) { |
234 |
198 |
|
return pPO.getViewOrder(); |
235 |
199 |
|
} |
236 |
200 |
|
|
237 |
201 |
|
@Override |
238 |
|
- |
public void setValueOnPO( Phone pPO, Object pValue ) |
239 |
|
- |
{ |
|
202 |
+ |
public void setValueOnPO( Phone pPO, Object pValue ) { |
240 |
203 |
|
pPO.setViewOrder( to_Float( pValue ) ); |
241 |
204 |
|
} |
242 |
205 |
|
} |
243 |
206 |
|
|
244 |
207 |
|
static class MyMetaData |
245 |
|
- |
extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<Phone> |
246 |
|
- |
{ |
|
208 |
+ |
extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<Phone> { |
247 |
209 |
|
public static final String OBJECT_NAME = "Phone"; |
248 |
210 |
|
public static final String TABLE_NAME = "Phone"; |
249 |
211 |
|
|
250 |
|
- |
MyMetaData() |
251 |
|
- |
{ |
|
212 |
+ |
MyMetaData() { |
252 |
213 |
|
super( OBJECT_NAME, TABLE_NAME, new AttributeAccessorKeySet( CD_ID ), // |
253 |
214 |
|
|
254 |
215 |
|
CD_RecordVersion, /* .. */ |
|
@@ -266,32 +227,27 @@ |
266 |
227 |
|
} |
267 |
228 |
|
|
268 |
229 |
|
@Override |
269 |
|
- |
public Class getPOclass() |
270 |
|
- |
{ |
|
230 |
+ |
public Class getPOclass() { |
271 |
231 |
|
return Phone.class; |
272 |
232 |
|
} |
273 |
233 |
|
|
274 |
234 |
|
@Override |
275 |
|
- |
public Phone createNew( Transaction pTransaction ) |
276 |
|
- |
{ |
|
235 |
+ |
public Phone createNew( Transaction pTransaction ) { |
277 |
236 |
|
return new Phone( pTransaction ); |
278 |
237 |
|
} |
279 |
238 |
|
|
280 |
239 |
|
@Override |
281 |
|
- |
public Phone createPOfromFinder() |
282 |
|
- |
{ |
|
240 |
+ |
public Phone createPOfromFinder() { |
283 |
241 |
|
return new Phone( CONSTRUCTION_CONTROL ); |
284 |
242 |
|
} |
285 |
243 |
|
|
286 |
244 |
|
@Override |
287 |
|
- |
public String getDisplayValueFormat() |
288 |
|
- |
{ |
|
245 |
+ |
public String getDisplayValueFormat() { |
289 |
246 |
|
return "${PhoneNumber}"; |
290 |
247 |
|
} |
291 |
248 |
|
|
292 |
249 |
|
@Override |
293 |
|
- |
public String getRecordVersionAttributeName() |
294 |
|
- |
{ |
|
250 |
+ |
public String getRecordVersionAttributeName() { |
295 |
251 |
|
return CD_RecordVersion.getName(); |
296 |
252 |
|
} |
297 |
253 |
|
} |