Search in sources :

Example 1 with ResponseEntityList

use of com.hp.octane.integrations.dto.entities.ResponseEntityList in project octane-ci-java-sdk by MicroFocus.

the class EntityImpl method deserializeEntityListFromMap.

private ResponseEntityList deserializeEntityListFromMap(Map<String, Object> map) {
    ResponseEntityList list = dtoFactory.newDTO(ResponseEntityList.class);
    list.setTotalCount((int) map.get(COLLECTION_TOTAL_COUNT_FIELD));
    List<Map<String, Object>> data = (List) map.get(COLLECTION_DATA_FIELD);
    for (Map<String, Object> entry : data) {
        Entity entity = deserializeEntityFromMap(entry);
        list.addEntity(entity);
    }
    return list;
}
Also used : Entity(com.hp.octane.integrations.dto.entities.Entity) List(java.util.List) ResponseEntityList(com.hp.octane.integrations.dto.entities.ResponseEntityList) Map(java.util.Map) HashMap(java.util.HashMap) ResponseEntityList(com.hp.octane.integrations.dto.entities.ResponseEntityList)

Aggregations

Entity (com.hp.octane.integrations.dto.entities.Entity)1 ResponseEntityList (com.hp.octane.integrations.dto.entities.ResponseEntityList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1