@SuppressWarnings("unchecked") @Override public final void putWithDeferredIdAllocation(FullEntity<?>... entities) { validateActive(); for (FullEntity<?> entity : entities) { IncompleteKey key = entity.getKey(); Preconditions.checkArgument(key != null, "Entity must have a key"); if (key instanceof Key) { putInternal(Entity.convert((FullEntity<Key>) entity)); } else { toAddAutoId.add((FullEntity<IncompleteKey>) entity); } } }
if (entity.getKey() instanceof Key) { putInternal((FullEntity<Key>) entity); answer.add(Entity.convert((FullEntity<Key>) entity)); } else { Entity entityWithAllocatedId = Entity.newBuilder(allocated.next(), entity).build();
if (entity.getKey() instanceof Key) { addInternal((FullEntity<Key>) entity); answer.add(Entity.convert((FullEntity<Key>) entity)); } else { Entity entityWithAllocatedId = Entity.newBuilder(allocated.next(), entity).build();
Entity completeEntity = null; if (entity.getKey() instanceof Key) { completeEntity = Entity.convert((FullEntity<Key>) entity);
Preconditions.checkArgument(entity.hasKey(), "Entity %s is missing a key", entity); if (entity.getKey() instanceof Key) { Entity completeEntity = Entity.convert((FullEntity<Key>) entity); dedupEntities.put(completeEntity.getKey(), completeEntity); } else {
@SuppressWarnings("unchecked") @Override public final void putWithDeferredIdAllocation(FullEntity<?>... entities) { validateActive(); for (FullEntity<?> entity : entities) { IncompleteKey key = entity.getKey(); Preconditions.checkArgument(key != null, "Entity must have a key"); if (key instanceof Key) { putInternal(Entity.convert((FullEntity<Key>) entity)); } else { toAddAutoId.add((FullEntity<IncompleteKey>) entity); } } }
if (entity.getKey() instanceof Key) { addInternal((FullEntity<Key>) entity); answer.add(Entity.convert((FullEntity<Key>) entity)); } else { Entity entityWithAllocatedId = Entity.newBuilder(allocated.next(), entity).build();
if (entity.getKey() instanceof Key) { putInternal((FullEntity<Key>) entity); answer.add(Entity.convert((FullEntity<Key>) entity)); } else { Entity entityWithAllocatedId = Entity.newBuilder(allocated.next(), entity).build();
Preconditions.checkArgument(entity.hasKey(), "Entity %s is missing a key", entity); if (entity.getKey() instanceof Key) { Entity completeEntity = Entity.convert((FullEntity<Key>) entity); dedupEntities.put(completeEntity.getKey(), completeEntity); } else {
Entity completeEntity = null; if (entity.getKey() instanceof Key) { completeEntity = Entity.convert((FullEntity<Key>) entity);