/**
  * Saves the details of the Cadastre Change to the SOLA database
  *
  * @return
  */
 @Override
 public List<ValidationResultBean> save() {
   return TypeConverters.TransferObjectListToBeanList(
       PojoDataAccess.getInstance()
           .getCadastreService()
           .saveTransactionCadastreChange(this.getTO()),
       ValidationResultBean.class,
       null);
 }
 @Override
 public final void setTransaction() {
   this.transactionBean =
       PojoDataAccess.getInstance().getTransactionCadastreRedefinition(getTransactionStarterId());
   this.cadastreObjectModifiedLayer.setBeanList(
       this.transactionBean.getCadastreObjectTargetList());
   this.cadastreObjectNodeModifiedLayer.setBeanList(
       this.transactionBean.getCadastreObjectNodeTargetList());
   this.getDocumentsPanel().setSourceIds(this.transactionBean.getSourceIdList());
 }
 /**
  * Retrieves the options available for the spatial search from the database. Each option is
  * associated with a dynamic query that contains the SQL to execute for the search.
  *
  * @return
  */
 public static List<SpatialSearchOptionBean> getInstanceList() {
   if (instanceList == null) {
     instanceList = new ArrayList<SpatialSearchOptionBean>();
     List<SpatialSearchOptionTO> searchOptions =
         PojoDataAccess.getInstance().getSearchService().getSpatialSearchOptions();
     if (searchOptions != null) {
       for (SpatialSearchOptionTO searchOption : searchOptions) {
         instanceList.add(
             MappingManager.getMapper().map(searchOption, SpatialSearchOptionBean.class));
       }
     }
   }
   return instanceList;
 }
 /**
  * Constructor. It sets up the bundle by adding layers and tools that are relevant. Finally, it
  * zooms in the interested zone. The interested zone is defined in the following order: <br>
  * If bean has modified cadastre objects it is zoomed there, otherwise if baUnitId is present it
  * is zoomed there else it is zoomed in the application location.
  *
  * @param applicationBean The application where the transaction is started identifiers
  * @param transactionStarterId The id of the starter of the application. This will be the service
  *     id.
  * @param baUnitId Id of the property that is defined in the application as a target for this
  *     cadastre redefinition.
  */
 public ControlsBundleForCadastreRedefinition(
     ApplicationBean applicationBean,
     String transactionStarterId,
     String baUnitId,
     String targetCadastreObjectType) {
   super(applicationBean, transactionStarterId);
   this.Setup(PojoDataAccess.getInstance());
   this.setTargetCadastreObjectTypeConfiguration(targetCadastreObjectType);
   this.setTransaction();
   ReferencedEnvelope interestingArea = null;
   if (!this.transactionIsStarted()) {
     interestingArea = this.getExtentOfCadastreObjectsOfBaUnit(baUnitId);
   }
   this.zoomToInterestingArea(interestingArea, applicationBean.getLocation());
 }
 /**
  * Gets the accepted shift for survey points shifts from their original position
  *
  * @param forRuralArea
  * @return
  */
 private Double getAcceptanceShift(boolean forRuralArea) {
   if (forRuralArea) {
     return PojoDataAccess.getInstance().getMapDefinition().getSurveyPointShiftRuralArea();
   }
   return PojoDataAccess.getInstance().getMapDefinition().getSurveyPointShiftUrbanArea();
 }