Package org.apache.gora.examples.generated

Examples of org.apache.gora.examples.generated.Employee


    //more tests for clone are in TestPersistentDatumReader
    @SuppressWarnings("unchecked")
    MemStore<String, Employee> store = DataStoreFactory.getDataStore(
        MemStore.class, String.class, Employee.class, new Configuration());

    Employee employee = DataStoreTestUtil.createEmployee(store);
   
    Assert.assertEquals(employee, employee.clone());
  }
View Full Code Here


  public void testCloneEmployee() throws Exception {
    @SuppressWarnings("unchecked")
    MemStore<String, Employee> store = DataStoreFactory.getDataStore(
        MemStore.class, String.class, Employee.class, conf);

    Employee employee = DataStoreTestUtil.createEmployee(store);
   
    testClone(employee);
  }
View Full Code Here

    testClone(employee);
  }
 
  @Test
  public void testCloneEmployeeOneField() throws Exception {
    Employee employee = new Employee();
    employee.setSsn(new Utf8("11111"));

    testClone(employee);
  }
View Full Code Here

    testClone(employee);
  }

  @Test
  public void testCloneEmployeeTwoFields() throws Exception {
    Employee employee = new Employee();
    employee.setSsn(new Utf8("11111"));
    employee.setSalary(100);

    testClone(employee);
  }
View Full Code Here

  public void testCloneEmployee() throws Exception {
    @SuppressWarnings("unchecked")
    MemStore<String, Employee> store = DataStoreFactory.getDataStore(
        MemStore.class, String.class, Employee.class);

    Employee employee = DataStoreTestUtil.createEmployee(store);
   
    testClone(employee);
  }
View Full Code Here

    testClone(employee);
  }
 
  @Test
  public void testCloneEmployeeOneField() throws Exception {
    Employee employee = new Employee();
    employee.setSsn(new Utf8("11111"));

    testClone(employee);
  }
View Full Code Here

    testClone(employee);
  }

  @Test
  public void testCloneEmployeeTwoFields() throws Exception {
    Employee employee = new Employee();
    employee.setSsn(new Utf8("11111"));
    employee.setSalary(100);

    testClone(employee);
  }
View Full Code Here

  }

  @Test
  public void testReadable2() {
    stateManager = new StateManagerImpl();
    Employee employee = new Employee(stateManager);
    Assert.assertFalse(stateManager.isReadable(employee, 0));
    Assert.assertFalse(stateManager.isReadable(employee, 1));
    employee.setName(new Utf8("foo"));
    Assert.assertTrue(stateManager.isReadable(employee, 0));
    Assert.assertFalse(stateManager.isReadable(employee, 1));
  }
View Full Code Here

    WebPage page = new WebPage();
    for(int i=0; i<WebPage._ALL_FIELDS.length; i++) {
      int index = page.getFieldIndex(WebPage._ALL_FIELDS[i]);
      Assert.assertEquals(i, index);
    }
    Employee employee = new Employee();
    for(int i=0; i<Employee._ALL_FIELDS.length; i++) {
      int index = employee.getFieldIndex(Employee._ALL_FIELDS[i]);
      Assert.assertEquals(i, index);
    }
  }
View Full Code Here

    //test clear new object
    page = new WebPage();
    page.clear();
   
    //test primitive fields
    Employee employee = new Employee();
    employee.clear();
  }
View Full Code Here

TOP

Related Classes of org.apache.gora.examples.generated.Employee

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.