Skip to content
Snippets Groups Projects

Privat varsel

Merged Tor-Einar Skog requested to merge privat_varsel into develop
1 file
+ 9
2
Compare changes
  • Side-by-side
  • Inline
@@ -33,6 +33,7 @@ import java.util.List;
@@ -33,6 +33,7 @@ import java.util.List;
import java.util.Objects;
import java.util.Objects;
import java.util.ResourceBundle;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.Set;
 
import java.util.stream.Collectors;
import javax.ejb.LocalBean;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.EntityManager;
@@ -410,8 +411,14 @@ public class PointOfInterestBean {
@@ -410,8 +411,14 @@ public class PointOfInterestBean {
}
}
}
}
catch(NoResultException ex) {}
catch(NoResultException ex) {}
// Getting all weather stations for user's organization
// Getting all weather stations for user's organization. Need to avoid
retVal.addAll(this.getWeatherstationsForOrganization(user.getOrganizationId(), Boolean.TRUE));
// double catching of privately owned weather station
 
retVal.addAll(this.getWeatherstationsForOrganization(user.getOrganizationId(), Boolean.TRUE)
 
.stream()
 
.filter(weatherStation -> ! weatherStation.getUserId().getUserId().equals(user.getUserId()))
 
.collect(Collectors.toList())
 
);
 
}
}
Collections.sort(retVal);
Collections.sort(retVal);
return retVal;
return retVal;
Loading