public boolean equals(Object obj) { if (obj instanceof ProcIdentifierImpl) { ProcIdentifierImpl p = (ProcIdentifierImpl) obj; boolean e = getDatabaseIdentifier().equals(p.getDatabaseIdentifier()) && (getType() == p.getType()) && propertyMap.equals(p.propertyMap); return e; } return false; }
/** * Returns whether the given object equals to this ProcIdentifier object. * If the profile names are different, the comparison will base on the * server url. * @param obj * @return */ public boolean equalsByServer(Object obj) { if (obj instanceof ProcIdentifierImpl) { ProcIdentifierImpl p = (ProcIdentifierImpl) obj; boolean e = getDatabaseIdentifier().equals(p.getDatabaseIdentifier()); if (! e) { ServerIdentifier si1 = ProfileUtil.getServerIdentifier(getDatabaseIdentifier()); ServerIdentifier si2 = ProfileUtil.getServerIdentifier(p.getDatabaseIdentifier()); e = si1.equals(si2); } e = e && (getType() == p.getType()) && propertyMap.equals(p.propertyMap); return e; } return false; }