Search in sources :

Example 1 with NestedGenericHolderSimpleGenericsModel

use of org.bson.codecs.pojo.entities.NestedGenericHolderSimpleGenericsModel in project mongo-java-driver by mongodb.

the class PojoTestCase method getNestedGenericHolderSimpleGenericsModel.

static NestedGenericHolderSimpleGenericsModel getNestedGenericHolderSimpleGenericsModel() {
    SimpleModel simpleModel = getSimpleModel();
    Map<String, SimpleModel> map = new HashMap<String, SimpleModel>();
    map.put("A", simpleModel);
    Map<String, Map<String, SimpleModel>> mapB = new HashMap<String, Map<String, SimpleModel>>();
    mapB.put("A", map);
    SimpleGenericsModel<Integer, List<SimpleModel>, Map<String, SimpleModel>> simpleGenericsModel = new SimpleGenericsModel<Integer, List<SimpleModel>, Map<String, SimpleModel>>(42, 42, singletonList(singletonList(simpleModel)), mapB);
    GenericHolderModel<SimpleGenericsModel<Integer, List<SimpleModel>, Map<String, SimpleModel>>> nested = new GenericHolderModel<SimpleGenericsModel<Integer, List<SimpleModel>, Map<String, SimpleModel>>>(simpleGenericsModel, 42L);
    return new NestedGenericHolderSimpleGenericsModel(nested);
}
Also used : SimpleModel(org.bson.codecs.pojo.entities.SimpleModel) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) Collections.singletonList(java.util.Collections.singletonList) Arrays.asList(java.util.Arrays.asList) List(java.util.List) ArrayList(java.util.ArrayList) LinkedList(java.util.LinkedList) NestedGenericHolderSimpleGenericsModel(org.bson.codecs.pojo.entities.NestedGenericHolderSimpleGenericsModel) SimpleGenericsModel(org.bson.codecs.pojo.entities.SimpleGenericsModel) NestedGenericHolderSimpleGenericsModel(org.bson.codecs.pojo.entities.NestedGenericHolderSimpleGenericsModel) GenericHolderModel(org.bson.codecs.pojo.entities.GenericHolderModel) NestedSelfReferentialGenericHolderModel(org.bson.codecs.pojo.entities.NestedSelfReferentialGenericHolderModel) NestedGenericHolderModel(org.bson.codecs.pojo.entities.NestedGenericHolderModel) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap)

Aggregations

ArrayList (java.util.ArrayList)1 Arrays.asList (java.util.Arrays.asList)1 Collections.singletonList (java.util.Collections.singletonList)1 HashMap (java.util.HashMap)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 GenericHolderModel (org.bson.codecs.pojo.entities.GenericHolderModel)1 NestedGenericHolderModel (org.bson.codecs.pojo.entities.NestedGenericHolderModel)1 NestedGenericHolderSimpleGenericsModel (org.bson.codecs.pojo.entities.NestedGenericHolderSimpleGenericsModel)1 NestedSelfReferentialGenericHolderModel (org.bson.codecs.pojo.entities.NestedSelfReferentialGenericHolderModel)1 SimpleGenericsModel (org.bson.codecs.pojo.entities.SimpleGenericsModel)1 SimpleModel (org.bson.codecs.pojo.entities.SimpleModel)1