public abstract class WSBackedDataStoreBase<K,T extends Persistent> extends WSDataStoreBase<K,T> implements WebServiceBackedDataStore<K,T>
WebServiceBackedDataStore
methods.authentication, keyClass, persistentClass, properties
Constructor and Description |
---|
WSBackedDataStoreBase() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the DataStore.
|
void |
createSchema()
Creates the optional schema or table (or similar) in the datastore
to hold the objects.
|
void |
deleteSchema()
Deletes the underlying schema or table (or similar) in the datastore
that holds the objects.
|
Result<K,T> |
execute(Query<K,T> query)
Executes the given query and returns the results.
|
protected abstract Result<K,T> |
executeQuery(Query<K,T> query)
Executes a normal Query reading the whole data.
|
void |
flush()
Forces the write caches to be flushed.
|
void |
initialize(Class<K> keyClass,
Class<T> persistentClass,
Properties properties)
Initializes this DataStore.
|
void |
readFields(Object in)
Reads fields from an object
|
boolean |
schemaExists()
Returns whether the schema that holds the data exists in the datastore.
|
void |
write(Object out)
Writes an object
|
equals, getConf, getKeyClass, getPersistentClass, getSchemaName, getWSProvider, setConf, setKeyClass, setPersistentClass, setWsProvider, truncateSchema
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProvider, setProvider
delete, deleteByQuery, get, get, getBeanFactory, getKeyClass, getPartitions, getPersistentClass, getSchemaName, newKey, newPersistent, newQuery, put, setBeanFactory, setKeyClass, setPersistentClass, truncateSchema
public void initialize(Class<K> keyClass, Class<T> persistentClass, Properties properties)
DataStore
initialize
in interface DataStore<K,T extends Persistent>
initialize
in class WSDataStoreBase<K,T extends Persistent>
keyClass
- the class of the keyspersistentClass
- the class of the persistent objectsproperties
- extra metadatapublic Result<K,T> execute(Query<K,T> query)
DataStore
protected abstract Result<K,T> executeQuery(Query<K,T> query) throws IOException
IOException
public void flush()
DataStore
flush
in interface DataStore<K,T extends Persistent>
public void createSchema()
DataStore
createSchema
in interface DataStore<K,T extends Persistent>
public void deleteSchema()
DataStore
deleteSchema
in interface DataStore<K,T extends Persistent>
public boolean schemaExists()
DataStore
schemaExists
in interface DataStore<K,T extends Persistent>
public void write(Object out) throws Exception
WSDataStoreBase
write
in class WSDataStoreBase<K,T extends Persistent>
Exception
public void readFields(Object in) throws Exception
WSDataStoreBase
readFields
in class WSDataStoreBase<K,T extends Persistent>
Exception
public void close()
DataStore
close
in interface DataStore<K,T extends Persistent>
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.