Package com.mysema.query.sql.dml

Examples of com.mysema.query.sql.dml.SQLUpdateClause


        // query
        SQLQuery query = new SQLQuery(connection, configuration);
        assertEquals(Gender.MALE, query.from(person).where(person.id.eq(10)).uniqueResult(person.gender));

        // update
        SQLUpdateClause update = new SQLUpdateClause(connection, configuration, person);
        update.set(person.gender, Gender.FEMALE);
        update.set(person.firstname, "Jane");
        update.where(person.id.eq(10));
        update.execute();

        // query
        query = new SQLQuery(connection, configuration);
        assertEquals(Gender.FEMALE, query.from(person).where(person.id.eq(10)).uniqueResult(person.gender));
    }
View Full Code Here

TOP

Related Classes of com.mysema.query.sql.dml.SQLUpdateClause

Copyright © 2018 www.massapicom. 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.