Beispiel #1
0
 /**
  * Updates the status of cadastre objects associated with the specified transaction. The filter
  * parameter can be used to indicate the where clause to apply.
  *
  * @param transactionId Identifier of the transaction associated to the cadastre objects to be
  *     updated
  * @param filter The where clause to use when retrieving the cadastre objects. Must be {@linkplain
  *     CadastreObjectStatusChanger#QUERY_WHERE_SEARCHBYTRANSACTION_PENDING} or {@linkplain
  *     CadastreObjectStatusChanger#QUERY_WHERE_SEARCHBYTRANSACTION_TARGET}.
  * @param statusCode The status code to set on the selected cadastre objects.
  */
 @Override
 public void ChangeStatusOfCadastreObjects(
     String transactionId, String filter, String statusCode) {
   HashMap params = new HashMap();
   params.put("transaction_id", transactionId);
   List<CadastreObjectStatusChanger> involvedCoList =
       getRepository().getEntityList(CadastreObjectStatusChanger.class, filter, params);
   for (CadastreObjectStatusChanger involvedCo : involvedCoList) {
     involvedCo.setStatusCode(statusCode);
     getRepository().saveEntity(involvedCo);
   }
 }
Beispiel #2
0
 /**
  * Approves the changes to cadastre objects as a result of a cadastre redefinition.
  *
  * @param transactionId The identifier of the transaction
  */
 @Override
 public void approveCadastreRedefinition(String transactionId) {
   List<CadastreObjectTargetRedefinition> targetObjectList =
       this.getCadastreObjectRedefinitionTargetsByTransaction(transactionId);
   for (CadastreObjectTargetRedefinition targetObject : targetObjectList) {
     CadastreObjectStatusChanger cadastreObject =
         this.getRepository()
             .getEntity(CadastreObjectStatusChanger.class, targetObject.getCadastreObjectId());
     cadastreObject.setGeomPolygon(targetObject.getGeomPolygon());
     cadastreObject.setTransactionId(transactionId);
     cadastreObject.setApprovalDatetime(null);
     this.saveEntity(cadastreObject);
   }
 }