private String version;
private String className;
private String jarFileName;
+ private String type;
private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
/**
* @param className
* @param jarFileName
*/
- public JDBCDriver(String className, String jarFileName) {
- super();
- this.className = className;
- this.jarFileName = jarFileName;
+ public JDBCDriver(String className, String jarFileName, String type) {
+ this(className, jarFileName, type, null, null);
}
/**
*
* @param name
* @param version
*/
- public JDBCDriver(String className, String jarFileName, String name, String version) {
+ public JDBCDriver(String className, String jarFileName, String type, String name, String version) {
this.name = name;
this.version = version;
+ this.type = type;
this.className = className;
this.jarFileName = jarFileName;
}
return false;
} else if (this.jarFileName != null && !this.jarFileName.equals(that.jarFileName)) {
return false;
+ } else if (this.type == null && that.type != null) {
+ return false;
+ } else if (this.type != null && !this.type.equals(that.type)) {
+ return false;
} else {
return true;
}
if (this.jarFileName != null) {
hashCode ^= this.jarFileName.hashCode();
}
+ if (this.type != null) {
+ hashCode ^= this.type.hashCode();
+ }
return hashCode;
}
public void removePropertyChangeListener(String arg0, PropertyChangeListener arg1) {
this.propertyChangeSupport.removePropertyChangeListener(arg0, arg1);
}
+ /**
+ * @return Returns the type.
+ */
+ public String getType() {
+ return this.type;
+ }
+ /**
+ * @param type The type to set.
+ */
+ public void setType(String type) {
+ if (type != null && !type.equals(this.type)) {
+ String original = this.type;
+ this.type = type;
+ this.propertyChangeSupport.firePropertyChange("type", original, type);
+ }
+ }
}