@Override public String getNextToken(Map<String, Object> object) { return Intrinsic.getId(object); } });
boolean isDeleted() { return Intrinsic.isDeleted(getRawJson()); }
private T convertDataStoreEntryToIdentity(Map<String, Object> map) { if (map == null || Intrinsic.isDeleted(map)) { return null; } // Make a copy of the map to avoid mutating the method parameter as a side-effect Map<String, Object> identityMap = Maps.newHashMap(map); // Historically the ID attribute used to be called "internalId". For backwards compatibility with the legacy // "internalId" attribute name and forwards compatibility with the "id" attribute name accept either one. String legacyInternalId = (String) identityMap.remove(INTERNAL_ID); if (!identityMap.containsKey(ID)) { if (legacyInternalId != null) { identityMap.put(ID, legacyInternalId); } else { // Identities have been in use since before non-authentication IDs were introduced. To grandfather in // those keys we'll use the hash of the identity's authentication ID as the identity's ID. identityMap.put(ID, Intrinsic.getId(map)); } } // Remove all intrinsics identityMap.keySet().removeAll(Intrinsic.DATA_FIELDS); return JsonHelper.convert(identityMap, _authIdentityClass); }
public void map(Text key, Row value, Context context) throws IOException, InterruptedException { _tableName.set(Intrinsic.getTable(value.getMap())); context.write(_tableName, _one); } }
boolean consolidateWith(Item other) { if (_consolidatedEventIds.size() >= MAX_EVENTS_TO_CONSOLIDATE) { return false; } // We'll construct an event key that combines all the duplicate events. Unfortunately we can't discard/ack // the extra events at this time, subtle race conditions result that can cause clients to miss events. _consolidatedEventIds.addAll(other._consolidatedEventIds); // Pick the newest version of the content. There's no reason to return stale stuff. if (Intrinsic.getVersion(_content) < Intrinsic.getVersion(other._content)) { _content = other._content; } // Combine tags from the other event for (List<String> tagList : other._tags) { // The contents of "tagList" are already sorted, no need to sort again. _tags = sortedTagUnion(_tags, tagList); } return true; }
public Date getLastUpdateAt() { return Intrinsic.getLastUpdateAt(getMap()); }
public Date getFirstUpdateAt() { return Intrinsic.getFirstUpdateAt(getMap()); }
private T convertDataStoreEntryToIdentity(Map<String, Object> map) { if (map == null || Intrinsic.isDeleted(map)) { return null; } // Make a copy of the map to avoid mutating the method parameter as a side-effect Map<String, Object> identityMap = Maps.newHashMap(map); // Historically the ID attribute used to be called "internalId". For backwards compatibility with the legacy // "internalId" attribute name and forwards compatibility with the "id" attribute name accept either one. String legacyInternalId = (String) identityMap.remove(INTERNAL_ID); if (!identityMap.containsKey(ID)) { if (legacyInternalId != null) { identityMap.put(ID, legacyInternalId); } else { // Identities have been in use since before non-authentication IDs were introduced. To grandfather in // those keys we'll use the hash of the identity's authentication ID as the identity's ID. identityMap.put(ID, Intrinsic.getId(map)); } } // Remove all intrinsics identityMap.keySet().removeAll(Intrinsic.DATA_FIELDS); return JsonHelper.convert(identityMap, _authIdentityClass); }
public void map(Text key, Row value, Context context) throws IOException, InterruptedException { _tableName.set(Intrinsic.getTable(value.getMap())); context.write(_tableName, _one); } }
boolean consolidateWith(Item other) { if (_consolidatedEventIds.size() >= MAX_EVENTS_TO_CONSOLIDATE) { return false; } // We'll construct an event key that combines all the duplicate events. Unfortunately we can't discard/ack // the extra events at this time, subtle race conditions result that can cause clients to miss events. _consolidatedEventIds.addAll(other._consolidatedEventIds); // Pick the newest version of the content. There's no reason to return stale stuff. if (Intrinsic.getVersion(_content) < Intrinsic.getVersion(other._content)) { _content = other._content; } // Combine tags from the other event for (List<String> tagList : other._tags) { // The contents of "tagList" are already sorted, no need to sort again. _tags = sortedTagUnion(_tags, tagList); } return true; }
public Date getLastUpdateAt() { return Intrinsic.getLastUpdateAt(getMap()); }
public Date getFirstUpdateAt() { return Intrinsic.getFirstUpdateAt(getMap()); }
private Role convertRecordToRole(Map<String, Object> record) { if (Intrinsic.isDeleted(record)) { return null; } RoleIdentifier id = RoleIdentifier.fromString(Intrinsic.getId(record)); return new Role(id.getGroup(), id.getId(), (String) record.get(NAME_ATTR), (String) record.get(DESCRIPTION_ATTR)); }
@Override public String getNextToken(Map<String, Object> object) { return Intrinsic.getId(object); } });
boolean isDeleted() { return Intrinsic.isDeleted(getRawJson()); }
public void map(Text key, Row value, Context context) throws IOException, InterruptedException { _tableName.set(Intrinsic.getTable(value.getMap())); context.write(_tableName, value); } }
public long getVersion() { return Intrinsic.getVersion(getMap()); }
private Role convertRecordToRole(Map<String, Object> record) { if (Intrinsic.isDeleted(record)) { return null; } RoleIdentifier id = RoleIdentifier.fromString(Intrinsic.getId(record)); return new Role(id.getGroup(), id.getId(), (String) record.get(NAME_ATTR), (String) record.get(DESCRIPTION_ATTR)); }
@Override public String getNextToken(Map<String, Object> object) { return Intrinsic.getId(object); } });