public class RenamingGranuleStore extends RenamingGranuleSource implements GranuleStore
RenamingGranuleSource
delegate, name, schema
Constructor and Description |
---|
RenamingGranuleStore(String name,
GranuleStore delegate) |
Modifier and Type | Method and Description |
---|---|
void |
addGranules(SimpleFeatureCollection granules)
Add all the granules from the specified collection to this
GranuleStore . |
Transaction |
getTransaction()
Gets the
Transaction that this GranuleStore is currently operating against. |
int |
removeGranules(Filter filter)
Removes granules selected by the given filter.
|
int |
removeGranules(Filter filter,
Hints hints)
Removes granules selected by the given filter, controlled by a set of hints (might be
implementation dependent and eventually ignored).
|
void |
setTransaction(Transaction transaction)
Provide a transaction for commit/rollback control of a modifying operation on this
GranuleStore . |
void |
updateGranules(String[] attributeNames,
Object[] attributeValues,
Filter filter)
Modifies the attributes with the supplied values in all granules selected by the given
filter.
|
dispose, getBounds, getCount, getGranules, getSchema, renameQuery
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, getBounds, getCount, getGranules, getSchema
public RenamingGranuleStore(String name, GranuleStore delegate) throws IOException
IOException
public void addGranules(SimpleFeatureCollection granules)
GranuleStore
GranuleStore
.addGranules
in interface GranuleStore
granules
- the granules to addpublic int removeGranules(Filter filter)
GranuleStore
removeGranules
in interface GranuleStore
filter
- an OpenGIS filterpublic int removeGranules(Filter filter, Hints hints)
GranuleStore
removeGranules
in interface GranuleStore
filter
- an OpenGIS filterhints
- a set of hints to control how the removal is performedpublic void updateGranules(String[] attributeNames, Object[] attributeValues, Filter filter)
GranuleStore
updateGranules
in interface GranuleStore
attributeNames
- the attributes to modifyattributeValues
- the new values for the attributesfilter
- an OpenGIS filterpublic Transaction getTransaction()
GranuleStore
Transaction
that this GranuleStore
is currently operating against.
Transaction t = GranuleStore.getTransaction();
try {
GranuleStore.addGranules (granules);
t.commit();
} catch( IOException erp ){
// something went wrong;
t.rollback();
}
getTransaction
in interface GranuleStore
public void setTransaction(Transaction transaction)
GranuleStore
GranuleStore
.
Transation t = new DefaultTransaction();
GranuleStore.setTransaction(t);
try {
GranuleStore.addGranules (granules);
t.commit();
} catch ( IOException ex ) {
// something went wrong;
t.rollback();
} finally {
t.close();
}
setTransaction
in interface GranuleStore
transaction
- the transactionCopyright © 1996–2019 Geotools. All rights reserved.