Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.JobFunction


  }
  /**
   * @param jobFunction
   */
  public void setJobFunction(JobFunction jobFunction){
    JobFunction oldFunction = getJobFunction();
    object.setJobFunction(jobFunction);
    firePropertyChange(PROPERTY_JOB_FUNCTION, oldFunction, jobFunction);
  }
View Full Code Here


  /**
   * @param jobFunction
   */
  public void setJobFunction(JobFunction jobFunction) {
    JobFunction oldFunction = getJobFunction();
    object.setJobFunction(jobFunction);
    firePropertyChange(PROPERTY_JOB_FUNCTION, oldFunction, jobFunction);
  }
View Full Code Here

  /**
   * @param jobFunction
   */
  public void setJobFunction(JobFunction jobFunction) {
    JobFunction oldFunction = getJobFunction();
    object.setJobFunction(jobFunction);
    firePropertyChange(PROPERTY_JOB_FUNCTION, oldFunction, jobFunction);
  }
View Full Code Here

    public final JobFunction getJobFunction() {
        return object.getJobFunction();
    }

    public final void setJobFunction(JobFunction jobFunction) {
        JobFunction oldFunction = getJobFunction();
        object.setJobFunction(jobFunction);
        firePropertyChange(PROPERTY_JOB_FUNCTION, oldFunction, jobFunction);
    }
View Full Code Here

    /**
     * @param ownFunction
     */
    public void setOwnFunction(JobFunction ownFunction) {
        JobFunction oldFunction = getOwnFunction();
        object.setOwnFunction(ownFunction);
        firePropertyChange(PROPERTY_OWN_FUNCTION, oldFunction, ownFunction);
    }
View Full Code Here

    /**
     * @param deviationFunction
     */
    public void setDeviationFunction(JobFunction deviationFunction) {
        JobFunction oldFunction = getDeviationFunction();
        object.setDeviationFunction(deviationFunction);
        firePropertyChange(PROPERTY_DEVIATION_FUNCTION, oldFunction,
                deviationFunction);
    }
View Full Code Here

   * @see no.ugland.utransprod.gui.model.AbstractModel#getBufferedObjectModel(com.jgoodies.binding.PresentationModel)
   */
  @Override
  public JobFunctionModel getBufferedObjectModel(
      PresentationModel presentationModel) {
    JobFunctionModel model = new JobFunctionModel(new JobFunction());
    model.setJobFunctionName((String) presentationModel
        .getBufferedValue(PROPERTY_JOB_FUNCTION_NAME));
    model.setJobFunctionDescription((String) presentationModel
        .getBufferedValue(PROPERTY_JOB_FUNCTION_DESCRIPTION));
    model.setManager((ApplicationUser) presentationModel
View Full Code Here

        .getBean("jobFunctionManager");
    if (user == null) {

      UserTypeManager userTypeManager = (UserTypeManager) ModelUtil
          .getBean("userTypeManager");
      JobFunction jobFunction = new JobFunction();
      jobFunction.setJobFunctionName("Transport");
      List<JobFunction> jobFunctions = jobFunctionManager
          .findByObject(jobFunction);
      jobFunction = jobFunctions.get(0);

      user = new ApplicationUser(null, "avviktransport",
          "avviktransport", "avviktransport", "avviktransport", null,
          "Nei", jobFunction, productArea, null);
      applicationUserManager.saveObject(user);

      UserType userType = new UserType();
      userType.setDescription("Avvik");
      List<UserType> userTypes = userTypeManager.findByObject(userType);
      userType = userTypes.get(0);

      Set<UserRole> userRoles = new HashSet<UserRole>();
      UserRole userRole = new UserRole(null, userType, user);
      userRoles.add(userRole);
      user.setUserRoles(userRoles);

      applicationUserManager.saveObject(user);
    }

    JobFunction jobFunction = user.getJobFunction();

    if (!jobFunction.getManager().equals(user)) {
      jobFunction.setManager(user);
      jobFunctionManager.saveObject(jobFunction);
    }

    Login login = new LoginImpl(user, user.getUserRoles().iterator().next()
        .getUserType());
View Full Code Here

    boolean hasSelection = viewHandler.objectSelectionListHasSelection();
    buttonEdit.setEnabled(hasSelection);
    if (viewHandler.hasWriteAccess()) {
      if (deviation != null) {

        JobFunction jobFunction = deviation.getDeviationFunction();
        ApplicationUser manager = null;
        ApplicationUser currentUser = ((DeviationViewHandler) viewHandler)
            .getApplicationUser();
        if (jobFunction != null) {
          manager = jobFunction.getManager();
        }
        if ((currentUser != null && currentUser.equals(manager))
            || (currentUser != null && viewHandler.getUserType()
                .isAdministrator())) {
          buttonRemove.setEnabled(hasSelection);
View Full Code Here

    /**
     * @see no.ugland.utransprod.gui.handlers.AbstractViewHandler#getNewObject()
     */
    @Override
    public JobFunction getNewObject() {
        return new JobFunction();
    }
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.model.JobFunction

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.