Example usage for com.amazonaws.services.dynamodbv2.document Item isNull

List of usage examples for com.amazonaws.services.dynamodbv2.document Item isNull

Introduction

In this page you can find the example usage for com.amazonaws.services.dynamodbv2.document Item isNull.

Prototype

public boolean isNull(String attrName) 

Source Link

Document

Returns true if the specified attribute exists with a null value; false otherwise.

Usage

From source file:com.netflix.hollow.example.consumer.infrastructure.DynamoDBAnnouncementWatcher.java

License:Apache License

public long readLatestVersion() {
    Table table = dynamoDB.getTable(tableName);

    Item item = table.getItem("namespace", blobNamespace, "version, pin_version", null);

    if (item.isPresent("pin_version") && !item.isNull("pin_version"))
        return item.getLong("pin_version");

    return item.getLong("version");
}