예제 #1
0
 private int computeHashCode() {
   int result = alias.hashCode();
   for (Property id : ids) {
     result = 29 * result + id.getStringValue().hashCode();
   }
   return result;
 }
예제 #2
0
 public String buildUID() throws CompassException {
   StringBuilder sb = new StringBuilder();
   sb.append(getAlias()).append(SEPARATOR);
   for (Property idProp : getIds()) {
     String idValue = idProp.getStringValue();
     if (idValue == null) {
       throw new CompassException(
           "Missing id [" + idProp.getName() + "] for alias [" + getAlias() + "]");
     }
     sb.append(idValue);
     sb.append(SEPARATOR);
   }
   return sb.toString();
 }