Examples of TaskVO


Examples of org.andromda.timetracker.vo.TaskVO

        System.out.println("Person " + person.getId() + " created - " + person.getUsername());
        return person;
    }

    private static TaskVO createTask(String taskName) {
        TaskVO task = new TaskVO(null, taskName);
        task.setId(timeTrackingService.createTask(task));
        System.out.println("Task " + task.getId() + " created - " + task.getName());
        return task;
    }
View Full Code Here

Examples of org.andromda.timetracker.vo.TaskVO

        TimeAllocationVO[] allocations = new TimeAllocationVO[count];
        timecard.setAllocations(allocations);
        for (int i = 0; i < count; i++) {
            Date startTime = new Date(timecard.getBegDate().getTime() + i * MILLIS_IN_DAY);
            Date endTime   = new Date(timecard.getBegDate().getTime() + (i + 1) * MILLIS_IN_DAY);
            TaskVO task = tasks[(int)Math.round((Math.random()*(tasks.length - 1)))];
            allocations[i] = new TimeAllocationVO(
                null,
                new TimePeriodVO(startTime, endTime),
                task.getId());
        }

        // Create timecard
        timecard.setId(timeTrackingService.createTimecard(timecard));

View Full Code Here

Examples of org.andromda.timetracker.vo.TaskVO

        PersonVO naresh = createPerson("nbhatia", "Naresh", "Bhatia");
        PersonVO louis = createPerson("lcoude", "Louis", "Coude");
        PersonVO john = createPerson("jsmith", "John", "Smith");

        // Create tasks
        TaskVO research = createTask("Research");
        TaskVO development = createTask("Development");

        // Create timecards
        TimecardVO timecard1 = createTimecard(naresh, john);
        TimecardVO timecard2 = createTimecard(naresh, john);
        TimecardVO timecard3 = createTimecard(louis, john);
View Full Code Here

Examples of org.andromda.timetracker.vo.TaskVO

        System.out.println("Person " + person.getId() + " created - " + person.getUsername());
        return person;
    }

    private static TaskVO createTask(String taskName) {
        TaskVO task = new TaskVO(null, taskName);
        task.setId(timeTrackingService.createTask(task));
        System.out.println("Task " + task.getId() + " created - " + task.getName());
        return task;
    }
View Full Code Here

Examples of org.andromda.timetracker.vo.TaskVO

        TimeAllocationVO[] allocations = new TimeAllocationVO[count];
        timecard.setAllocations(allocations);
        for (int i = 0; i < count; i++) {
            Date startTime = new Date(timecard.getBegDate().getTime() + i * MILLIS_IN_DAY);
            Date endTime   = new Date(timecard.getBegDate().getTime() + (i + 1) * MILLIS_IN_DAY);
            TaskVO task = tasks[(int)Math.round((Math.random()*(tasks.length - 1)))];
            allocations[i] = new TimeAllocationVO(
                null,
                new TimePeriodVO(startTime, endTime),
                task.getId());
        }

        // Create timecard
        timecard.setId(timeTrackingService.createTimecard(timecard));

View Full Code Here

