public abstract class WSDataStoreBase<K,T extends Persistent> extends Object implements DataStore<K,T>
DataStore
s.Modifier and Type | Field and Description |
---|---|
protected Object |
authentication
The authentication object to be used for our provider
|
protected Class<K> |
keyClass
Class of the key to be used
|
protected Class<T> |
persistentClass
Class of the persistent object
|
protected Properties |
properties
Properties object
|
Constructor and Description |
---|
WSDataStoreBase()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
getConf()
Gets the configuration (authentication) object
|
Class<K> |
getKeyClass()
Returns the class of the keys
|
Class<T> |
getPersistentClass()
Returns the class of the persistent objects
|
protected String |
getSchemaName(String mappingSchemaName,
Class<?> persistentClass)
Returns the name of the schema to use for the persistent class.
|
String |
getWSProvider()
Get the service provider name.
|
void |
initialize(Class<K> keyClass,
Class<T> persistentClass,
Properties properties)
Initializes this DataStore.
|
void |
readFields(Object obj)
Reads fields from an object
|
void |
setConf(Object auth)
Sets the configuration (authentication) object
|
void |
setKeyClass(Class<K> keyClass)
Sets the class of the keys
|
void |
setPersistentClass(Class<T> persistentClass)
Sets the class of the persistent objects
|
void |
setWsProvider(String wsProvider)
Sets web service provider name
|
void |
truncateSchema()
Deletes all the data associated with the schema, but keeps the
schema (table or similar) intact.
|
void |
write(Object obj)
Writes an object
|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, createSchema, delete, deleteByQuery, deleteSchema, execute, flush, get, get, getBeanFactory, getPartitions, getSchemaName, newKey, newPersistent, newQuery, put, schemaExists, setBeanFactory
protected Class<T extends Persistent> persistentClass
protected Object authentication
protected Properties properties
public void initialize(Class<K> keyClass, Class<T> persistentClass, Properties properties)
DataStore
initialize
in interface DataStore<K,T extends Persistent>
keyClass
- the class of the keyspersistentClass
- the class of the persistent objectsproperties
- extra metadatapublic void setPersistentClass(Class<T> persistentClass)
DataStore
setPersistentClass
in interface DataStore<K,T extends Persistent>
persistentClass
- class of persistent objectspublic Class<T> getPersistentClass()
DataStore
getPersistentClass
in interface DataStore<K,T extends Persistent>
public Class<K> getKeyClass()
DataStore
getKeyClass
in interface DataStore<K,T extends Persistent>
public void setKeyClass(Class<K> keyClass)
DataStore
setKeyClass
in interface DataStore<K,T extends Persistent>
keyClass
- the class of keyspublic Object getConf()
public void setConf(Object auth)
public void readFields(Object obj) throws Exception
obj
- Object to read from.Exception
public void write(Object obj) throws Exception
obj
- Object to write.Exception
public void truncateSchema()
DataStore
truncateSchema
in interface DataStore<K,T extends Persistent>
protected String getSchemaName(String mappingSchemaName, Class<?> persistentClass)
mappingSchemaName
- the name of the schema as read from the mapping filepersistentClass
- persistent classpublic String getWSProvider()
public void setWsProvider(String wsProvider)
wsProvider
- Name to set the service provider to.Copyright © 2010-2015 The Apache Software Foundation. All Rights Reserved.