Class JdoDataStoreFactory.JdoDataStore<V extends Serializable>
java.lang.Object
com.google.api.client.util.store.AbstractDataStore<V>
com.google.api.client.extensions.jdo.JdoDataStoreFactory.JdoDataStore<V>
- All Implemented Interfaces:
DataStore<V>
- Enclosing class:
JdoDataStoreFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Lock
Lock on storing, loading and deleting a credential.private final javax.jdo.PersistenceManagerFactory
Persistence manager factory. -
Constructor Summary
ConstructorsConstructorDescriptionJdoDataStore
(JdoDataStoreFactory dataStore, javax.jdo.PersistenceManagerFactory persistenceManagerFactory, String id) -
Method Summary
Modifier and TypeMethodDescriptionclear()
Deletes all of the stored keys and values.Deletes the stored key and value based on the given key, or ignored if the key doesn't already exist.(package private) Collection
<JdoDataStoreFactory.JdoValue> executeAllKeysQuery
(javax.jdo.Query allKeysQuery) Executes the query for all keys.(package private) JdoDataStoreFactory.JdoValue
executeKeyQuery
(javax.jdo.Query keyQuery, String key) Executes the query for a given key, and returns theJdoDataStoreFactory.JdoValue
.Returns the stored value for the given key ornull
if not found.Returns the data store factory.keySet()
Returns the unmodifiable set of all stored keys.(package private) javax.jdo.Query
newAllKeysQuery
(javax.jdo.PersistenceManager persistenceManager) Returns a new query for all keys.(package private) javax.jdo.Query
newKeyQuery
(javax.jdo.PersistenceManager persistenceManager) Returns a new query for a given key.Stores the given value for the given key (replacing any existing value).toString()
values()
Returns the unmodifiable collection of all stored values.Methods inherited from class com.google.api.client.util.store.AbstractDataStore
containsKey, containsValue, getId, isEmpty, size
-
Field Details
-
lock
Lock on storing, loading and deleting a credential. -
persistenceManagerFactory
private final javax.jdo.PersistenceManagerFactory persistenceManagerFactoryPersistence manager factory.
-
-
Constructor Details
-
JdoDataStore
JdoDataStore(JdoDataStoreFactory dataStore, javax.jdo.PersistenceManagerFactory persistenceManagerFactory, String id)
-
-
Method Details
-
keySet
Description copied from interface:DataStore
Returns the unmodifiable set of all stored keys.Order of the keys is not specified.
- Throws:
IOException
-
values
Description copied from interface:DataStore
Returns the unmodifiable collection of all stored values.- Throws:
IOException
-
get
Description copied from interface:DataStore
Returns the stored value for the given key ornull
if not found.- Parameters:
key
- key ornull
fornull
result- Throws:
IOException
-
set
Description copied from interface:DataStore
Stores the given value for the given key (replacing any existing value).- Parameters:
key
- keyvalue
- value object- Throws:
IOException
-
delete
Description copied from interface:DataStore
Deletes the stored key and value based on the given key, or ignored if the key doesn't already exist.- Parameters:
key
- key ornull
to ignore- Throws:
IOException
-
clear
Description copied from interface:DataStore
Deletes all of the stored keys and values.- Throws:
IOException
-
getDataStoreFactory
Description copied from class:AbstractDataStore
Returns the data store factory.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
- Specified by:
getDataStoreFactory
in interfaceDataStore<V extends Serializable>
- Overrides:
getDataStoreFactory
in classAbstractDataStore<V extends Serializable>
-
toString
-
newAllKeysQuery
javax.jdo.Query newAllKeysQuery(javax.jdo.PersistenceManager persistenceManager) Returns a new query for all keys.- Parameters:
persistenceManager
- persistence manager- Returns:
- new query for all keys
-
executeAllKeysQuery
Executes the query for all keys.- Parameters:
allKeysQuery
- query for all keys- Returns:
- query result
-
newKeyQuery
javax.jdo.Query newKeyQuery(javax.jdo.PersistenceManager persistenceManager) Returns a new query for a given key.- Parameters:
persistenceManager
- persistence manager- Returns:
- new new query for a given key
-
executeKeyQuery
Executes the query for a given key, and returns theJdoDataStoreFactory.JdoValue
.- Parameters:
keyQuery
- query for a given keykey
- key- Returns:
- found
JdoDataStoreFactory.JdoValue
ornull
for none found
-