Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/ToLoad.java @ 822:ffb98b228b3c
Add code to extract data to load from datacage tree.
flys-client/trunk@2493 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 12 Aug 2011 15:51:51 +0000 |
parents | |
children | 2f65c742803f |
comparison
equal
deleted
inserted
replaced
821:56069d236afa | 822:ffb98b228b3c |
---|---|
1 package de.intevation.flys.client.shared.model; | |
2 | |
3 import java.io.Serializable; | |
4 | |
5 public class ToLoad implements Serializable | |
6 { | |
7 protected String artifactId; | |
8 protected String ids; | |
9 protected String factory; | |
10 protected String num; | |
11 | |
12 public ToLoad() { | |
13 } | |
14 | |
15 public ToLoad( | |
16 String factory, | |
17 String artifactId, | |
18 String ids, | |
19 String num | |
20 ) { | |
21 this.factory = factory; | |
22 this.artifactId = artifactId; | |
23 this.ids = ids; | |
24 this.num = num; | |
25 } | |
26 | |
27 public String getArtifactId() { | |
28 return artifactId; | |
29 } | |
30 | |
31 public void setArtifactId(String artifactId) { | |
32 this.artifactId = artifactId; | |
33 } | |
34 | |
35 public String getIds() { | |
36 return ids; | |
37 } | |
38 | |
39 public void setIds(String ids) { | |
40 this.ids = ids; | |
41 } | |
42 | |
43 public String getFactory() { | |
44 return factory; | |
45 } | |
46 | |
47 public void setFactory(String factory) { | |
48 this.factory = factory; | |
49 } | |
50 | |
51 public String getNum() { | |
52 return num; | |
53 } | |
54 | |
55 public void setNum(String num) { | |
56 this.num = num; | |
57 } | |
58 | |
59 private static final boolean equals(String a, String b) { | |
60 if ((a == null && b != null) || (a != null && b == null)) { | |
61 return false; | |
62 } | |
63 return (a == null && b == null) || a.equals(b); | |
64 } | |
65 | |
66 @Override | |
67 public boolean equals(Object other) { | |
68 if (!(other instanceof ToLoad)) { | |
69 return false; | |
70 } | |
71 ToLoad o = (ToLoad)other; | |
72 return equals(factory, o.factory) | |
73 && equals(artifactId, o.artifactId) | |
74 && equals(ids, o.ids) | |
75 && equals(num, o.num); | |
76 } | |
77 | |
78 public String toString() { | |
79 StringBuilder sb = new StringBuilder("[") | |
80 .append("factory='").append(factory).append("', artifactId='") | |
81 .append(artifactId).append("', ids='").append(ids) | |
82 .append("', num='").append(num).append("']"); | |
83 return sb.toString(); | |
84 } | |
85 } | |
86 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |