Package org.pau.assetmanager.entities.Annotation

Examples of org.pau.assetmanager.entities.Annotation.AnnotationType


      ClientDomainType clientDomainTypes,
      SortingCriteria sortingCriteria, AnnotationsFilter annotationsFilter) {
    Map<String, Serializable> parameters = new HashMap<String, Serializable>();
    StringBuffer queryString = new StringBuffer("select annotation from ");
    if (optinalType.isPresent()) {
      AnnotationType type = optinalType.get();
      if (type.equals(AnnotationType.EXPENSES)) {
        queryString.append(" ExpensesAnnotation ");
      } else if (type.equals(AnnotationType.INCOME)) {
        queryString.append(" IncomeAnnotation ");
      }
    } else {
      queryString.append(" Annotation ");
    }
View Full Code Here


        queryString.append(" and annotation.useYearly = :use_quarterly");
        parameters.put("use_quarterly",
            annotationsFilter.getUseYearly());
      }
      if (optinalType.isPresent()) {
        AnnotationType type = optinalType.get();
        if (type.equals(AnnotationType.INCOME)
            && (annotationsFilter.getVatTo() != null
                || annotationsFilter.getVatFrom() != null
                || annotationsFilter.getRetentionTo() != null || annotationsFilter
                .getRetentionFrom() != null)) {
          queryString.append(" and ( type(book) = PropertyBook and ( book.property.type='PREMISE' or ( book.property.type='TENEMENT' and annotation.forCompany = true ) ) ) ");
        }
        if (type.equals(AnnotationType.EXPENSES)
            && annotationsFilter.getUseQuarterly() != null) {
          queryString.append(" and annotation.useQuarterly = :use_quarterly");
          parameters.put("use_quarterly",
              annotationsFilter.getUseQuarterly());
        }
        if (type.equals(AnnotationType.INCOME)
            && annotationsFilter.getForCompany() != null) {
          queryString.append(" and annotation.forCompany = :for_company");
          parameters.put("for_company",
              annotationsFilter.getForCompany());
        }
View Full Code Here

TOP

Related Classes of org.pau.assetmanager.entities.Annotation.AnnotationType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.