Package it.eng.spagobi.behaviouralmodel.check.bo

Examples of it.eng.spagobi.behaviouralmodel.check.bo.Check


            BIObjectParameter aBIObjectParameter = (BIObjectParameter)it.next();
            List checks = aBIObjectParameter.getParameter().getChecks();
            if (checks != null && !checks.isEmpty()) {
              Iterator checksIt = checks.iterator();
              while (checksIt.hasNext()) {
                Check check = (Check) checksIt.next();
                if (check.getValueTypeCd().equalsIgnoreCase("MANDATORY")) {
                  isMandatory = true;
                  break;
                }
              }
            }
View Full Code Here


      }
      exporter.insertParUse(paruse, session);
      List checks = paruse.getAssociatedChecks();
      Iterator iterChecks = checks.iterator();
      while (iterChecks.hasNext()) {
        Check check = (Check) iterChecks.next();
        exporter.insertCheck(check, session);
        exporter.insertParuseCheck(paruse, check, session);
      }
      List roles = paruse.getAssociatedRoles();
      exportRoles(roles);
View Full Code Here

    aParameterUse.setManualInput(hibParUse.getManualInput());

    Set hibParUseCheks = hibParUse.getSbiParuseCks();
    SbiParuseCk aSbiParuseCk = null;
    CheckDAOHibImpl checkDAOHibImpl = new CheckDAOHibImpl();
    Check tmpCheck = null;

    List checkList = new ArrayList();
    for (Iterator itParUseCk = hibParUseCheks.iterator(); itParUseCk.hasNext();){
      aSbiParuseCk = (SbiParuseCk)itParUseCk.next();
      tmpCheck = checkDAOHibImpl.toCheck(aSbiParuseCk.getId().getSbiChecks());
View Full Code Here

     
     
      mandatory = false;
      Iterator it = par.getChecks().iterator()
      while (it.hasNext()){
        Check check = (Check)it.next();
        if (check.getValueTypeCd().equalsIgnoreCase("MANDATORY")){
          mandatory = true;
          break;
        }
      }
     
View Full Code Here

   * @throws EMFUserError the EMF user error
   *
   * @see it.eng.spagobi.behaviouralmodel.check.dao.ICheckDAO#loadCheckByID(java.lang.Integer)
   */
  public Check loadCheckByID(Integer id) throws EMFUserError {
    Check toReturn = null;
    Session aSession = null;
    Transaction tx = null;
   
    try {
      aSession = getSession();
View Full Code Here

   * @param hibCheck The hybernate value constraint at input
   *
   * @return The corrispondent <code>Check</code> object
   */
  public Check toCheck(SbiChecks hibCheck){
    Check aCheck = new Check();
    aCheck.setCheckId(hibCheck.getCheckId());
    aCheck.setDescription(hibCheck.getDescr());
    aCheck.setFirstValue(hibCheck.getValue1());
    aCheck.setName(hibCheck.getName());
    aCheck.setLabel(hibCheck.getLabel());
    aCheck.setSecondValue(hibCheck.getValue2());
    aCheck.setValueTypeCd(hibCheck.getValueTypeCd());
    aCheck.setValueTypeId(hibCheck.getCheckType().getValueId());
    return  aCheck;
  }
View Full Code Here

    if (checks == null || checks.size() == 0) {
      logger.debug("OUT. No checks associated for biparameter [" + label + "].");
      return toReturn;
    } else {
      Iterator it = checks.iterator();
      Check check = null;
      while (it.hasNext()) {
        check = (Check) it.next();
        logger.debug("Applying check [" + check.getLabel() + "] to biparameter [" + label + "] ...");
        List errors = getValidationErrorOnCheck(biparameter, check);
        if (errors != null && errors.size() > 0) {
          Iterator errorsIt = errors.iterator();
          while (errorsIt.hasNext()) {
            EMFValidationError error = (EMFValidationError) errorsIt.next();
            logger.warn("Found an error applying check [" + check.getLabel() + "] for biparameter [" + label + "]: " + error.getDescription());
          }
          toReturn.addAll(errors);
        } else {
          logger.debug("No errors found applying check [" + check.getLabel() + "] to biparameter [" + label + "].");
        }
      }
      logger.debug("OUT");
      return toReturn;
   
View Full Code Here

   */
  private void getDetailCheck(String key, SourceBean response) throws EMFUserError {
    try {
      this.modalita = AdmintoolsConstants.DETAIL_MOD;
      response.setAttribute("modality", modalita)
      Check aCheck= DAOFactory.getChecksDAO().loadCheckByID(new Integer(key));
      response.setAttribute("checkObj", aCheck);
    } catch (Exception ex) {
      SpagoBITracer.major(AdmintoolsConstants.NAME_MODULE, "DettaglioEngineModule","getDettaglioEngine","Cannot fill response container", ex  );
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    }
View Full Code Here

   */
  private void modDetailCheck(SourceBean request, String mod, SourceBean response)
    throws EMFUserError, SourceBeanException {
    try {
     
      Check aCheck = recoverCheckDetails(request);
      EMFErrorHandler errorHandler = getErrorHandler();
     
      // if there are some errors into the errorHandler does not write into DB
      if(!errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
        response.setAttribute("checkObj", aCheck);
View Full Code Here

    String checkType = (String)request.getAttribute("checkType");
   
    String checkTypeIDStr = checkType.substring(0, checkType.indexOf(";"));
    String checkTypeCode = checkType.substring(checkType.indexOf(";")+1);
   
    Check check = new Check();
    check.setCheckId(checkId);
    check.setDescription(description);
    check.setName(name);
    check.setLabel(label);
    check.setValueTypeId(Integer.valueOf(checkTypeIDStr));
    check.setValueTypeCd(checkTypeCode);
   
    String fieldValue1Name = checkTypeCode+"_value1";
    String fieldValue2Name = checkTypeCode+"_value2";
   
        String value1 = (String)request.getAttribute(fieldValue1Name);
        String value2 = (String)request.getAttribute(fieldValue2Name);
        if (value1!=null && value1.length()<400)check.setFirstValue(value1);
        if (value2!=null && value2.length()<400)check.setSecondValue(value2);

        labelControl(label, checkId);
       
        return check;
       
View Full Code Here

TOP

Related Classes of it.eng.spagobi.behaviouralmodel.check.bo.Check

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.