@Override protected void propertySet(String propertyName, Object newValue, boolean quiet) { switch (propertyName.hashCode()) { case 90495162: // objectId setObjectId((ObjectId) newValue); return; case -1699764666: // externalId setExternalId((ExternalIdBundle) newValue); return; } super.propertySet(propertyName, newValue, quiet); }
/** * Creates a link from an external identifier bundle. * * @param bundle the identifier bundle, not null */ protected AbstractLink(final ExternalIdBundle bundle) { ArgumentChecker.notNull(bundle, "bundle"); setExternalId(bundle); }
/** * Creates a link from an external identifier. * * @param externalId the external identifier, not null */ protected AbstractLink(final ExternalId externalId) { ArgumentChecker.notNull(externalId, "externalId"); setExternalId(ExternalIdBundle.of(externalId)); }
/** * Adds external identifiers to the bundle. * * @param externalIds the identifiers to add, not null */ public void addExternalIds(final Iterable<ExternalId> externalIds) { ArgumentChecker.notNull(externalIds, "externalIds"); setExternalId(getExternalId().withExternalIds(externalIds)); }
/** * Adds an external identifier to the bundle. * * @param externalId the identifier to add, not null */ public void addExternalId(final ExternalId externalId) { ArgumentChecker.notNull(externalId, "externalId"); setExternalId(getExternalId().withExternalId(externalId)); }