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
- Since:
- 1.16
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LockLock on storing, loading and deleting a credential.private final javax.jdo.PersistenceManagerFactoryPersistence 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.JdoValueexecuteKeyQuery(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 ornullif not found.Returns the data store factory.keySet()Returns the unmodifiable set of all stored keys.(package private) javax.jdo.QuerynewAllKeysQuery(javax.jdo.PersistenceManager persistenceManager) Returns a new query for all keys.(package private) javax.jdo.QuerynewKeyQuery(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 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:DataStoreReturns the unmodifiable set of all stored keys.Order of the keys is not specified.
- Throws:
IOException
-
values
Description copied from interface:DataStoreReturns the unmodifiable collection of all stored values.- Throws:
IOException
-
get
Description copied from interface:DataStoreReturns the stored value for the given key ornullif not found.- Parameters:
key- key ornullfornullresult- Throws:
IOException
-
set
Description copied from interface:DataStoreStores the given value for the given key (replacing any existing value).- Parameters:
key- keyvalue- value object- Throws:
IOException
-
delete
Description copied from interface:DataStoreDeletes the stored key and value based on the given key, or ignored if the key doesn't already exist.- Parameters:
key- key ornullto ignore- Throws:
IOException
-
clear
Description copied from interface:DataStoreDeletes all of the stored keys and values.- Throws:
IOException
-
getDataStoreFactory
Description copied from class:AbstractDataStoreReturns 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:
getDataStoreFactoryin interfaceDataStore<V extends Serializable>- Overrides:
getDataStoreFactoryin 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.JdoValueornullfor none found
-