Examples of org.jallinone.registers.task.java.TaskVO

      // check if there exists a scheduled employee that has not a task with a sale activity code linked...
      DetailCallOutRequestVO vo = (DetailCallOutRequestVO)frame.getCalloutPanel().getVOModel().getValueObject();
      VOListTableModel model = frame.getResourcesPanel().getTasksGrid().getVOListTableModel();
      ScheduledEmployeeVO empVO = null;
      ArrayList tasks = null;
      TaskVO taskVO = null;
      Response res = null;
      HashMap map = new HashMap();
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      for(int i=0;i<model.getRowCount();i++) {
        empVO = (ScheduledEmployeeVO)model.getObjectForRow(i);
        res = ClientUtils.getData("validateTaskCode",new LookupValidationParams(empVO.getTaskCodeREG07(),map));
        if (res.isError()) {
          JOptionPane.showMessageDialog(
               ClientUtils.getParentFrame(frame),
               ClientSettings.getInstance().getResources().getResource(res.getErrorMessage()),
               ClientSettings.getInstance().getResources().getResource("Error"),
               JOptionPane.ERROR_MESSAGE
           );
           return;
        }
        tasks = new ArrayList(((VOListResponse)res).getRows());
        if (tasks.size()!=1) {
           JOptionPane.showMessageDialog(
               ClientUtils.getParentFrame(frame),
               ClientSettings.getInstance().getResources().getResource("no task defined for the scheduled employee")+" "+empVO.getEmployeeCodeSCH01(),
               ClientSettings.getInstance().getResources().getResource("Error"),
               JOptionPane.ERROR_MESSAGE
           );
           return;
        }
        taskVO = (TaskVO)tasks.get(0);
        if (taskVO.getActivityCodeSal09REG07()==null) {
          JOptionPane.showMessageDialog(
              ClientUtils.getParentFrame(frame),
              ClientSettings.getInstance().getResources().getResource("no sale activity code linked to the task")+" "+taskVO.getTaskCodeREG07(),
              ClientSettings.getInstance().getResources().getResource("Error"),
              JOptionPane.ERROR_MESSAGE
          );
          return;
        }
View Full Code Here

Examples of org.jallinone.registers.task.java.TaskVO

   */
  public VOListResponse insertTasks(ArrayList list,String serverLanguageId,String username,ArrayList customizedFields) throws Throwable {
    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;
      TaskVO vo = null;

      BigDecimal progressiveSYS10 = null;

      Map attribute2dbField = new HashMap();
      attribute2dbField.put("companyCodeSys01REG07","COMPANY_CODE_SYS01");
      attribute2dbField.put("taskCodeREG07","TASK_CODE");
      attribute2dbField.put("progressiveSys10REG07","PROGRESSIVE_SYS10");
      attribute2dbField.put("enabledREG07","ENABLED");
      attribute2dbField.put("finiteCapacityREG07","FINITE_CAPACITY");
      attribute2dbField.put("activityCodeSal09REG07","ACTIVITY_CODE_SAL09");

      Response res = null;
      for(int i=0;i<list.size();i++) {
        vo = (TaskVO)list.get(i);
        vo.setEnabledREG07("Y");

        // insert record in SYS10...
        progressiveSYS10 = CompanyTranslationUtils.insertTranslations(vo.getDescriptionSYS10(),vo.getCompanyCodeSys01REG07(),username,conn);
        vo.setProgressiveSys10REG07(progressiveSYS10);

        // insert into REG07...
        res = CustomizeQueryUtil.insertTable(
            conn,
            new UserSessionParameters(username),
View Full Code Here

Examples of org.jallinone.registers.task.java.TaskVO

    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;

      TaskVO oldVO = null;
      TaskVO newVO = null;
      Response res = null;

      for(int i=0;i<oldVOs.size();i++) {
        oldVO = (TaskVO)oldVOs.get(i);
        newVO = (TaskVO)newVOs.get(i);

        // update SYS10 table...
        CompanyTranslationUtils.updateTranslation(newVO.getCompanyCodeSys01REG07(),oldVO.getDescriptionSYS10(),newVO.getDescriptionSYS10(),newVO.getProgressiveSys10REG07(),serverLanguageId,username,conn);

        HashSet pkAttrs = new HashSet();
        pkAttrs.add("companyCodeSys01REG07");
        pkAttrs.add("taskCodeREG07");
View Full Code Here

Examples of org.jallinone.registers.task.java.TaskVO

  public VOResponse deleteTasks(ArrayList list,String serverLanguageId,String username) throws Throwable {
    PreparedStatement pstmt = null;
    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;
      TaskVO vo = null;
      for(int i=0;i<list.size();i++) {
        // logically delete the record in REG07...
        vo = (TaskVO)list.get(i);
        pstmt = conn.prepareStatement(
            "update REG07_TASKS set ENABLED='N',LAST_UPDATE_USER=?,LAST_UPDATE_DATE=?  where "+
            "TASK_CODE='"+vo.getTaskCodeREG07()+"' and "+
            "COMPANY_CODE_SYS01='"+vo.getCompanyCodeSys01REG07()+"'"
        );
        pstmt.setString(1,username);
        pstmt.setTimestamp(2,new java.sql.Timestamp(System.currentTimeMillis()));
        pstmt.execute();
        pstmt.close();
View Full Code Here

Examples of org.jallinone.registers.task.java.TaskVO

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {}

        public void beforeLookupAction(ValueObject parentVO) {
          TaskVO vo = (TaskVO)parentVO;
          actDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01REG07());
          actDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01REG07());
        }

        public void forceValidate() {}

      });
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.