comparison artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java @ 47:4ae4dc99127d

Removed trailing whitespace. artifacts/trunk@167 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 01 Oct 2009 09:04:17 +0000
parents f2648672c9c4
children f69e5b87f05f
comparison
equal deleted inserted replaced
46:f2648672c9c4 47:4ae4dc99127d
54 { 54 {
55 private Artifact artifact; 55 private Artifact artifact;
56 private ArtifactSerializer serializer; 56 private ArtifactSerializer serializer;
57 57
58 public PersistentArtifact( 58 public PersistentArtifact(
59 Artifact artifact, 59 Artifact artifact,
60 ArtifactSerializer serializer, 60 ArtifactSerializer serializer,
61 int id 61 int id
62 ) { 62 ) {
63 super(id); 63 super(id);
64 this.artifact = artifact; 64 this.artifact = artifact;
111 111
112 public PersistentArtifact storeInitially( 112 public PersistentArtifact storeInitially(
113 Artifact artifact, 113 Artifact artifact,
114 ArtifactFactory factory, 114 ArtifactFactory factory,
115 Long ttl 115 Long ttl
116 ) 116 )
117 throws Exception 117 throws Exception
118 { 118 {
119 return new PersistentArtifact( 119 return new PersistentArtifact(
120 artifact, 120 artifact,
121 factory.getSerializer(), 121 factory.getSerializer(),
122 insertDatabase(artifact, factory, ttl)); 122 insertDatabase(artifact, factory, ttl));
123 } 123 }
124 124
125 public PersistentArtifact getArtifact(String identifer) { 125 public PersistentArtifact getArtifact(String identifer) {
126 126
127 try { 127 try {
128 UUID.fromString(identifer); 128 UUID.fromString(identifer);
129 } 129 }
196 if (stmnt_load != null) { 196 if (stmnt_load != null) {
197 try { load_result.close(); } 197 try { load_result.close(); }
198 catch (SQLException sqle) {} 198 catch (SQLException sqle) {}
199 } 199 }
200 if (connection != null) { 200 if (connection != null) {
201 try { connection.close(); } 201 try { connection.close(); }
202 catch (SQLException sqle) {} 202 catch (SQLException sqle) {}
203 } 203 }
204 } 204 }
205 return null; 205 return null;
206 } 206 }
229 229
230 return serializer.fromBytes(bytes); 230 return serializer.fromBytes(bytes);
231 } 231 }
232 232
233 protected int insertDatabase( 233 protected int insertDatabase(
234 Artifact artifact, 234 Artifact artifact,
235 ArtifactFactory factory, 235 ArtifactFactory factory,
236 Long ttl 236 Long ttl
237 ) { 237 ) {
238 String uuid = artifact.identifier(); 238 String uuid = artifact.identifier();
239 239

http://dive4elements.wald.intevation.org