| |
|
| java.lang.Object org.geotools.data.TransactionStateDiff
TransactionStateDiff | public class TransactionStateDiff implements State(Code) | | A Transaction.State that keeps a difference table for use with
AbstractDataStore.
author: Jody Garnett, Refractions Research |
Method Summary | |
public synchronized void | addAuthorization(String AuthID) | void | applyDiff(String typeName, Diff diff) Called by commit() to apply one set of diff
diff will be modified as the differneces are applied, If the opperations
is successful diff will be empty at the end of this process. | public synchronized void | commit() Will apply differences to store. | public synchronized Diff | diff(String typeName) | boolean | exists(String typeName) | public synchronized FeatureReader | reader(String typeName) Convience Method for a Transaction based FeatureReader. | public synchronized void | rollback() | public synchronized void | setTransaction(Transaction transaction) | public synchronized FeatureWriter | writer(String typeName, Filter filter) Convience Method for a Transaction based FeatureWriter
Constructs a DiffFeatureWriter that works against this Transaction. |
store | AbstractDataStore store(Code) | | DataStore used to commit() results of this transaction.
See Also: TransactionStateDiff.commit(); |
transaction | Transaction transaction(Code) | | Tranasction this State is opperating against.
|
typeNameDiff | Map typeNameDiff(Code) | | Map of differences by typeName.
Differences are stored as a Map of Feature by fid, and are reset during
a commit() or rollback().
|
addAuthorization | public synchronized void addAuthorization(String AuthID) throws IOException(Code) | | See Also: org.geotools.data.Transaction.State.addAuthorization(java.lang.String) |
applyDiff | void applyDiff(String typeName, Diff diff) throws IOException(Code) | | Called by commit() to apply one set of diff
diff will be modified as the differneces are applied, If the opperations
is successful diff will be empty at the end of this process.
diff can be used to represent the following operations:
-
fid|null: represents a fid being removed
-
fid|feature: where fid exists, represents feature modification
-
fid|feature: where fid does not exist, represents feature being modified
Parameters: typeName - typeName being updated Parameters: diff - differences to apply to FeatureWriter throws: IOException - If the entire diff cannot be writen out throws: DataSourceException - If the entire diff cannot be writen out |
commit | public synchronized void commit() throws IOException(Code) | | Will apply differences to store.
See Also: org.geotools.data.Transaction.State.commit |
reader | public synchronized FeatureReader reader(String typeName) throws IOException(Code) | | Convience Method for a Transaction based FeatureReader.
Constructs a DiffFeatureReader that works against this Transaction.
Parameters: typeName - TypeName to aquire a Reader on FeatureReader the mask orgional contents with against thecurrent Differences recorded by the Tansasction State throws: IOException - If typeName is not Manged by this Tansaction State |
rollback | public synchronized void rollback() throws IOException(Code) | | See Also: org.geotools.data.Transaction.State.rollback |
writer | public synchronized FeatureWriter writer(String typeName, Filter filter) throws IOException(Code) | | Convience Method for a Transaction based FeatureWriter
Constructs a DiffFeatureWriter that works against this Transaction.
Parameters: typeName - Type Name to record differences against Parameters: filter - A FeatureWriter that records Differences against a FeatureReader throws: IOException - If a FeatureRader could not be constucted to recorddifferences against |
|
|
|