org.vfny.geoserver.requests.wfs
Class UpdateRequest

java.lang.Object
  extended byorg.vfny.geoserver.requests.wfs.SubTransactionRequest
      extended byorg.vfny.geoserver.requests.wfs.UpdateRequest

public class UpdateRequest
extends SubTransactionRequest

This class represents an update request. An update request consists of one or more properties, which consist of a name and an attribute, and a filter. A property is represented by an inner class called Property, which are added to the property list by calling add Property.


Field Summary
protected  boolean releaseAll
          Specifices the user-defined name for the entire get feature request
protected  java.lang.String typeName
          Specifies the table of features
 
Fields inherited from class org.vfny.geoserver.requests.wfs.SubTransactionRequest
DELETE, handle, INSERT, UPDATE
 
Constructor Summary
UpdateRequest()
          Constructor
 
Method Summary
 void addProperty(java.lang.String propertyName, java.lang.Object value)
          adds a property to this update object.
 boolean equals(java.lang.Object obj)
           
 org.geotools.filter.Filter getFilter()
          Gets the filter for this request
 short getOpType()
          Gets the subtransaction type.
 java.lang.String[] getPropertyNames()
          Gets the list of property names.
 boolean getReleaseAll()
          Gets whether all locked features should be released after this transaction, or only those that were affected.
 java.lang.String getTypeName()
          Gets the name of the features to update.
 org.geotools.feature.AttributeType[] getTypes(org.geotools.feature.FeatureType schema)
          Gets the attribute types that correspond to the names of properties in the passed in schema.
 java.lang.Object[] getValues()
          Gets the list of property values.
 void setFilter(org.geotools.filter.Filter filter)
          Sets the filter for this request.
 void setReleaseAll(boolean releaseAll)
          Sets whether all locked features should be released after this transaction, or only those that were affected.
 void setTypeName(java.lang.String typeName)
          Sets the name of the features to update.
 java.lang.String toString()
           
 
Methods inherited from class org.vfny.geoserver.requests.wfs.SubTransactionRequest
getHandle, setHandle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

typeName

protected java.lang.String typeName
Specifies the table of features


releaseAll

protected boolean releaseAll
Specifices the user-defined name for the entire get feature request

Constructor Detail

UpdateRequest

public UpdateRequest()
Constructor

Method Detail

addProperty

public void addProperty(java.lang.String propertyName,
                        java.lang.Object value)
adds a property to this update object.

Parameters:
propertyName - The name of the attribute that will be changed.
value - The value to be changed.

getTypeName

public java.lang.String getTypeName()
Gets the name of the features to update.

Overrides:
getTypeName in class SubTransactionRequest
Returns:
The type name of the features for this request.

setTypeName

public void setTypeName(java.lang.String typeName)
Sets the name of the features to update.

Overrides:
setTypeName in class SubTransactionRequest
Parameters:
typeName - The type name of the features for this request.

getReleaseAll

public boolean getReleaseAll()
Gets whether all locked features should be released after this transaction, or only those that were affected.

Returns:
if all locks should be released.

setReleaseAll

public void setReleaseAll(boolean releaseAll)
Sets whether all locked features should be released after this transaction, or only those that were affected.

Parameters:
releaseAll - if all locks should be released.

setFilter

public void setFilter(org.geotools.filter.Filter filter)
Sets the filter for this request.

Overrides:
setFilter in class SubTransactionRequest
Parameters:
filter - The geotools filter to query against.

getFilter

public org.geotools.filter.Filter getFilter()
Gets the filter for this request

Returns:
The geotools filter to query against.

getValues

public java.lang.Object[] getValues()
Gets the list of property values.

Returns:
An array of property values.

getPropertyNames

public java.lang.String[] getPropertyNames()
Gets the list of property names.

Returns:
A String array of the property names.

getTypes

public org.geotools.feature.AttributeType[] getTypes(org.geotools.feature.FeatureType schema)
                                              throws org.geotools.feature.SchemaException
Gets the attribute types that correspond to the names of properties in the passed in schema.

Parameters:
schema - Queried with property names to find the types.
Returns:
an array of attribute types, in the same order as getValues.
Throws:
org.geotools.feature.SchemaException - if any of the names held by properties of this request don't match the schema.

getOpType

public short getOpType()
Gets the subtransaction type.

Specified by:
getOpType in class SubTransactionRequest
Returns:
The short representation of UPDATE.

equals

public boolean equals(java.lang.Object obj)

toString

public java.lang.String toString()