<T> Collection<Method> getPrimaryKeyGetters(Class<T> clazz) {
        synchronized (primaryKeyGettersCache) {
            if ( !primaryKeyGettersCache.containsKey(clazz) ) {
                List<Method> keyGetters = new LinkedList<Method>();
                for (Method getter : getRelevantGetters(clazz)) {
                    if (ReflectionUtils.getterOrFieldHasAnnotation(getter, DynamoDBHashKey.class)
                        || ReflectionUtils.getterOrFieldHasAnnotation(getter, DynamoDBRangeKey.class)) {
                        keyGetters.add(getter);
                    }
                }
                primaryKeyGettersCache.put(clazz, keyGetters);
            }
            return primaryKeyGettersCache.get(clazz);
        }
    }
Returns all annotated {@link DynamoDBHashKey} and
{@link DynamoDBRangeKey} getters for the class given, throwing an
exception if there isn't one.
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBReflector.java