value = valueUpdate.getValue();
item.put(attributename, value);
}else{
if (value.getSS() != null) {
if (valueUpdate.getValue().getSS() == null) {
throw new ConditionalCheckFailedException("It's not possible to ADD something else than a List<String> for the attribute (" + attributename + ")");
} else {
for (String toUp : valueUpdate.getValue().getSS()) {
value.getSS().add(toUp);
}
}
} else if (value.getNS() != null) {
if (valueUpdate.getValue().getNS() == null) {
throw new ConditionalCheckFailedException("It's not possible to ADD something else than a List<Number> for the attribute (" + attributename + ")");
} else {
for (String toUp : valueUpdate.getValue().getNS()) {
value.getNS().add(toUp);
}
}
} else if (value.getS() != null) {
throw new ConditionalCheckFailedException("It's not possible to ADD on an attribute with a String type for the attribute (" + attributename + ")");
} else if (value.getN() != null) {
try {
Long l = Long.valueOf(value.getN());
l = l + Long.valueOf(valueUpdate.getValue().getN());
value.setN(l + "");