1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.model;
15
16 import java.util.Objects;
17
18 public class InsertFromJNDIModel extends Model {
19
20 private static final long serialVersionUID = -7803377963650426197L;
21
22 public static final String ENV_ENTRY_NAME_ATTR = "env-entry-name";
23 public static final String AS_ATTR = "as";
24
25 String as;
26 String envEntryName;
27 String scopeStr;
28
29 @Override
30 protected InsertFromJNDIModel makeNewInstance() {
31 return new InsertFromJNDIModel();
32 }
33
34 @Override
35 protected void mirror(Model that) {
36 InsertFromJNDIModel actual = (InsertFromJNDIModel) that;
37 super.mirror(actual);
38 this.as = actual.as;
39 this.envEntryName = actual.envEntryName;
40 this.scopeStr = actual.scopeStr;
41 }
42
43
44 public String getScopeStr() {
45 return scopeStr;
46 }
47
48 public void setScopeStr(String scopeStr) {
49 this.scopeStr = scopeStr;
50 }
51
52 public String getAs() {
53 return as;
54 }
55
56 public void setAs(String as) {
57 this.as = as;
58 }
59
60 public String getEnvEntryName() {
61 return envEntryName;
62 }
63
64 public void setEnvEntryName(String envEntryName) {
65 this.envEntryName = envEntryName;
66 }
67
68 @Override
69 public int hashCode() {
70 final int prime = 31;
71 int result = super.hashCode();
72 result = prime * result + Objects.hash(as, envEntryName, scopeStr);
73 return result;
74 }
75
76 @Override
77 public boolean equals(Object obj) {
78 if (this == obj)
79 return true;
80 if (!super.equals(obj))
81 return false;
82 if (getClass() != obj.getClass())
83 return false;
84 InsertFromJNDIModel other = (InsertFromJNDIModel) obj;
85 return Objects.equals(as, other.as) && Objects.equals(envEntryName, other.envEntryName)
86 && Objects.equals(scopeStr, other.scopeStr);
87 }
88
89 }