Package org.apache.ojb.broker

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


                field.setSequenceName(null);
                sd.addAttribute("autoNaming", "true");
                broker = PersistenceBrokerFactory.createPersistenceBroker(tempKey);
                SMAutoNaming obj = new SMAutoNaming("testAutoNaming_3");
                broker.beginTransaction();
                broker.store(obj);
                broker.commitTransaction();
            }
            catch (PersistenceBrokerException e)
            {
                e.printStackTrace();
View Full Code Here


    public void testMaxKeySearch2()
    {
        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
        // find max from classes using the same table
        broker.beginTransaction();
        broker.store(new ObjectRepository.A());
        broker.store(new ObjectRepository.B());
        broker.store(new ObjectRepository.B1());
        broker.store(new ObjectRepository.C());
        broker.store(new ObjectRepository.D());
        broker.commitTransaction();
View Full Code Here

    {
        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
        // find max from classes using the same table
        broker.beginTransaction();
        broker.store(new ObjectRepository.A());
        broker.store(new ObjectRepository.B());
        broker.store(new ObjectRepository.B1());
        broker.store(new ObjectRepository.C());
        broker.store(new ObjectRepository.D());
        broker.commitTransaction();
        long[] result = new long[5];
View Full Code Here

        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
        // find max from classes using the same table
        broker.beginTransaction();
        broker.store(new ObjectRepository.A());
        broker.store(new ObjectRepository.B());
        broker.store(new ObjectRepository.B1());
        broker.store(new ObjectRepository.C());
        broker.store(new ObjectRepository.D());
        broker.commitTransaction();
        long[] result = new long[5];
        FieldDescriptor field = broker.getClassDescriptor(ObjectRepository.A.class).getAutoIncrementFields()[0];
View Full Code Here

        // find max from classes using the same table
        broker.beginTransaction();
        broker.store(new ObjectRepository.A());
        broker.store(new ObjectRepository.B());
        broker.store(new ObjectRepository.B1());
        broker.store(new ObjectRepository.C());
        broker.store(new ObjectRepository.D());
        broker.commitTransaction();
        long[] result = new long[5];
        FieldDescriptor field = broker.getClassDescriptor(ObjectRepository.A.class).getAutoIncrementFields()[0];
        result[0] = SequenceManagerHelper.getMaxForExtent(broker, field);
View Full Code Here

        broker.beginTransaction();
        broker.store(new ObjectRepository.A());
        broker.store(new ObjectRepository.B());
        broker.store(new ObjectRepository.B1());
        broker.store(new ObjectRepository.C());
        broker.store(new ObjectRepository.D());
        broker.commitTransaction();
        long[] result = new long[5];
        FieldDescriptor field = broker.getClassDescriptor(ObjectRepository.A.class).getAutoIncrementFields()[0];
        result[0] = SequenceManagerHelper.getMaxForExtent(broker, field);
        field = broker.getClassDescriptor(ObjectRepository.B.class).getAutoIncrementFields()[0];
View Full Code Here

        SMObjectTwo smTwo_1 = new SMObjectTwo(objectName_Two);
        try
        {
            broker.beginTransaction();

            broker.store(dummy1);
            broker.store(dummy2);

            broker.store(smOne_1);
            broker.store(smOne_2);
// broker.clearCache();
View Full Code Here

        try
        {
            broker.beginTransaction();

            broker.store(dummy1);
            broker.store(dummy2);

            broker.store(smOne_1);
            broker.store(smOne_2);
// broker.clearCache();
            broker.store(smTwo_2);
View Full Code Here

            broker.beginTransaction();

            broker.store(dummy1);
            broker.store(dummy2);

            broker.store(smOne_1);
            broker.store(smOne_2);
// broker.clearCache();
            broker.store(smTwo_2);
            broker.store(smTwo_1);
View Full Code Here

            broker.store(dummy1);
            broker.store(dummy2);

            broker.store(smOne_1);
            broker.store(smOne_2);
// broker.clearCache();
            broker.store(smTwo_2);
            broker.store(smTwo_1);

            broker.commitTransaction();
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.