Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/GWT_Sandbox/Prioritizer/src/org/litesoft/prioritizer/server/pos/DocumentReferenceGO.java

Diff revisions: vs.
  @@ -9,25 +9,21 @@
9 9
10 10 public abstract class DocumentReferenceGO
11 11 extends org.litesoft.orsup.nonpublic.PersistentObjectImpl<DocumentReference>
12 - implements HasAttributes
13 - {
12 + implements HasAttributes {
14 13 private static final ConstructionControl CONSTRUCTION_CONTROL = new ConstructionControl();
15 14
16 - public static SimpleFromIdentifier from()
17 - {
15 + public static SimpleFromIdentifier from() {
18 16 return DocumentReferenceMetaData.INSTANCE;
19 17 }
20 18
21 - protected DocumentReferenceGO( Transaction pTransaction )
22 - {
19 + protected DocumentReferenceGO( Transaction pTransaction ) {
23 20 super( DocumentReferenceMetaData.INSTANCE, pTransaction );
24 21 mID = getNextSequenceNumber( getClass() );
25 22 registerWithTransaction();
26 23 setDefaults();
27 24 }
28 25
29 - protected DocumentReferenceGO( ConstructionControl pConstructionControl )
30 - {
26 + protected DocumentReferenceGO( ConstructionControl pConstructionControl ) {
31 27 super( DocumentReferenceMetaData.INSTANCE, CONSTRUCTION_CONTROL, pConstructionControl );
32 28 }
33 29
  @@ -35,22 +31,18 @@
35 31
36 32 protected final RecordVersionHelper mRecordVersion = new RecordVersionHelper();
37 33
38 - public Long getRecordVersion()
39 - {
34 + public Long getRecordVersion() {
40 35 return mRecordVersion.getRecordVersion();
41 36 }
42 37
43 38 private static class AttributeAccessor_RecordVersion
44 - extends AttributeAccessorSCD_RecordVersion<DocumentReference>
45 - {
46 - public AttributeAccessor_RecordVersion()
47 - {
39 + extends AttributeAccessorSCD_RecordVersion<DocumentReference> {
40 + public AttributeAccessor_RecordVersion() {
48 41 super( "RecordVersion", "RecordVersion" );
49 42 }
50 43
51 44 @Override
52 - protected RecordVersionHelper getRecordVersionHelper( DocumentReference pPO )
53 - {
45 + protected RecordVersionHelper getRecordVersionHelper( DocumentReference pPO ) {
54 46 return pPO.mRecordVersion;
55 47 }
56 48 }
  @@ -59,35 +51,29 @@
59 51
60 52 private Long mID;
61 53
62 - public Long getID()
63 - {
54 + public Long getID() {
64 55 return mID;
65 56 }
66 57
67 - protected void LLsetID( Long pID )
68 - {
58 + protected void LLsetID( Long pID ) {
69 59 verifyMutability( CD_ID, mID, pID );
70 60 mID = pID;
71 61 }
72 62
73 63 private static class AttributeAccessor_ID
74 64 extends AttributeAccessorSCDsimplePersistedSysSetOnly<DocumentReference>
75 - implements NonImportableFeature
76 - {
77 - public AttributeAccessor_ID()
78 - {
65 + implements NonImportableFeature {
66 + public AttributeAccessor_ID() {
79 67 super( "ID", "ID", false, _Long.AddOnly() );
80 68 }
81 69
82 70 @Override
83 - public Object getValueOnPO( DocumentReference pPO )
84 - {
71 + public Object getValueOnPO( DocumentReference pPO ) {
85 72 return pPO.getID();
86 73 }
87 74
88 75 @Override
89 - public void db_setValueOnPO( DocumentReference pPO, Object pValue )
90 - {
76 + public void db_setValueOnPO( DocumentReference pPO, Object pValue ) {
91 77 pPO.LLsetID( to_Long( pValue ) );
92 78 }
93 79 }
  @@ -96,35 +82,29 @@
96 82
97 83 private String mDescription;
98 84
99 - public String getDescription()
100 - {
85 + public String getDescription() {
101 86 return mDescription;
102 87 }
103 88
104 - public void setDescription( String pDescription )
105 - {
89 + public void setDescription( String pDescription ) {
106 90 verifyMutability( CD_Description, mDescription, pDescription );
107 91 mDescription = pDescription;
108 92 }
109 93
110 94 private static class AttributeAccessor_Description
111 - extends AttributeAccessorSCDsimplePersistedRegular<DocumentReference>
112 - {
113 - public AttributeAccessor_Description()
114 - {
95 + extends AttributeAccessorSCDsimplePersistedRegular<DocumentReference> {
96 + public AttributeAccessor_Description() {
115 97 super( "Description", "Description", false, _Text.with( DisplayWidthInitial.of( 40 ), //
116 98 DisplayHeightInitial.of( 4 ) ) );
117 99 }
118 100
119 101 @Override
120 - public Object getValueOnPO( DocumentReference pPO )
121 - {
102 + public Object getValueOnPO( DocumentReference pPO ) {
122 103 return pPO.getDescription();
123 104 }
124 105
125 106 @Override
126 - public void setValueOnPO( DocumentReference pPO, Object pValue )
127 - {
107 + public void setValueOnPO( DocumentReference pPO, Object pValue ) {
128 108 pPO.setDescription( to_String( pValue ) );
129 109 }
130 110 }
  @@ -136,35 +116,29 @@
136 116 /**
137 117 * GeorgeToDo: Blob
138 118 */
139 - public String getDocument()
140 - {
119 + public String getDocument() {
141 120 return mDocument;
142 121 }
143 122
144 - public void setDocument( String pDocument )
145 - {
123 + public void setDocument( String pDocument ) {
146 124 verifyMutability( CD_Document, mDocument, pDocument );
147 125 mDocument = pDocument;
148 126 }
149 127
150 128 private static class AttributeAccessor_Document
151 - extends AttributeAccessorSCDsimplePersistedRegular<DocumentReference>
152 - {
153 - public AttributeAccessor_Document()
154 - {
129 + extends AttributeAccessorSCDsimplePersistedRegular<DocumentReference> {
130 + public AttributeAccessor_Document() {
155 131 super( "Document", "Document", true, _String.with( MaxLength.of( 40 ), //
156 132 DisplayLength.of( 20 ) ) );
157 133 }
158 134
159 135 @Override
160 - public Object getValueOnPO( DocumentReference pPO )
161 - {
136 + public Object getValueOnPO( DocumentReference pPO ) {
162 137 return pPO.getDocument();
163 138 }
164 139
165 140 @Override
166 - public void setValueOnPO( DocumentReference pPO, Object pValue )
167 - {
141 + public void setValueOnPO( DocumentReference pPO, Object pValue ) {
168 142 pPO.setDocument( to_String( pValue ) );
169 143 }
170 144 }
  @@ -176,34 +150,28 @@
176 150 /**
177 151 * Used for ease of docuemnt removal|ToDo: Implement tracking and autodeletion in code.
178 152 */
179 - public Integer getNumberOfOwners()
180 - {
153 + public Integer getNumberOfOwners() {
181 154 return mNumberOfOwners;
182 155 }
183 156
184 - public void setNumberOfOwners( Integer pNumberOfOwners )
185 - {
157 + public void setNumberOfOwners( Integer pNumberOfOwners ) {
186 158 verifyMutability( CD_NumberOfOwners, mNumberOfOwners, pNumberOfOwners );
187 159 mNumberOfOwners = pNumberOfOwners;
188 160 }
189 161
190 162 private static class AttributeAccessor_NumberOfOwners
191 - extends AttributeAccessorSCDsimplePersistedRegular<DocumentReference>
192 - {
193 - public AttributeAccessor_NumberOfOwners()
194 - {
163 + extends AttributeAccessorSCDsimplePersistedRegular<DocumentReference> {
164 + public AttributeAccessor_NumberOfOwners() {
195 165 super( "NumberOfOwners", "NumberOfOwners", false, _Integer.with( DisplayLength.of( 10 ) ) );
196 166 }
197 167
198 168 @Override
199 - public Object getValueOnPO( DocumentReference pPO )
200 - {
169 + public Object getValueOnPO( DocumentReference pPO ) {
201 170 return pPO.getNumberOfOwners();
202 171 }
203 172
204 173 @Override
205 - public void setValueOnPO( DocumentReference pPO, Object pValue )
206 - {
174 + public void setValueOnPO( DocumentReference pPO, Object pValue ) {
207 175 pPO.setNumberOfOwners( to_Integer( pValue ) );
208 176 }
209 177 }
  @@ -212,47 +180,39 @@
212 180
213 181 private String mOriginalFileName;
214 182
215 - public String getOriginalFileName()
216 - {
183 + public String getOriginalFileName() {
217 184 return mOriginalFileName;
218 185 }
219 186
220 - public void setOriginalFileName( String pOriginalFileName )
221 - {
187 + public void setOriginalFileName( String pOriginalFileName ) {
222 188 verifyMutability( CD_OriginalFileName, mOriginalFileName, pOriginalFileName );
223 189 mOriginalFileName = pOriginalFileName;
224 190 }
225 191
226 192 private static class AttributeAccessor_OriginalFileName
227 - extends AttributeAccessorSCDsimplePersistedRegular<DocumentReference>
228 - {
229 - public AttributeAccessor_OriginalFileName()
230 - {
193 + extends AttributeAccessorSCDsimplePersistedRegular<DocumentReference> {
194 + public AttributeAccessor_OriginalFileName() {
231 195 super( "OriginalFileName", "OriginalFileName", false, _String.with( MaxLength.of( 40 ), //
232 196 DisplayLength.of( 20 ) ) );
233 197 }
234 198
235 199 @Override
236 - public Object getValueOnPO( DocumentReference pPO )
237 - {
200 + public Object getValueOnPO( DocumentReference pPO ) {
238 201 return pPO.getOriginalFileName();
239 202 }
240 203
241 204 @Override
242 - public void setValueOnPO( DocumentReference pPO, Object pValue )
243 - {
205 + public void setValueOnPO( DocumentReference pPO, Object pValue ) {
244 206 pPO.setOriginalFileName( to_String( pValue ) );
245 207 }
246 208 }
247 209
248 210 static class MyMetaData
249 - extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<DocumentReference>
250 - {
211 + extends org.litesoft.orsup.nonpublic.PersistentObjectImplMetaData<DocumentReference> {
251 212 public static final String OBJECT_NAME = "DocumentReference";
252 213 public static final String TABLE_NAME = "DocumentReference";
253 214
254 - MyMetaData()
255 - {
215 + MyMetaData() {
256 216 super( OBJECT_NAME, TABLE_NAME, new AttributeAccessorKeySet( CD_ID ), //
257 217
258 218 CD_RecordVersion, /* ..... */
  @@ -267,32 +227,27 @@
267 227 }
268 228
269 229 @Override
270 - public Class getPOclass()
271 - {
230 + public Class getPOclass() {
272 231 return DocumentReference.class;
273 232 }
274 233
275 234 @Override
276 - public DocumentReference createNew( Transaction pTransaction )
277 - {
235 + public DocumentReference createNew( Transaction pTransaction ) {
278 236 return new DocumentReference( pTransaction );
279 237 }
280 238
281 239 @Override
282 - public DocumentReference createPOfromFinder()
283 - {
240 + public DocumentReference createPOfromFinder() {
284 241 return new DocumentReference( CONSTRUCTION_CONTROL );
285 242 }
286 243
287 244 @Override
288 - public String getDisplayValueFormat()
289 - {
245 + public String getDisplayValueFormat() {
290 246 return "${OriginalFileName}";
291 247 }
292 248
293 249 @Override
294 - public String getRecordVersionAttributeName()
295 - {
250 + public String getRecordVersionAttributeName() {
296 251 return CD_RecordVersion.getName();
297 252 }
298 253 }