Examples of Department


Examples of Entities.Department

    public void createDepartment() {       
        if (departmentHandler.checkDepartmentName(getDepartmentName())) {
            FacesContext.getCurrentInstance().addMessage("departmentHandlerMessages", new FacesMessage(FacesMessage.SEVERITY_ERROR, "Input Error", "Department already exists"));

        } else {
            departmentRef = new Department();
            departmentRef.setDepartment(departmentName);
            departmentHandler.createDepartment(departmentRef);
            FacesContext.getCurrentInstance().addMessage("departmentHandlerMessages", new FacesMessage(FacesMessage.SEVERITY_INFO, "Success.", "Department Created"));
        }
    }
View Full Code Here

Examples of Entities.Department

    public void createDepartment() {
        if (departmentHandler.checkDepartmentName(getAdminName())) {
            FacesContext.getCurrentInstance().addMessage("createM", new FacesMessage(FacesMessage.SEVERITY_ERROR, "Input Error", "Department already exists"));

        } else {
            departmentRef = new Department();
            departmentRef.setDepartment(departmentName);
            departmentHandler.createDepartment(departmentRef);
            FacesContext.getCurrentInstance().addMessage("departmentHandlerMessage", new FacesMessage(FacesMessage.SEVERITY_INFO, "Success.", "Department Created"));
        }
    }
View Full Code Here

Examples of Entities.Department

    public void setDataTable(UIData dataTable) {
        this.dataTable = dataTable;
    }
   
    public void createDepartment(){
        departmentRef = new Department();
        departmentRef.setDepartment(departmentName);
        departmentHandler.createDepartment(departmentRef);
        FacesContext.getCurrentInstance().addMessage("departmentHandlerMessage", new FacesMessage(FacesMessage.SEVERITY_INFO,"Success.","Department Created"));
    }
View Full Code Here

Examples of Entities.Department

            if (each.equals(newAccount)) {
                newAccount = each;
            }
        }
        int departmentId = 0;
        Department depart = null;
       
        List<Accountdepartment> listAD = accDepDao.findAll();
        for(Accountdepartment each : listAD)
        {
            if(each.getIdaccount().getIdaccount().equals(accountID))
View Full Code Here

Examples of MVCTableDAO.model.Department

  }

  public Employee readMitarbeiter(String id) {
    Employee ma = null;
    Department dep = null;
    try {
      String readEmployee = "SELECT * FROM employees AS e, departments as d WHERE e.id = " + id + ";";
      statement = c.createStatement();
      ResultSet rs = statement.executeQuery(readEmployee);

      while (rs.next()) {
        dep = new Department(rs.getString("d.id"), rs.getString("d.department"));
        ma = new Employee(rs.getString("id"), rs.getString("vorname"), rs.getString("nachname"), dep);
      }
      rs.close();
      statement.close();
      return ma;
View Full Code Here

Examples of acceptance.hibernate.reference.Department

        setupPersistentDivision();

        final Session session = getSessionFactory().getCurrentSession();
        session.beginTransaction();
        final Division loaded = (Division)session.createQuery("from Division").uniqueResult();
        final Department dept = (Department)loaded.getDepartments().iterator().next();
        final Person person = (Person)dept.getPeople().iterator().next();
        final Site site = person.getSite();
        assertTrue(HibernateProxy.class.isAssignableFrom(site.getClass()));
        final String loadedXml = xstream.toXML(site);
        session.getTransaction().commit();
View Full Code Here

Examples of acceptance.hibernate.reference.Department

     */
    private Division setupPersistentDivision() {
        final Session session = getSessionFactory().getCurrentSession();
        session.beginTransaction();
        final Division div = new Division("Div1");
        final Department dep = new Department("Dep1", div);
        final Site site = new Site("Site1");
        /*
         * This save is necessitated by the fact that Hibernate's transitive persistence is
         * depth-first and does not do a full graph analysis. Therefore it would be possible for
         * Hibernate to try to save the person record before the site record, which would throw
View Full Code Here

Examples of acceptance.hibernate.reference.Department

    /**
     * Create the object graph in-memory without Hibernate.
     */
    private Division setupNonpersistentDivision() {
        final Division div = new Division("Div1");
        final Department dep = new Department("Dep1", div);
        final Site site = new Site("Site1");
        new Person("Tom", dep, site);
        return div;
    }
View Full Code Here

Examples of be.c4j.demo.security.demo.model.Department

        addDepartment(90L, "Executive");
        addDepartment(100L, "Finance");
    }

    private void addDepartment(Long id, String name) {
        Department department = new Department();
        department.setId(id);
        department.setName(name);
        departments.put(id, department);
    }
View Full Code Here

Examples of by.bsuir.hypermarket.entity.Department

    try (DbConnection connection = DbConnectionPool.INSTANCE.getConnection();
        PreparedStatement categoryStatement = connection.prepareStatement(SQL_CATEGORY_BY_DEPARTMENT);
        PreparedStatement departmentStatement = connection.prepareStatement(SQL_FIND_ALL)) {   
      ResultSet resultSet = departmentStatement.executeQuery();
      while (resultSet.next()) {
        Department department = new Department();
        fillUpDepartment(resultSet, department);
       
        categoryStatement.setInt(1, department.getUid());
        ResultSet categoriesResultSet = categoryStatement.executeQuery();
        setDepartmentCategories(categoriesResultSet, department);
   
        departments.add(department);
      }
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.