@Test public void testGetWithFields() throws Exception { DataStore<String, WebPage> store = new MemStore<>(); BeanFactory<String, WebPage> beanFactory = new BeanFactoryImpl<>(String.class, WebPage.class); store.setBeanFactory(beanFactory); WebPageDataCreator.createWebPageData(store); String[] interestFields = new String[2]; interestFields[0] = "url"; interestFields[1] = "content"; WebPage page = store.get(URLS[1], interestFields); assertNotNull(page); assertNotNull(page.getUrl()); assertEquals(page.getUrl().toString(), URLS[1]); assertNotNull(page.getContent()); assertEquals("Map of Outlinks should have a size of '0' as it is omitted at retrieval", 0, page.getOutlinks().size()); assertEquals("Map of Parsed Content should have a size of '0' as it is omitted at retrieval", 0, page.getParsedContent().size()); }
@SuppressWarnings("unchecked") @Override public T get(K key, String[] fields) { T obj = (T) map.get(key); if (obj == null) { return null; } return getPersistent(obj, getFieldsToQuery(fields)); }
MemStore extends DataStoreBase<K, T> { @SuppressWarnings("unchecked") @Override public T get(K key, String[] fields) { T obj = (T) map.get(key); if (obj == null) { return null; } return getPersistent(obj, getFieldsToQuery(fields)); } }
MemStore extends DataStoreBase<K, T> { @SuppressWarnings("unchecked") @Override public T get(K key, String[] fields) { T obj = (T) map.get(key); if (obj == null) { return null; } return getPersistent(obj, getFieldsToQuery(fields)); }  }
MemStore extends DataStoreBase<K, T> { @SuppressWarnings("unchecked") @Override public T get(K key, String[] fields) { T obj = (T) map.get(key); if (obj == null) { return null; } return getPersistent(obj, getFieldsToQuery(fields)); }  @Override String getSchemaName(); @Override boolean delete(K key); @Override long deleteByQuery(Query<K, T> query); @SuppressWarnings("unchecked") @Override Result<K, T> execute(Query<K, T> query); @SuppressWarnings("unchecked") @Override T get(K key, String[] fields); @SuppressWarnings("unchecked") @Override boolean exists(K key); @Override Query<K, T> newQuery(); @SuppressWarnings("unchecked") @Override void put(K key, T obj); @Override /** * Returns a single partition containing the original query */ List<PartitionQuery<K, T>> getPartitions(Query<K, T> query); @Override void close(); @Override void createSchema(); @Override void deleteSchema(); @Override boolean schemaExists(); @Override void flush(); }
MemStore extends DataStoreBase<K, T> { @SuppressWarnings("unchecked") @Override public T get(K key, String[] fields) { T obj = (T) map.get(key); if (obj == null) { return null; } return getPersistent(obj, getFieldsToQuery(fields)); }  @Override String getSchemaName(); @Override boolean delete(K key); @Override long deleteByQuery(Query<K, T> query); @SuppressWarnings("unchecked") @Override Result<K, T> execute(Query<K, T> query); @SuppressWarnings("unchecked") @Override T get(K key, String[] fields); @SuppressWarnings("unchecked") @Override boolean exists(K key); @Override Query<K, T> newQuery(); @SuppressWarnings("unchecked") @Override void put(K key, T obj); @Override /** * Returns a single partition containing the original query */ List<PartitionQuery<K, T>> getPartitions(Query<K, T> query); @Override void close(); @Override void createSchema(); @Override void deleteSchema(); @Override boolean schemaExists(); @Override void flush(); @SuppressWarnings("rawtypes")
  static ConcurrentSkipListMap map; }