|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.query.AbstractQuery
org.apache.cayenne.query.QualifiedQuery
org.apache.cayenne.query.UpdateQuery
public class UpdateQuery
Object encapsulating an UPDATE statement. Note that updated attributes are expressed in terms of DbAttribute names.
| Field Summary | |
|---|---|
protected Map |
updAttributes
|
| Fields inherited from class org.apache.cayenne.query.QualifiedQuery |
|---|
qualifier |
| Fields inherited from class org.apache.cayenne.query.AbstractQuery |
|---|
name, root |
| Constructor Summary | |
|---|---|
UpdateQuery()
Creates empty UpdateQuery. |
|
UpdateQuery(Class rootClass)
Creates a UpdateQuery with null qualifier, for the entity which uses the given class. |
|
UpdateQuery(Class rootClass,
Expression qualifier)
Creates a UpdateQuery for the entity which uses the given class, with the given qualifier. |
|
UpdateQuery(ObjEntity root)
Creates a UpdateQuery with null qualifier, for the specifed ObjEntity |
|
UpdateQuery(ObjEntity root,
Expression qualifier)
Creates a UpdateQuery for the specifed ObjEntity with the given qualifier |
|
UpdateQuery(String objEntityName)
Creates UpdateQuery with objEntityName parameter. |
|
UpdateQuery(String objEntityName,
Expression qualifier)
Creates UpdateQuery with objEntityName and qualifier
parameters. |
|
| Method Summary | |
|---|---|
void |
addUpdAttribute(String attrName,
Object updatedValue)
|
SQLAction |
createSQLAction(SQLActionVisitor visitor)
Calls "makeUpdate" on the visitor. |
Map |
getUpdAttributes()
Returns a map of updated attributes |
| Methods inherited from class org.apache.cayenne.query.QualifiedQuery |
|---|
andQualifier, getQualifier, orQualifier, setQualifier |
| Methods inherited from class org.apache.cayenne.query.AbstractQuery |
|---|
getMetaData, getName, getRoot, route, setName, setRoot, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Map updAttributes
| Constructor Detail |
|---|
public UpdateQuery()
public UpdateQuery(ObjEntity root)
root - the ObjEntity this UpdateQuery is for.
public UpdateQuery(ObjEntity root,
Expression qualifier)
root - the ObjEntity this UpdateQuery is for.qualifier - an Expression indicating which objects will be updatedpublic UpdateQuery(Class rootClass)
rootClass - the Class of objects this UpdateQuery is for.
public UpdateQuery(Class rootClass,
Expression qualifier)
rootClass - the Class of objects this UpdateQuery is for.qualifier - an Expression indicating which objects will be updatedpublic UpdateQuery(String objEntityName)
objEntityName parameter.
public UpdateQuery(String objEntityName,
Expression qualifier)
objEntityName and qualifier
parameters.
| Method Detail |
|---|
public SQLAction createSQLAction(SQLActionVisitor visitor)
createSQLAction in interface QuerycreateSQLAction in class AbstractQuery
public void addUpdAttribute(String attrName,
Object updatedValue)
public Map getUpdAttributes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||