Examples of Periodicity


Examples of it.eng.spagobi.kpi.config.bo.Periodicity

      // load Periodicity

      if (kpiInstPeriod.getPeriodicityId() != null) {
        Integer periodicityId=kpiInstPeriod.getPeriodicityId();
        IPeriodicityDAO periodicityDAO=DAOFactory.getPeriodicityDAO();
        Periodicity period=periodicityDAO.loadPeriodicityById(periodicityId);
        insertPeriodicity(period, session);
        SbiKpiPeriodicity sbiKpiPeriodicity= (SbiKpiPeriodicity) session.load(SbiKpiPeriodicity.class, period.getIdKpiPeriodicity());
        if(sbiKpiPeriodicity!=null){
          hibKpiInstPeriod.setSbiKpiPeriodicity(sbiKpiPeriodicity);
        }
      }
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.Periodicity

    if( !(o instanceof Periodicity) ) {
      throw new SerializationException("PeriodicityJSONSerializer is unable to serialize object of type: " + o.getClass().getName());
    }
   
    try {
      Periodicity per = (Periodicity)o;
      result = new JSONObject();
     
      result.put(ID, per.getIdKpiPeriodicity());
      result.put(NAME,per.getName() );
      result.put(MONTHS, per.getMonths() );
      result.put(DAYS, per.getDays() );
      result.put(HOURS, per.getHours() );
      result.put(MINUTES, per.getMinutes() );     
     
    } catch (Throwable t) {
      throw new SerializationException("An error occurred while serializing object: " + o, t);
    } finally {
     
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.Periodicity

    return idToReturn;
  }

  public Periodicity loadPeriodicityById(Integer id) throws EMFUserError {
    logger.debug("IN");
    Periodicity toReturn = null;
    Session aSession = null;
    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiKpiPeriodicity hibKpiPeriodicity = (SbiKpiPeriodicity)aSession.load(SbiKpiPeriodicity.class,id);
      toReturn = new Periodicity(hibKpiPeriodicity
          .getIdKpiPeriodicity(), hibKpiPeriodicity.getName(),
          hibKpiPeriodicity.getMonths(), hibKpiPeriodicity
              .getDays(), hibKpiPeriodicity.getHours(),
          hibKpiPeriodicity.getMinutes(), hibKpiPeriodicity.getChronString());
    } catch (HibernateException he) {
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.Periodicity

      toTransform = aSession.createQuery("from SbiKpiPeriodicity").list();

      for (Iterator iterator = toTransform.iterator(); iterator.hasNext();) {
        SbiKpiPeriodicity hibKpiPeriodicity = (SbiKpiPeriodicity) iterator
            .next();
        Periodicity periodicity = new Periodicity(hibKpiPeriodicity
            .getIdKpiPeriodicity(), hibKpiPeriodicity.getName(),
            hibKpiPeriodicity.getMonths(), hibKpiPeriodicity
                .getDays(), hibKpiPeriodicity.getHours(),
            hibKpiPeriodicity.getMinutes(), hibKpiPeriodicity
                .getChronString());
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.Periodicity

      String days = getAttributeAsString(DAYS);
      String hours = getAttributeAsString(HOURS);
      String minutes = getAttributeAsString(MINUTES);   

      if (name != null) {
        Periodicity per = new Periodicity();
        per.setName(name);
       
        if(months!=null && !months.equals("")){
          per.setMonths(new Integer(months));
        }else{
          per.setMonths(new Integer("0"));
        }
        if(days!=null && !days.equals("")){
          per.setDays(new Integer(days));
        }else{
          per.setDays(new Integer("0"));
        }
        if(hours!=null && !hours.equals("")){
          per.setHours(new Integer(hours));
        }else{
          per.setHours(new Integer("0"));
        }
        if(minutes!=null && !minutes.equals("")){
          per.setMinutes(new Integer(minutes));
        }else{
          per.setMinutes(new Integer("0"));
        }     
       
        try {
          if(id != null && !id.equals("") && !id.equals("0")){             
            per.setIdKpiPeriodicity(Integer.valueOf(id));
            perDao.modifyPeriodicity(per);
            logger.debug("Resource "+id+" updated");
            JSONObject attributesResponseSuccessJSON = new JSONObject();
            attributesResponseSuccessJSON.put("success", true);
            attributesResponseSuccessJSON.put("responseText", "Operation succeded");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.