/
DriverDefinition.java
149 lines (135 loc) · 3.4 KB
/
DriverDefinition.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/*******************************************************************************
* Copyright (c) 2017 Red Hat, Inc and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat, Inc - initial API and implementation
*******************************************************************************/
package org.eclipse.reddeer.eclipse.datatools.ui;
/**
* Driver Definition.
*
* @author apodhrad
*
*/
public class DriverDefinition {
private String driverName;
private String driverLibrary;
private String driverClass;
private DriverTemplate driverTemplate;
/**
* Gets the driver name.
*
* @return the driver name
*/
public String getDriverName() {
return driverName;
}
/**
* Sets the driver name.
*
* @param driverName the new driver name
*/
public void setDriverName(String driverName) {
this.driverName = driverName;
}
/**
* Sets the driver library.
*
* @param driverLibrary the new driver library
*/
public void setDriverLibrary(String driverLibrary) {
this.driverLibrary = driverLibrary;
}
/**
* Sets the driver template.
*
* @param driverTemplate the new driver template
*/
public void setDriverTemplate(DriverTemplate driverTemplate) {
this.driverTemplate = driverTemplate;
}
/**
* Gets the driver library.
*
* @return the driver library
*/
public String getDriverLibrary() {
return driverLibrary;
}
/**
* Gets the driver class.
*
* @return the driver class
*/
public String getDriverClass() {
return driverClass;
}
/**
* Sets the driver class.
*
* @param driverClass the new driver class
*/
public void setDriverClass(String driverClass) {
this.driverClass = driverClass;
}
/**
* Gets the driver template.
*
* @return the driver template
*/
public DriverTemplate getDriverTemplate() {
return driverTemplate;
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((driverClass == null) ? 0 : driverClass.hashCode());
result = prime * result + ((driverLibrary == null) ? 0 : driverLibrary.hashCode());
result = prime * result + ((driverName == null) ? 0 : driverName.hashCode());
result = prime * result + ((driverTemplate == null) ? 0 : driverTemplate.hashCode());
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
DriverDefinition other = (DriverDefinition) obj;
if (driverClass == null) {
if (other.driverClass != null)
return false;
} else if (!driverClass.equals(other.driverClass))
return false;
if (driverLibrary == null) {
if (other.driverLibrary != null)
return false;
} else if (!driverLibrary.equals(other.driverLibrary))
return false;
if (driverName == null) {
if (other.driverName != null)
return false;
} else if (!driverName.equals(other.driverName))
return false;
if (driverTemplate == null) {
if (other.driverTemplate != null)
return false;
} else if (!driverTemplate.equals(other.driverTemplate))
return false;
return true;
}
}