* {@link GeoPoint}
* @return {@link UnitLocationBean}
*/
public static final UnitLocationBean convertLocationToBean(
final GeoPoint location) {
final UnitLocationBean locationBean = new UnitLocationBean();
locationBean.setId(location.getLocateId());
locationBean
.setStatus(location.getLocationStatus() == null ? Status.INACTIVE
.name() : location.getLocationStatus().name());
locationBean.setName(location.getLocationDescription());
locationBean.setLat(location.getLocationLatitude());
locationBean.setLng(location.getLocationLongitude());
locationBean.setAccuracy(location.getLocationAccuracy());
locationBean.setAddress(location.getLocationAddress());
locationBean.setCountryName(location.getLocationCountryName());
locationBean.setCountryCode(location.getLocationCountryCode());
if (location.getTidtype() != null) {
locationBean.setTidtype(location.getTidtype().getLocationTypeId());
}
return locationBean;
}