@Test public void testQueryAsScan() throws PersistenceException { final Integer ITEM_COUNT = 1; doReturn(DynamoTestUtil.createScanResultPage(false, ITEM_COUNT)).when(mockDynamoDBMapper).scanPage(any(), any()); DataObjectFeed<TestTrackedObject> feed = persister.query(null); Assert.assertNotNull(feed); Assert.assertEquals(feed.getAll().size(), ITEM_COUNT.intValue()); }
protected DataObjectFeed<T> query(List<Query> queries) throws PersistenceException { DataObjectFeed<T> responseFeed = new DataObjectFeed<>(); List<T> responseObjects = performQuery(getDynamoObjectRetrieverFactory(), getDataObjectClass(), queries, responseFeed); if(responseObjects != null) responseFeed.addAll(responseObjects); return responseFeed; }
DynamoDBObjectPersister implements ObjectPersister<T> { protected DataObjectFeed<T> query(List<Query> queries) throws PersistenceException { DataObjectFeed<T> responseFeed = new DataObjectFeed<>(); List<T> responseObjects = performQuery(getDynamoObjectRetrieverFactory(), getDataObjectClass(), queries, responseFeed); if(responseObjects != null) responseFeed.addAll(responseObjects); return responseFeed; } }
DynamoDBObjectPersister implements ObjectPersister<T> { protected DataObjectFeed<T> query(List<Query> queries) throws PersistenceException { DataObjectFeed<T> responseFeed = new DataObjectFeed<>(); List<T> responseObjects = performQuery(getDynamoObjectRetrieverFactory(), getDataObjectClass(), queries, responseFeed); if(responseObjects != null) responseFeed.addAll(responseObjects); return responseFeed; } DynamoDBObjectPersister(String tableName,
        String persistenceKeyFieldName, AWSDynamoDBFactory AWSDynamoDBFactory, Class<T> dataObjectClass, TableIndexes tableIndexes); protected  DynamoDBObjectPersister(String tableName,
        String persistenceKeyFieldName, AWSDynamoDBFactory AWSDynamoDBFactory, Class<T> dataObjectClass,
        DynamoDBMapper dynamoDBMapper, TableIndexes tableIndexes); }
DynamoDBObjectPersister implements ObjectPersister<T> { protected DataObjectFeed<T> query(List<Query> queries) throws PersistenceException { DataObjectFeed<T> responseFeed = new DataObjectFeed<>(); List<T> responseObjects = performQuery(getDynamoObjectRetrieverFactory(), getDataObjectClass(), queries, responseFeed); if(responseObjects != null) responseFeed.addAll(responseObjects); return responseFeed; } DynamoDBObjectPersister(String tableName,
        String persistenceKeyFieldName, AWSDynamoDBFactory AWSDynamoDBFactory, Class<T> dataObjectClass, TableIndexes tableIndexes); protected  DynamoDBObjectPersister(String tableName,
        String persistenceKeyFieldName, AWSDynamoDBFactory AWSDynamoDBFactory, Class<T> dataObjectClass,
        DynamoDBMapper dynamoDBMapper, TableIndexes tableIndexes); @Override DataObjectFeed<T> retrieve(List<Query> queries); @Override T retrieve(String identifier); @Override void delete(String identifier); @Override T persist(T object); @Override T update(T object); String getPersistenceKeyFieldName(); String getTableName(); AWSDynamoDBFactory getAWSDynamoDBFactory(); Class<T> getDataObjectClass(); TableIndexes getTableIndexes(); void setIdGenerator(IdGenerator idGenerator); DynamoObjectRetrieverFactory<T> getDynamoObjectRetrieverFactory(); void setDynamoObjectRetrieverFactory(DynamoObjectRetrieverFactory<T> dynamoObjectRetrieverFactory); }
DynamoDBObjectPersister implements ObjectPersister<T> { protected DataObjectFeed<T> query(List<Query> queries) throws PersistenceException { DataObjectFeed<T> responseFeed = new DataObjectFeed<>(); List<T> responseObjects = performQuery(getDynamoObjectRetrieverFactory(), getDataObjectClass(), queries, responseFeed); if(responseObjects != null) responseFeed.addAll(responseObjects); return responseFeed; } DynamoDBObjectPersister(String tableName,
        String persistenceKeyFieldName, AWSDynamoDBFactory AWSDynamoDBFactory, Class<T> dataObjectClass, TableIndexes tableIndexes); protected  DynamoDBObjectPersister(String tableName,
        String persistenceKeyFieldName, AWSDynamoDBFactory AWSDynamoDBFactory, Class<T> dataObjectClass,
        DynamoDBMapper dynamoDBMapper, TableIndexes tableIndexes); @Override DataObjectFeed<T> retrieve(List<Query> queries); @Override T retrieve(String identifier); @Override void delete(String identifier); @Override T persist(T object); @Override T update(T object); String getPersistenceKeyFieldName(); String getTableName(); AWSDynamoDBFactory getAWSDynamoDBFactory(); Class<T> getDataObjectClass(); TableIndexes getTableIndexes(); void setIdGenerator(IdGenerator idGenerator); DynamoObjectRetrieverFactory<T> getDynamoObjectRetrieverFactory(); void setDynamoObjectRetrieverFactory(DynamoObjectRetrieverFactory<T> dynamoObjectRetrieverFactory);  }