Subversion Repository Public Repository

litesoft

Diff Revisions 2 vs 24 for /trunk/Java/core/Server/src/org/litesoft/orsup/nonpublic/Blob.java

Diff revisions: vs.
  @@ -36,6 +36,7 @@
36 36 super( MyMetaData.INSTANCE, CONSTRUCTION_CONTROL, pConstructionControl );
37 37 }
38 38
39 + @Override
39 40 protected void transactionDisposed()
40 41 {
41 42 if ( isStreamOpen() )
  @@ -49,6 +50,7 @@
49 50 super.transactionDisposed();
50 51 }
51 52
53 + @Override
52 54 public Serializable aboutToCommit( Timestamp pTransactionTimestamp )
53 55 {
54 56 if ( isStreamOpen() )
  @@ -62,6 +64,7 @@
62 64 return super.aboutToCommit( pTransactionTimestamp );
63 65 }
64 66
67 + @Override
65 68 protected void justDeletedInTransaction( DBconnection pDBconnection )
66 69 {
67 70 if ( hasParts() )
  @@ -93,11 +96,13 @@
93 96 super( "ID", "id", true, _Long );
94 97 }
95 98
99 + @Override
96 100 public Object getValueOnPO( Blob pPO )
97 101 {
98 102 return pPO.getID();
99 103 }
100 104
105 + @Override
101 106 public void db_setValueOnPO( Blob pPO, Object pValue )
102 107 {
103 108 pPO.LLsetID( to_Long( pValue ) );
  @@ -113,6 +118,7 @@
113 118 *
114 119 * @return Actual Size or -1 if not readable
115 120 */
121 + @Override
116 122 public long getSizeInBytes()
117 123 {
118 124 return (mSizeInBytes == null) ? -1 : mSizeInBytes;
  @@ -137,11 +143,13 @@
137 143 super( "SizeInBytes", "SizeInBytes", true, _Long );
138 144 }
139 145
146 + @Override
140 147 public Object getValueOnPO( Blob pPO )
141 148 {
142 149 return pPO.getSizeInBytes();
143 150 }
144 151
152 + @Override
145 153 public void db_setValueOnPO( Blob pPO, Object pValue )
146 154 {
147 155 pPO.LLsetSizeInBytes( to_long( pValue ) );
  @@ -161,21 +169,25 @@
161 169 CD_ID, CD_SizeInBytes );
162 170 }
163 171
172 + @Override
164 173 public Class getPOclass()
165 174 {
166 175 return Blob.class;
167 176 }
168 177
178 + @Override
169 179 public Blob createNew( Transaction pTransaction )
170 180 {
171 181 return new Blob( pTransaction );
172 182 }
173 183
184 + @Override
174 185 public Blob createPOfromFinder()
175 186 {
176 187 return new Blob( CONSTRUCTION_CONTROL );
177 188 }
178 189
190 + @Override
179 191 public String getDisplayValueFormat()
180 192 {
181 193 return "${ID}";
  @@ -220,11 +232,13 @@
220 232 getFinder().getPersistenceHelper().deleteRows( pDBconnection, Parts4Blobs.MyMetaData.INSTANCE, wc );
221 233 }
222 234
235 + @Override
223 236 public boolean isReadable()
224 237 {
225 238 return (getSizeInBytes() >= 0) && !isStreamOpen();
226 239 }
227 240
241 + @Override
228 242 public boolean isWritable()
229 243 {
230 244 return (getSizeInBytes() < 0) && !isStreamOpen() && isNew();
  @@ -237,6 +251,7 @@
237 251 * @throws MissingResourceException - if resource not found
238 252 * @throws IOException - any other IOException
239 253 */
254 + @Override
240 255 public InputStream readOpen()
241 256 throws IllegalStateException, MissingResourceException, IOException
242 257 {
  @@ -260,6 +275,7 @@
260 275 * @throws IllegalStateException - if something required for writing is missing
261 276 * @throws IOException - any other IOException
262 277 */
278 + @Override
263 279 public OutputStream writeOpen()
264 280 throws UnsupportedOperationException, IllegalStateException, IOException
265 281 {
  @@ -284,12 +300,14 @@
284 300
285 301 private class NoPartsInputStream extends InputStream
286 302 {
303 + @Override
287 304 public int read()
288 305 throws IOException
289 306 {
290 307 return -1;
291 308 }
292 309
310 + @Override
293 311 public void close()
294 312 throws IOException
295 313 {
  @@ -357,6 +375,7 @@
357 375 }
358 376 }
359 377
378 + @Override
360 379 public int read()
361 380 throws IOException
362 381 {
  @@ -388,6 +407,7 @@
388 407 return -1;
389 408 }
390 409
410 + @Override
391 411 public void close()
392 412 throws IOException
393 413 {
  @@ -405,6 +425,7 @@
405 425 }
406 426 }
407 427
428 + @Override
408 429 protected void finalize()
409 430 throws Throwable
410 431 {
  @@ -431,6 +452,7 @@
431 452 mNextWriteOffset = 0;
432 453 }
433 454
455 + @Override
434 456 public void write( int b )
435 457 throws IOException
436 458 {
  @@ -442,6 +464,7 @@
442 464 bufWrite( b );
443 465 }
444 466
467 + @Override
445 468 public void flush()
446 469 throws IOException
447 470 {
  @@ -476,6 +499,7 @@
476 499 }
477 500 }
478 501
502 + @Override
479 503 public void close()
480 504 throws IOException
481 505 {