Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.PersistenceBroker.deleteByQuery()


  public void testDeleteByQuery() {
    MockControl pbControl = MockControl.createControl(PersistenceBroker.class);
    final PersistenceBroker pb = (PersistenceBroker) pbControl.getMock();
    Query query = new QueryByCriteria(TestBean.class);
    pb.deleteByQuery(query);
    pbControl.setVoidCallable(1);
    pb.close();
    pbControl.setReturnValue(true, 1);
    pbControl.replay();
View Full Code Here


            // 3. get a broker
            broker = PersistenceBrokerFactory.defaultPersistenceBroker();
            // 4. start broker transaction
            broker.beginTransaction();
            // 5. delete product
            broker.deleteByQuery(query);
            // 6. commit transaction
            broker.commitTransaction();
        }
        catch (OJBRuntimeException ex)
        {
View Full Code Here

            // 3. get a broker
            broker = PersistenceBrokerFactory.defaultPersistenceBroker();
            // 4. start broker transaction
            broker.beginTransaction();
            // 5. delete product
            broker.deleteByQuery(query);
            // 6. commit transaction
            broker.commitTransaction();
        }
        catch (OJBRuntimeException 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.