Examples of Department


Examples of org.jboss.errai.demo.grocery.client.shared.Department

            @Override
            public void onKeyPress(KeyPressEvent event) {
                if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
                    if (addDepartment.getText().trim().length() == 0)
                        return;
                    Department department = Department.resolve(em, addDepartment.getText());
                    if (!storeBinder.getModel().getDepartments().contains(department)) {
                        storeBinder.getModel().getDepartments().add(department);
                        departmentList.setItems(storeBinder.getModel().getDepartments());
                    }
                    addDepartment.setText("");
View Full Code Here

Examples of org.joget.directory.model.Department

        try {
            Employment employment = getEmployment(id);

            if (employment != null) {
                // clear department HOD
                Department dept = employment.getDepartment();
                if (dept != null) {
                    Employment hod = dept.getHod();
                    if (hod != null && id.equals(hod.getId())) {
                        dept.setHod(null);
                        departmentDao.updateDepartment(dept);
                    }
                }
               
                // clear employment
View Full Code Here

Examples of org.objectweb.speedo.j2eedo.database.Department

   */
  public void newProjectWithEmployees(PollsSynchronizations pollsSync,
            StringBuffer outStr,
            PersistenceManager pm) {
        outStr.append("\nCreate new project with its members");
    Department d = (Department) pm.getObjectById(
          pm.newObjectIdInstance(
              Department.class,
              Long.toString(
                  DatabaseImpl.getDepartmentIdFromPool())),
                      false);
View Full Code Here

Examples of org.objectweb.speedo.j2eedo.database.Department

  public void newDepartmentWithEmployees(
            PollsSynchronizations pollsSync,
            StringBuffer outStr,
            PersistenceManager pm) {
        outStr.append("\nCreate new deparment with its employees");
    Department d = new Department("Dept-" + Alea.randomstring(4, 9));
    pm.makePersistent(d);
        pollsSync.addInPool(DatabaseImpl.poolOfDepartmentId, d.getDeptid());
    logger.log(BasicLevel.DEBUG,
        "Create a new department id :" + d.getDeptid());
    int nbEmployees = Alea.rand(MIN_EMPLOYEE_PER_DEPARTMENT, MAX_EMPLOYEE_PER_DEPARTMENT);
        outStr.append("\n\tAdd new Department : ").append(d.getDeptid());
        outStr.append(" with ").append(nbEmployees).append(" employees");
        Employee boss = null;
    for (int i = 0; i < nbEmployees; i++) {
      Calendar cal = Calendar.getInstance();
      cal.set(Alea.rand(1900, 2004), Alea.rand(1, 12), Alea.rand(1, 28));
View Full Code Here

Examples of org.objectweb.speedo.j2eedo.database.Department

   */
  public void getDepartment(StringBuffer outStr, PersistenceManager pm) {
    long id = DatabaseImpl.getDepartmentIdFromPool();
    logger.log(BasicLevel.DEBUG, "Get Department having id :" + id);
    outStr.append("\nGet the department id :").append(id);
    Department d = (Department) pm.getObjectById(
          pm.newObjectIdInstance(Department.class, Long.toString(id)),
          false);
    outStr.append(d.getAsString());
  }
View Full Code Here

Examples of org.objectweb.speedo.j2eedo.database.Department

    pm.setUserObject(pollsSync);

    outStr.append("\nRemove Dept : " + initialDeptid);
    logger.log(BasicLevel.DEBUG, "Delete the department id :" + initialDeptid);

    Department initialDepartment =
      (Department) pm.getObjectById(
          pm.newObjectIdInstance(
              Department.class,
              Long.toString(initialDeptid)),
              false);

    outStr.append("\nMerge with Dept : " + destinationDeptid);
    Department destinationDepartment =
      (Department) pm.getObjectById(
          pm.newObjectIdInstance(
              Department.class,
              Long.toString(destinationDeptid)),
              false);
View Full Code Here

Examples of org.objectweb.speedo.j2eedo.database.Department

    long initialDeptid = DatabaseImpl.getDepartmentIdFromPool();
    outStr.append("\nSplit Dept : " + initialDeptid);
    logger.log(BasicLevel.DEBUG,
        "Split the department id :" + initialDeptid);

    Department initialDepartment =
      (Department) pm.getObjectById(
          pm.newObjectIdInstance(
              Department.class,
              Long.toString(initialDeptid)),
              false);

    Department d = new Department(initialDepartment.getName()+"-splited");
    pm.makePersistent(d);

    pollsSync.addInPool(DatabaseImpl.poolOfDepartmentId, d.getDeptid());
    pm.setUserObject(pollsSync);

    outStr.append("\n with Dept : " + d.getDeptid() );

    // move projects
    Iterator projects = initialDepartment.getProjects().iterator();
    Project p = null;
    int nbProject = Math.round(initialDepartment.getProjects().size()/2);
View Full Code Here

Examples of org.objectweb.speedo.j2eedo.database.Department

   */
  public void setManagerForADepartment(
            StringBuffer outStr,
            PersistenceManager pm) {
        outStr.append("\nUpdate the boss for a department's employees");
    Department d = (Department) pm.getObjectById(
          pm.newObjectIdInstance(Department.class,
              Long.toString(DatabaseImpl.getDepartmentIdFromPool())),
              false);
    logger.log(BasicLevel.DEBUG,
        "Update manager for the department having id :" + d.getDeptid());
    // the first person from a department is the boss;
    Iterator persons = d.getEmployees().iterator();
    Employee boss = null;
    Employee otherEmp = null;
    if (persons.hasNext()) {
      boss = (Employee) persons.next();
      outStr.append("\nThe boss of the department '");
View Full Code Here

Examples of org.objectweb.speedo.j2eedo.database.Department

   */
  public void newEmployee(PollsSynchronizations pollsSync,
            StringBuffer outStr,
            PersistenceManager pm) {
    long id = DatabaseImpl.getDepartmentIdFromPool();
    Department d = (Department) pm.getObjectById(
          pm.newObjectIdInstance(Department.class, Long.toString(id)),
          false);
    Calendar cal = Calendar.getInstance();
    cal.set(Alea.rand(1900, 2004), Alea.rand(1, 12), Alea.rand(1, 28));
    Employee e =
View Full Code Here

Examples of org.objectweb.speedo.pobjects.inheritance.prefetch.Department

  public void createInheritedObjects(PersistenceManager pm){
   
    Employee employee1 = new Employee("Herve Landry", 42.4, "Tetra Pack");
    Employee employee2 = new Employee("Vincent Racado", 59, "Tetra Pack");
   
    Department dept = new Department("Production");
   
    Worker worker1 = new Worker("Caroline Bret", 33, "Tetra Pack", true, dept);
    Worker worker2 = new Worker("Evelyne Jain", 54, "Tetra Pack", false, dept);
    Worker worker3 = new Worker("Tim Jorge", 28, "Tetra Pack", false, dept);
   
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.