@Test public void testFromMongoList_null() throws Exception { MongoStore store = new MongoStore(); Document noField = new Document(); String field = "myField"; Object item = store.fromMongoList(field, null, new BSONDecorator(noField), null); assertNotNull(item); }
Object fromMongoList(final String docf, final Schema fieldSchema, final BSONDecorator easybson, final Field f) throws GoraException { List<Document> list = easybson.getDBList(docf); List<Object> rlist = new ArrayList<>(); if (list == null) { return new DirtyListWrapper(rlist); } for (Object item : list) { DocumentFieldType storeType = mapping.getDocumentFieldType(docf); Object o = fromDocument(fieldSchema.getElementType(), storeType, f, "item", new BSONDecorator(new Document("item", item))); rlist.add(o); } return new DirtyListWrapper<>(rlist); }
MongoStore extends
DataStoreBase<K, T> { Object fromMongoList(final String docf, final Schema fieldSchema, final BSONDecorator easybson, final Field f) throws GoraException { List<Document> list = easybson.getDBList(docf); List<Object> rlist = new ArrayList<>(); if (list == null) { return new DirtyListWrapper(rlist); } for (Object item : list) { DocumentFieldType storeType = mapping.getDocumentFieldType(docf); Object o = fromDocument(fieldSchema.getElementType(), storeType, f, "item", new BSONDecorator(new Document("item", item))); rlist.add(o); } return new DirtyListWrapper<>(rlist); } }
MongoStore extends
DataStoreBase<K, T> { Object fromMongoList(final String docf, final Schema fieldSchema, final BSONDecorator easybson, final Field f) throws GoraException { List<Document> list = easybson.getDBList(docf); List<Object> rlist = new ArrayList<>(); if (list == null) { return new DirtyListWrapper(rlist); } for (Object item : list) { DocumentFieldType storeType = mapping.getDocumentFieldType(docf); Object o = fromDocument(fieldSchema.getElementType(), storeType, f, "item", new BSONDecorator(new Document("item", item))); rlist.add(o); } return new DirtyListWrapper<>(rlist); } MongoStore(); }
MongoStore extends
DataStoreBase<K, T> { Object fromMongoList(final String docf, final Schema fieldSchema, final BSONDecorator easybson, final Field f) throws GoraException { List<Document> list = easybson.getDBList(docf); List<Object> rlist = new ArrayList<>(); if (list == null) { return new DirtyListWrapper(rlist); } for (Object item : list) { DocumentFieldType storeType = mapping.getDocumentFieldType(docf); Object o = fromDocument(fieldSchema.getElementType(), storeType, f, "item", new BSONDecorator(new Document("item", item))); rlist.add(o); } return new DirtyListWrapper<>(rlist); } MongoStore(); void initialize(final Class<K> keyClass,
      final Class<T> pPersistentClass, final Properties properties); MongoMapping getMapping(); @Override String getSchemaName(); @Override String getSchemaName(final String mappingSchemaName,
      final Class<?> persistentClass); @Override void createSchema(); @Override void deleteSchema(); @Override boolean schemaExists(); @Override void flush(); @Override void close(); @Override T get(final K key, final String[] fields); @Override boolean exists(final K key); @Override void put(final K key, final T obj); @Override boolean delete(final K key); @Override long deleteByQuery(final Query<K, T> query); @Override Result<K, T> execute(final Query<K, T> query); @Override Query<K, T> newQuery(); @Override List<PartitionQuery<K, T>> getPartitions(final Query<K, T> query); T newInstance(final Document obj, final String[] fields); String encodeFieldKey(final String key); String decodeFieldKey(final String key); }
MongoStore extends
DataStoreBase<K, T> { Object fromMongoList(final String docf, final Schema fieldSchema, final BSONDecorator easybson, final Field f) throws GoraException { List<Document> list = easybson.getDBList(docf); List<Object> rlist = new ArrayList<>(); if (list == null) { return new DirtyListWrapper(rlist); } for (Object item : list) { DocumentFieldType storeType = mapping.getDocumentFieldType(docf); Object o = fromDocument(fieldSchema.getElementType(), storeType, f, "item", new BSONDecorator(new Document("item", item))); rlist.add(o); } return new DirtyListWrapper<>(rlist); } MongoStore(); void initialize(final Class<K> keyClass,
      final Class<T> pPersistentClass, final Properties properties); MongoMapping getMapping(); @Override String getSchemaName(); @Override String getSchemaName(final String mappingSchemaName,
      final Class<?> persistentClass); @Override void createSchema(); @Override void deleteSchema(); @Override boolean schemaExists(); @Override void flush(); @Override void close(); @Override T get(final K key, final String[] fields); @Override boolean exists(final K key); @Override void put(final K key, final T obj); @Override boolean delete(final K key); @Override long deleteByQuery(final Query<K, T> query); @Override Result<K, T> execute(final Query<K, T> query); @Override Query<K, T> newQuery(); @Override List<PartitionQuery<K, T>> getPartitions(final Query<K, T> query); T newInstance(final Document obj, final String[] fields); String encodeFieldKey(final String key); String decodeFieldKey(final String key); static final Logger LOG; static final String DEFAULT_MAPPING_FILE; }