* @param username
* @throws EnMeExpcetion
* @throws EnMeNoResultsFoundException
*/
public void updateLocationMap(final UnitLocationBean locationBean, final Long locationId, final String username) throws EnMeExpcetion, EnMeNoResultsFoundException{
final GeoPoint location = getLocation(locationId, username);
log.info("location map location "+location);
if(location == null){
throw new EnMeExpcetion("location not found");
}
else{
location.setLocationAccuracy(locationBean.getAccuracy());
location.setLocationLatitude(locationBean.getLat());
location.setLocationAddress(locationBean.getAddress());
location.setLocationCountryCode(locationBean.getCountryCode());
location.setLocationCountryName(locationBean.getCountryName());
location.setLocationLongitude(locationBean.getLng());
getGeoPointDao().saveOrUpdate(location);
createNotification(NotificationEnum.LOCATION_GMAP_UPDATED, "Updated to "+ locationBean.getAddress(), location.getAccount());
log.info("location map updated");
}
}