Search in sources :

Example 1 with StatusName

use of gov.usgs.cida.coastalhazards.model.util.Status.StatusName in project coastal-hazards by USGS-CIDA.

the class StatusManager method loadAll.

public Map<StatusName, Status> loadAll() {
    Map<StatusName, Status> result = new TreeMap<>();
    Query selectQuery = em.createQuery(HQL_SELECT_ALL);
    List<Status> resultList = selectQuery.getResultList();
    for (Status status : resultList) {
        result.put(status.getStatusName(), status);
    }
    return result;
}
Also used : Status(gov.usgs.cida.coastalhazards.model.util.Status) Query(javax.persistence.Query) StatusName(gov.usgs.cida.coastalhazards.model.util.Status.StatusName) TreeMap(java.util.TreeMap)

Aggregations

Status (gov.usgs.cida.coastalhazards.model.util.Status)1 StatusName (gov.usgs.cida.coastalhazards.model.util.Status.StatusName)1 TreeMap (java.util.TreeMap)1 Query (javax.persistence.Query)1