@Override public String toString() { return toFullID(); }
private Map<String, Object> populatePropertiesWithRequiredAttributes( final Map<String, Object> properties, ConnectorId id) { Map<String, Object> result = new HashMap<String, Object>(properties); for (Entry<String, Object> entry : properties.entrySet()) { result.put(entry.getKey(), entry.getValue()); } result.put(Constants.DOMAIN_KEY, id.getDomainType()); result.put(Constants.CONNECTOR_KEY, id.getConnectorType()); result.put(Constants.ID_KEY, id.toFullID()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() == obj.getClass()) { ConnectorId other = (ConnectorId) obj; return equals(other); } if (Map.class.isInstance(obj)) { Map<?, ?> metadata = (Map<?, ?>) obj; return toMetaData().equals(metadata); } if (obj instanceof String) { return toFullID().equals(obj); } return false; }