Package org.apache.cayenne.query

Examples of org.apache.cayenne.query.UpdateQuery


    /**
     * Helper method to update a single column in a database row.
     */
    protected void updateRow(ObjectId id, String dbAttribute, Object newValue) {
        UpdateQuery updateQuery = new UpdateQuery();
        updateQuery.setRoot(id.getEntityName());
        updateQuery.addUpdAttribute(dbAttribute, newValue);

        // set qualifier
        updateQuery.setQualifier(ExpressionFactory.matchAllDbExp(
                id.getIdSnapshot(),
                Expression.EQUAL_TO));

        getDomain().onQuery(null, updateQuery);
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.query.UpdateQuery

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.