Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Datacage.java @ 8856:5e38e2924c07 3.2.x
Fix code style.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 18 Jan 2018 20:12:01 +0100 |
parents | 5077fc1ace1c |
children | 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
8855:d7c005e12af0 | 8856:5e38e2924c07 |
---|---|
260 final String collectionId, | 260 final String collectionId, |
261 final Integer ownerId, | 261 final Integer ownerId, |
262 final String collectionName, | 262 final String collectionName, |
263 final Date collectionCreated | 263 final Date collectionCreated |
264 ) { | 264 ) { |
265 Integer c = getId(collections, collectionId, SQL_COLLECTION_BY_GID); | 265 Integer c = getId( |
266 collections, collectionId, SQL_COLLECTION_BY_GID); | |
266 | 267 |
267 if (c != null) { | 268 if (c != null) { |
268 return c; | 269 return c; |
269 } | 270 } |
270 | 271 |
283 prepareStatement(SQL_INSERT_COLLECTION); | 284 prepareStatement(SQL_INSERT_COLLECTION); |
284 stmnt.setInt (1, res[0]); | 285 stmnt.setInt (1, res[0]); |
285 stmnt.setString(2, collectionId); | 286 stmnt.setString(2, collectionId); |
286 stmnt.setInt (3, ownerId); | 287 stmnt.setInt (3, ownerId); |
287 setString(stmnt, 4, collectionName); | 288 setString(stmnt, 4, collectionName); |
288 Timestamp timestamp = new Timestamp(collectionCreated != null | 289 Timestamp timestamp = |
289 ? collectionCreated.getTime() | 290 new Timestamp(collectionCreated != null |
290 : System.currentTimeMillis()); | 291 ? collectionCreated.getTime() |
292 : System.currentTimeMillis()); | |
291 stmnt.setTimestamp(5, timestamp); | 293 stmnt.setTimestamp(5, timestamp); |
292 stmnt.execute(); | 294 stmnt.execute(); |
293 conn.commit(); | 295 conn.commit(); |
294 return true; | 296 return true; |
295 } | 297 } |
502 log.warn("artifact to create is null"); | 504 log.warn("artifact to create is null"); |
503 return; | 505 return; |
504 } | 506 } |
505 | 507 |
506 if (!(artifact instanceof D4EArtifact)) { | 508 if (!(artifact instanceof D4EArtifact)) { |
507 log.warn("need D4EArtifact here (have " + artifact.getClass() + ")"); | 509 log.warn("need D4EArtifact here (have " |
510 + artifact.getClass() + ")"); | |
508 return; | 511 return; |
509 } | 512 } |
510 | 513 |
511 final D4EArtifact flys = (D4EArtifact)artifact; | 514 final D4EArtifact flys = (D4EArtifact)artifact; |
512 | 515 |
549 Backend backend, | 552 Backend backend, |
550 GlobalContext context | 553 GlobalContext context |
551 ) { | 554 ) { |
552 log.debug("storedArtifact"); | 555 log.debug("storedArtifact"); |
553 if (!(artifact instanceof D4EArtifact)) { | 556 if (!(artifact instanceof D4EArtifact)) { |
554 log.warn("need D4EArtifact here but have a " + artifact.getClass()); | 557 log.warn("need D4EArtifact here but have a " |
558 + artifact.getClass()); | |
555 return; | 559 return; |
556 } | 560 } |
557 | 561 |
558 final D4EArtifact flys = (D4EArtifact)artifact; | 562 final D4EArtifact flys = (D4EArtifact)artifact; |
559 | 563 |
903 return true; | 907 return true; |
904 } | 908 } |
905 }; | 909 }; |
906 | 910 |
907 if (!exec.runWrite()) { | 911 if (!exec.runWrite()) { |
908 log.error("storing state of artifact failed ("+artifactId+","+artifact.getCurrentStateId()+")"); | 912 log.error("storing state of artifact failed (" |
913 + artifactId + "," + artifact.getCurrentStateId() + ")"); | |
909 } | 914 } |
910 } | 915 } |
911 | 916 |
912 protected void storeData( | 917 protected void storeData( |
913 final int artifactId, | 918 final int artifactId, |