com.googlecode.jpattern.orm.query
Class OrmUpdate

java.lang.Object
  extended by com.googlecode.jpattern.orm.query.OrmUpdate
All Implemented Interfaces:
INameSolverConsumer, IRenderableSqlObject, IUpdate

public class OrmUpdate
extends Object
implements IUpdate, INameSolverConsumer

Author:
Francesco Cina 10/lug/2011

Constructor Summary
OrmUpdate(Class<?> clazz, IOrmClassToolMap ormClassToolMap, ISessionSqlPerformer session)
           
 
Method Summary
 void appendValues(List<Object> values)
          Append to the list all the values of the expression's elements
 int getQueryTimeout()
          Return the query timeout for the query.
 int perform()
          Perform the update and return the number of affected rows.
 String renderSql()
          Return the sql query generated by this IQuery Object
 void renderSql(StringBuilder StringBuilder)
          Append to the string buffer the sql query generated by this IQuery Object
 ISetClause set()
          Create or modify the "SET" clause of the update statement.
 void setNameSolver(INameSolver nameSolver)
           
 IUpdate setQueryTimeout(int queryTimeout)
          Set the query timeout for the query.
 IExpression where()
          Create or modify the "WHERE" clause of the statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrmUpdate

public OrmUpdate(Class<?> clazz,
                 IOrmClassToolMap ormClassToolMap,
                 ISessionSqlPerformer session)
Method Detail

where

public IExpression where()
Description copied from interface: IUpdate
Create or modify the "WHERE" clause of the statement.

Specified by:
where in interface IUpdate
Returns:

perform

public int perform()
Description copied from interface: IUpdate
Perform the update and return the number of affected rows.

Specified by:
perform in interface IUpdate
Returns:

appendValues

public void appendValues(List<Object> values)
Description copied from interface: IUpdate
Append to the list all the values of the expression's elements

Specified by:
appendValues in interface IUpdate

setQueryTimeout

public IUpdate setQueryTimeout(int queryTimeout)
Description copied from interface: IUpdate
Set the query timeout for the query.

Specified by:
setQueryTimeout in interface IUpdate

getQueryTimeout

public int getQueryTimeout()
Description copied from interface: IUpdate
Return the query timeout for the query.

Specified by:
getQueryTimeout in interface IUpdate

setNameSolver

public void setNameSolver(INameSolver nameSolver)
Specified by:
setNameSolver in interface INameSolverConsumer

renderSql

public String renderSql()
Description copied from interface: IRenderableSqlObject
Return the sql query generated by this IQuery Object

Specified by:
renderSql in interface IRenderableSqlObject
Returns:

renderSql

public void renderSql(StringBuilder StringBuilder)
Description copied from interface: IRenderableSqlObject
Append to the string buffer the sql query generated by this IQuery Object

Specified by:
renderSql in interface IRenderableSqlObject

set

public ISetClause set()
Description copied from interface: IUpdate
Create or modify the "SET" clause of the update statement.

Specified by:
set in interface IUpdate
Returns:


Copyright © 2011. All Rights Reserved.