Examples of SqlUpdate


Examples of org.ofbiz.sql.SQLUpdate

            SQLStatement<?> stmt = stmtIt.next();
            assertEquals("secondInsert", insert, stmt);
            assertEquals("secondInsert:parse", parser(insert).InsertStatement(), parser(stmt).InsertStatement());
        }
        {
            SQLUpdate update = new SQLUpdate(
                new Table(new TableName("Person", null), null),
                list(
                    new SetField("lastName", new MathValue("||", list(new StringValue("auto-"), new FieldValue(null, "partyId"))))
                ),
                new ListCondition(new FieldValue(null, "partyId"), "IN", GenericTestCaseBase.<Value>list(new StringValue("a"), new StringValue("b")))
            );
            SQLStatement<?> stmt = stmtIt.next();
            assertEquals("firstUpdate", update, stmt);
            assertEquals("firstUpdate:parse", parser(update).UpdateStatement(), parser(stmt).UpdateStatement());
        }
        {
            SQLUpdate update = new SQLUpdate(
                new Table(new TableName("Person", null), null),
                list(
                    new SetField("lastName", new MathValue("||", list(new StringValue("auto-"), new FieldValue(null, "partyId")))),
                    new SetField("height", new NumberValue<Integer>(Integer.valueOf(5))),
                    new SetField("width", new NumberValue<Integer>(Integer.valueOf(7)))
                ),
                new ListCondition(new FieldValue(null, "partyId"), "IN", GenericTestCaseBase.<Value>list(new StringValue("a"), new StringValue("b")))
            );
            SQLStatement<?> stmt = stmtIt.next();
            assertEquals("secondUpdate", update, stmt);
            assertEquals("secondUpdate:parse", parser(update).UpdateStatement(), parser(stmt).UpdateStatement());
        }
        {
            SQLUpdate update = new SQLUpdate(
                new Table(new TableName("Person", null), null),
                list(
                    new SetField("lastName", new MathValue("||", list(new StringValue("auto-"), new FieldValue(null, "partyId")))),
                    new SetField("height", new NumberValue<Integer>(Integer.valueOf(6))),
                    new SetField("width", new NumberValue<Integer>(Integer.valueOf(5))),
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.