Examples of deleteAll()


Examples of net.lr.tutorial.karaf.db.examplejpa.impl.PersonServiceImpl.deleteAll()

        PersonServiceImpl personService = new PersonServiceImpl();
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("personTest", System.getProperties());
        EntityManager em = emf.createEntityManager();
        personService.setEntityManager(em);
        em.getTransaction().begin();
        personService.deleteAll();
        personService.add(new Person("Christian Schneider", "@schneider_chris"));
        em.getTransaction().commit();
        List<Person> persons = personService.getAll();
        Assert.assertEquals(1, persons.size());
        Assert.assertEquals("Christian Schneider", persons.get(0).getName());
View Full Code Here

Examples of net.lr.tutorial.karaf.db.examplejpa.impl.PersonServiceImpl.deleteAll()

        PersonServiceImpl personService = new PersonServiceImpl();
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("personTest", System.getProperties());
        EntityManager em = emf.createEntityManager();
        personService.setEntityManager(em);
        em.getTransaction().begin();
        personService.deleteAll();
        personService.add(new Person("Christian Schneider", "@schneider_chris"));
        em.getTransaction().commit();
        List<Person> persons = personService.getAll();
        Assert.assertEquals(1, persons.size());
        Assert.assertEquals("Christian Schneider", persons.get(0).getName());
View Full Code Here

Examples of net.sf.nfp.mini.dao.ObservationDAO.deleteAll()

    controler.progressListner.setMaxValue((int) size);
    long left = size;
    try {
      left -= readLine(reader).length(); // read CSV header
      periodDAO.deleteAll();
      observationDAO.deleteAll();
      String currentPeriod = null;
      String[] fields = new String[10];
      for (int lineNo = 1;; ++lineNo) {
        StringBuffer line = readLine(reader);
        if (line == null)
View Full Code Here

Examples of net.sf.nfp.mini.dao.PeriodDAO.deleteAll()

    Period period = null;
    controler.progressListner.setMaxValue((int) size);
    long left = size;
    try {
      left -= readLine(reader).length(); // read CSV header
      periodDAO.deleteAll();
      observationDAO.deleteAll();
      String currentPeriod = null;
      String[] fields = new String[10];
      for (int lineNo = 1;; ++lineNo) {
        StringBuffer line = readLine(reader);
View Full Code Here

Examples of nz.co.elysium.core.ToppingDAO.deleteAll()

        final DBI jdbi = factory.build(environment, config.getDatabaseConfiguration(), "postgresql");
        final ToppingDAO dao = jdbi.onDemand(ToppingDAO.class);
        final PizzaDAO pizza_dao = jdbi.onDemand(PizzaDAO.class);

        // toppings
        dao.deleteAll();
        long t_mushroom = dao.insert("Mushroom");
        long t_onion = dao.insert("Onion");
        long t_olive = dao.insert("Olives");
        long t_pineapple = dao.insert("Pineapple");
        long t_ham = dao.insert("Ham");
View Full Code Here

Examples of org.apache.cayenne.itest.ItestTableUtils.deleteAll()

public class _2_1_10_1_SingleTablePerClassTest extends EntityManagerCase {

    public void testSelectSuper() throws Exception {
        ItestTableUtils helper = getTableHelper("ST_INHERITANCE");
        helper.deleteAll();
        helper.setColumns("id", "objectType", "propertyA", "propertyB", "propertyC");
        helper.insert(1, "A", "1", null, null);
        helper.insert(2, "A", "2", null, null);
        helper.insert(3, "B", "3", "BX", null);
        helper.insert(4, "C", "4", null, "CX");
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.DBHelper.deleteAll()

    assertSame(sorter1, sorter2);
  }

  public void testNewContext_separateObjects() throws Exception {
    DBHelper dbUtils = getDbUtils();
    dbUtils.deleteAll("TABLE1");
    dbUtils.insert("TABLE1", new String[] { "ID", "NAME" }, new Object[] {
        1, "Abc" });

    SelectQuery query = new SelectQuery(Table1.class);
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.TableHelper.deleteAll()

        Object[] subdata = ivSub1Table.select();
        assertEquals(2, subdata.length);
        assertEquals(data[0], subdata[0]);
        assertNull(subdata[1]);

        ivSub1Table.deleteAll();
        ivRootTable.deleteAll();

        IvSub1 sub11 = context.newObject(IvSub1.class);
        sub11.setName("XyZXY");
        sub11.setSub1Name("BdE2");
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.TableHelper.deleteAll()

    protected void createClobDataSet() throws Exception {
        TableHelper tClobTest = new TableHelper(dbHelper, "CLOB_TEST");
        tClobTest.setColumns("CLOB_TEST_ID", "CLOB_COL");

        tClobTest.deleteAll();

        tClobTest.insert(1, "clob1");
        tClobTest.insert(2, "clob2");
    }
View Full Code Here

Examples of org.apache.cayenne.test.jdbc.TableHelper.deleteAll()

    protected void createClobDataSet() throws Exception {
        TableHelper tClobTest = new TableHelper(dbHelper, "CLOB_TEST");
        tClobTest.setColumns("CLOB_TEST_ID", "CLOB_COL");

        tClobTest.deleteAll();

        tClobTest.insert(1, "clob1");
        tClobTest.insert(2, "clob2");
    }
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.