Package de.xanders.data.customer.vo

Examples of de.xanders.data.customer.vo.ActivityVO


    }

    protected void sort(final String column, final boolean ascending) {
      Comparator comparator = new Comparator() {
          public int compare(Object o1, Object o2) {
              ActivityVO c1 = (ActivityVO) o1;
              ActivityVO c2 = (ActivityVO) o2;

              if (column == null) {
                  return 0;
              }

              if (column.equals("assignedTo")) {
                  return ascending
                  ? c1.getAssignedTo().compareTo(c2.getAssignedTo())
                  : c2.getAssignedTo().compareTo(c1.getAssignedTo());
              } else if (column.equals("beginDate")) {
                  return ascending
                  ? c1.getBeginDate().compareTo(c2.getBeginDate())
                  : c2.getBeginDate().compareTo(c1.getBeginDate());
              } else {
                  return 0;
              }
          }
      };
View Full Code Here


     *
     * Prepares to enter a new activity entry
     */
    public String initActivity() throws Exception {
        activityDetailForm = (ActivityDetailForm) getForm(ACTIVITY_DETAIL_FORM);
        CustomerMapperFactory.getActivityMapper().mapToBean(new ActivityVO(), activityDetailForm);
        return "activityDetail";
    }
View Full Code Here

     * Saves (creates or updates) an activity entry
     */
    public String saveActivity() throws Exception {
        activityDetailForm = (ActivityDetailForm) getForm(ACTIVITY_DETAIL_FORM);
        try {
            activityVO = new ActivityVO();
            CustomerMapperFactory.getActivityMapper().mapToObj(activityDetailForm, activityVO);
            UserVO loggedInUserVO = (UserVO)getSession().getAttribute(Constants.LOGGED_IN_USER);
            if (activityVO.getActivityId() == null) {
                activityVO.setCreatedOn(new Date());
                activityVO.setCreatedBy(loggedInUserVO.getUserIdent());
View Full Code Here

     */
    public String deleteActivity() throws Exception {
        activityDetailForm = (ActivityDetailForm) getForm(ACTIVITY_DETAIL_FORM);
        try {
            dataServiceLocator.getActivityService().deleteActivity(new Long(activityDetailForm.getActivityId()));
            CustomerMapperFactory.getActivityMapper().mapToBean(new ActivityVO(), activityDetailForm);
        } catch (ActivityServiceException ex) {
      logger.error("DAO exception occured, cause: ", ex);
      MessageUtils.addErrorMessage("error.dataSource");
        }
        return "activityDetail";
View Full Code Here

TOP

Related Classes of de.xanders.data.customer.vo.ActivityVO

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.