com.jpattern.orm.query.update
Class UpdateQueryOrm

java.lang.Object
  extended by com.jpattern.orm.query.SmartRenderableSqlQuery
      extended by com.jpattern.orm.query.update.UpdateQueryOrm
All Implemented Interfaces:
NameSolverConsumer, QueryRoot, RenderableSqlQuery, UpdateQuery, UpdateQueryCommon

public class UpdateQueryOrm
extends SmartRenderableSqlQuery
implements UpdateQuery, NameSolverConsumer

Author:
Francesco Cina 10/lug/2011

Constructor Summary
UpdateQueryOrm(Class<?> clazz, IOrmClassToolMap ormClassToolMap, SessionSqlPerformer session, TypeFactory typeFactory)
           
 
Method Summary
 void appendValues(List<Object> values)
          Append to the list all the values of the expression's elements
 void doRender(StringBuilder StringBuilder)
           
 int getQueryTimeout()
          Return the query timeout for the query.
 int getStatusVersion()
           
 int perform()
          Perform the update and return the number of affected rows.
 UpdateSet set()
          Create or modify the "SET" clause of the update statement.
 void setNameSolver(NameSolver nameSolver)
           
 UpdateQuery setQueryTimeout(int queryTimeout)
          Set the query timeout for the query.
 UpdateWhere where()
          Create or modify the "WHERE" clause of the statement.
 
Methods inherited from class com.jpattern.orm.query.SmartRenderableSqlQuery
isStatusChanged, renderSql, renderSql
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jpattern.orm.query.RenderableSqlQuery
renderSql, renderSql
 

Constructor Detail

UpdateQueryOrm

public UpdateQueryOrm(Class<?> clazz,
                      IOrmClassToolMap ormClassToolMap,
                      SessionSqlPerformer session,
                      TypeFactory typeFactory)
Method Detail

where

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

Specified by:
where in interface UpdateQuery
Returns:

perform

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

Specified by:
perform in interface UpdateQueryCommon
Returns:

appendValues

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

Specified by:
appendValues in interface RenderableSqlQuery

setQueryTimeout

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

Specified by:
setQueryTimeout in interface UpdateQueryCommon

getQueryTimeout

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

Specified by:
getQueryTimeout in interface UpdateQueryCommon

setNameSolver

public void setNameSolver(NameSolver nameSolver)
Specified by:
setNameSolver in interface NameSolverConsumer

getStatusVersion

public int getStatusVersion()
Specified by:
getStatusVersion in class SmartRenderableSqlQuery

doRender

public final void doRender(StringBuilder StringBuilder)
Specified by:
doRender in class SmartRenderableSqlQuery

set

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

Specified by:
set in interface UpdateQuery
Returns:


Copyright © 2013. All Rights Reserved.