Package org.caffinitas.mapper.core

Examples of org.caffinitas.mapper.core.PersistenceSession.startBatch()


    @Test(dependsOnMethods = "createSchema")
    public void batch_simple() throws Exception {
        PersistenceSession session = persistenceManager.createSession();
        try {
            Batch batch = session.startBatch();
            try {

                BatchEntity inst = new BatchEntity();
                inst.setId(1);
                inst.setVal("1");
View Full Code Here


    @Test(dependsOnMethods = "createSchema")
    public void batch_cas() throws Exception {

        PersistenceSession session = persistenceManager.createSession();
        try {
            Batch batch = session.startBatch();
            try {

                BatchCKEntity inst = new BatchCKEntity();
                inst.setPk(1);
                inst.setCk(1);
View Full Code Here

            inst.setPk(11);
            inst.setCk(2);
            inst.setVal("2");
            session.insert(inst, PersistOption.ifNotExists());

            Batch batch = session.startBatch();
            try {

                inst = new BatchCKEntity();
                inst.setPk(11);
                inst.setCk(2); // DUPLICATE !!
View Full Code Here

    @Test(dependsOnMethods = "createSchema", expectedExceptions = InvalidQueryException.class)
    public void batch_cas_fail_pkMix() throws Exception {
        PersistenceSession session = persistenceManager.createSession();
        try {
            Batch batch = session.startBatch();
            try {

                BatchCKEntity inst = new BatchCKEntity();
                inst.setPk(21);
                inst.setCk(1);
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.