Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.objectstyle.cayenne.query
Class UpdateQuery

    java.lang.Object
      org.objectstyle.cayenne.query.AbstractQuery
          org.objectstyle.cayenne.query.QualifiedQuery
              org.objectstyle.cayenne.query.UpdateQuery

All Implemented Interfaces:
  java.io.Serializable, Query

    public class UpdateQuery

extends QualifiedQuery

Object encapsulating an UPDATE statement. Note that updated attributes are expressed in terms of DbAttribute names.

See Also:
  Serialized Form

Field Summary
`protected java.util.Map` | `updAttributes`

Fields inherited from class org.objectstyle.cayenne.query.QualifiedQuery
`qualifier`

Fields inherited from class org.objectstyle.cayenne.query.AbstractQuery
`name, root`

Constructor Summary
`UpdateQuery()` Creates empty UpdateQuery.
`UpdateQuery(java.lang.Class rootClass)` Creates a UpdateQuery with null qualifier, for the entity which uses the given class.
`UpdateQuery(java.lang.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(java.lang.String objEntityName)` Creates UpdateQuery with `objEntityName` parameter.
`UpdateQuery(java.lang.String objEntityName, Expression qualifier)` Creates UpdateQuery with `objEntityName` and `qualifier` parameters.

Method Summary
`void` | `addUpdAttribute(java.lang.String attrName, java.lang.Object updatedValue)`
`SQLAction` | `createSQLAction(SQLActionVisitor visitor)` Calls "makeUpdate" on the visitor.
`java.util.Map` | `getUpdAttributes()` Returns a map of updated attributes

Methods inherited from class org.objectstyle.cayenne.query.QualifiedQuery
`andQualifier, getQualifier, orQualifier, setQualifier`

Methods inherited from class org.objectstyle.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

### updAttributes

    protected java.util.Map updAttributes

Constructor Detail

### UpdateQuery

    public UpdateQuery()

  Creates empty UpdateQuery.

### UpdateQuery

    public UpdateQuery(ObjEntity root)

  Creates a UpdateQuery with null qualifier, for the specifed ObjEntity

  Parameters:
    `root` - the ObjEntity this UpdateQuery is for.

### UpdateQuery

    public UpdateQuery(ObjEntity root,
                       Expression qualifier)

  Creates a UpdateQuery for the specifed ObjEntity with the given qualifier

  Parameters:
    `root` - the ObjEntity this UpdateQuery is for.
    `qualifier` - an Expression indicating which objects will be updated

### UpdateQuery

    public UpdateQuery(java.lang.Class rootClass)

  Creates a UpdateQuery with null qualifier, for the entity which uses the given class.

  Parameters:
    `rootClass` - the Class of objects this UpdateQuery is for.

### UpdateQuery

    public UpdateQuery(java.lang.Class rootClass,
                       Expression qualifier)

  Creates a UpdateQuery for the entity which uses the given class, with the given qualifier.

  Parameters:
    `rootClass` - the Class of objects this UpdateQuery is for.
    `qualifier` - an Expression indicating which objects will be updated

### UpdateQuery

    public UpdateQuery(java.lang.String objEntityName)

  Creates UpdateQuery with `objEntityName` parameter.

### UpdateQuery

    public UpdateQuery(java.lang.String objEntityName,
                       Expression qualifier)

  Creates UpdateQuery with `objEntityName` and `qualifier` parameters.

Method Detail

### createSQLAction

    public SQLAction createSQLAction(SQLActionVisitor visitor)

  Calls "makeUpdate" on the visitor.

  Specified by:
    `createSQLAction` in interface `Query`
  Specified by:
    `createSQLAction` in class `AbstractQuery`
  Since:
    1.2

### addUpdAttribute

    public void addUpdAttribute(java.lang.String attrName,
                                java.lang.Object updatedValue)

### getUpdAttributes

    public java.util.Map getUpdAttributes()

  Returns a map of updated attributes

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 ObjectStyle.org All Rights Reserved.