Examples of Department


Examples of org.objectweb.speedo.pobjects.ref.Department

        return prop;
    }

    public void testCreationOfPersistentObject() {
        PersistenceManager pm = pmf.getPersistenceManager();
        Department d = new Department(depName);
        pm.makePersistent(d);
        for(int i=0; i<depNames.length; i++) {
            pm.makePersistent(new Department(depNames[i]));
        }

        //Creation of Employee
        for(int i=0; i<names.length; i++) {
            pm.makePersistent(new Employee(names[i], d, salaries[i]));
View Full Code Here

Examples of org.objectweb.speedo.pobjects.ref.Department

  }
  public void test1() {
    String eName = "seb";
    String dName = "ASR";
    PersistenceManager pm = pmf.getPersistenceManager();
    Employee e = new Employee(eName, new Department(dName));
    pm.makePersistent(e);
    Object eId = pm.getObjectId(e);
    Assert.assertNotNull("null object identifier", eId);
    pm.close();
View Full Code Here

Examples of org.objectweb.speedo.pobjects.ref.Department

    public void testDeleteReferencedObject(boolean withEvict) {
        PersistenceManager pm = pmf.getPersistenceManager();

        pm.currentTransaction().begin();
        Employee e = new Employee("employee testDeleteReferencedObject",
                new Department("department testDeleteReferencedObject"));
        pm.makePersistent(e);
        long eid = e.getOid();
        Long did = e.getDept().getOid();
        e= null;
        pm.currentTransaction().commit();

        pm.currentTransaction().begin();
        Department d = (Department) pm.getObjectById(
                pm.newObjectIdInstance(Department.class, "" + did), true);
        pm.deletePersistent(d);
        d = null;
        pm.currentTransaction().commit();
       
View Full Code Here

Examples of org.objectweb.speedo.pobjects.ref.Department

            String filter = "(this.name == \"" + POBuilder.depName + "\")";
            query.setFilter(filter);
            Collection col = (Collection) query.execute();
            Iterator iter = col.iterator();
            Assert.assertTrue("", iter.hasNext());
            Department d = (Department) iter.next();
            query.closeAll();

      query = pm.newQuery(Employee.class);
      filter = "(this.dept == d)";
      String param = "Department d";
View Full Code Here

Examples of org.objectweb.speedo.tutorial.pobjects.mapping.Department

   * objects are made persistent, then you can view the results on the datastore.
   */
  public static void mapping() {
    System.out.println( "***************Mapping*****************");
    //create a department
    Department department = new Department("Sales");
    //create a manager
    Manager manager = new Manager("Young Emy", department);
    //link the manager to the department
    department.setManager(manager);
    //create employees
    Employee employee1 = new Employee("Truffaz Brad", manager);
    Employee employee2 = new Employee("Serio Laura", manager);
    Employee employee3 = new Employee("Burley Keith", manager);
    Employee employee4 = new Employee("Stern Jan", manager);
View Full Code Here

Examples of org.optaplanner.examples.pas.domain.Department

            for (int i = 0; i < departmentListSize; i++) {
                String line = bufferedReader.readLine();
                String[] lineTokens = splitByPipelineAndTrim(line, 2);

                String[] departmentTokens = splitBySpace(lineTokens[0], 4);
                Department department = new Department();
                department.setId(Long.parseLong(departmentTokens[0]));
                department.setName(departmentTokens[1]);
                department.setRoomList(new ArrayList<Room>());
                int minimumAge = Integer.parseInt(departmentTokens[2]);
                if (minimumAge != 0) {
                    department.setMinimumAge(Integer.valueOf(minimumAge));
                }
                int maximumAge = Integer.parseInt(departmentTokens[3]);
                if (maximumAge != 0) {
                    department.setMaximumAge(Integer.valueOf(maximumAge));
                }
                departmentList.add(department);
                idToDepartmentMap.put(department.getId(), department);

                String[] departmentSpecialismTokens = splitBySpace(lineTokens[1]);
                if (departmentSpecialismTokens.length % 2 != 0) {
                    throw new IllegalArgumentException("Read line (" + line
                            + ") is expected to contain even number of tokens (" + departmentSpecialismTokens.length
View Full Code Here

Examples of project.entities.institute.Department

public class DepartmentDAOImpl extends HibernateDaoSupport implements
    DepartmentDAO {

  @Override
  public Department createDepartment(String name, int parent) {
    Department department = new Department(name, parent);
    return (Department) getHibernateTemplate().save(department);
  }
View Full Code Here

Examples of simple.schema.client.Department

            System.out.println("STS URL=" + stsURL);
           
            ((BindingProvider)stub).getRequestContext().
                put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL);

            Department dept = new Department();
            dept.setCompanyName("A");
            dept.setDepartmentName("B");

            String balance = stub.getAccountBalance(dept);
           
            System.out.println("balance 1 =" + balance);
        } catch (Exception ex) {
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.