|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.gdata.storage.db4o.DB4oStorage
public class DB4oStorage
Storage implementation for the DB4o storage component
| Constructor Summary | |
|---|---|
protected |
DB4oStorage(ObjectContainer container,
StorageController controller)
|
| Method Summary | |
|---|---|
void |
close()
close this storage instance. |
void |
deleteAccount(String accountname)
Deletes the account for the given account name. |
void |
deleteEntry(ServerBaseEntry entry)
Deletes the given entry. |
void |
deleteFeed(String feedId)
Deletes the feed for the given feed id. |
GDataAccount |
getAccount(String accountName)
Retrieves the GDataAccount for the given account name |
String |
getAccountNameForFeedId(String feedId)
Each feed belongs to one specific account. |
BaseEntry |
getEntry(ServerBaseEntry entry)
Retrieves the requested entry from the storage. |
Long |
getEntryLastModified(String entryId,
String feedId)
Retrieves the date of the last modification for the given id |
BaseFeed |
getFeed(ServerBaseFeed feed)
Retrieves the requested feed from the storage. |
Long |
getFeedLastModified(String feedId)
Retrieves the date of the last modification for the given id |
String |
getServiceForFeed(String feedId)
Retrieves the service name for a stored feed |
void |
storeAccount(GDataAccount account)
Saves a new account. |
BaseEntry |
storeEntry(ServerBaseEntry entry)
Stores the given entry. |
void |
storeFeed(ServerBaseFeed feed,
String accountname)
Stores a new feed for a existing account. |
void |
updateAccount(GDataAccount account)
Updates an existing account. |
BaseEntry |
updateEntry(ServerBaseEntry entry)
Updates the given entry. |
void |
updateFeed(ServerBaseFeed feed,
String accountname)
Updates a stored feed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DB4oStorage(ObjectContainer container,
StorageController controller)
| Method Detail |
|---|
public BaseEntry storeEntry(ServerBaseEntry entry)
throws StorageException
Storage
storeEntry in interface Storageentry - -
the entry to store
StorageException - -
if the entry can not be stored or required field are not set.Storage.storeEntry(org.apache.lucene.gdata.data.ServerBaseEntry)
public void deleteEntry(ServerBaseEntry entry)
throws StorageException
Storage
deleteEntry in interface Storageentry - -
the entry to delete from the storage
StorageException - -
if the entry can not be deleted or the entry does not exist
or required field are not set.Storage.deleteEntry(org.apache.lucene.gdata.data.ServerBaseEntry)
public BaseEntry updateEntry(ServerBaseEntry entry)
throws StorageException
StorageProvidedService
updateEntry in interface Storageentry - -
the entry to update
StorageException - -
if the entry can not be updated or does not exist or required
field are not set.Storage.updateEntry(org.apache.lucene.gdata.data.ServerBaseEntry)
public BaseFeed getFeed(ServerBaseFeed feed)
throws StorageException
Storage
getFeed in interface Storagefeed - -
the to retieve from the storage
StorageException - -
the feed does not exist or can not be retrieved or required
field are not set.Storage.getFeed(org.apache.lucene.gdata.data.ServerBaseFeed)
public BaseEntry getEntry(ServerBaseEntry entry)
throws StorageException
Storage
getEntry in interface Storageentry - -
the entry to retrieve
StorageException - -
if the entry does not exist or can not be created or required
field are not set.Storage.getEntry(org.apache.lucene.gdata.data.ServerBaseEntry)
public void storeAccount(GDataAccount account)
throws StorageException
Storage
storeAccount in interface Storageaccount - -
the account to save
StorageException - -
if the account can not be stored or the account already
exists or required field are not set.Storage.storeAccount(org.apache.lucene.gdata.data.GDataAccount)
public void updateAccount(GDataAccount account)
throws StorageException
Storage
updateAccount in interface Storageaccount - -
the account to update
StorageException - -
if the account does not exist or required field are not set.Storage.updateAccount(org.apache.lucene.gdata.data.GDataAccount)
public void deleteAccount(String accountname)
throws StorageException
Storage
deleteAccount in interface Storageaccountname - -
the name of the account to delete
StorageException - -
if the account does not existStorage.deleteAccount(java.lang.String)
public void storeFeed(ServerBaseFeed feed,
String accountname)
throws StorageException
Storage
storeFeed in interface Storagefeed - -
the feed to createaccountname - -
the account name belongs to the feed
StorageException - -
if the feed already exists or the feed can not be storedStorage.storeFeed(org.apache.lucene.gdata.data.ServerBaseFeed,
java.lang.String)
public void deleteFeed(String feedId)
throws StorageException
Storage
deleteFeed in interface StoragefeedId - -
the feed id for the feed to delete.
StorageException - -
if the feed for the feed id does not exist or the feed can
not be deletedStorage.deleteFeed(java.lang.String)
public void updateFeed(ServerBaseFeed feed,
String accountname)
throws StorageException
Storage
updateFeed in interface Storagefeed - -
the feed to updateaccountname - -
the account name belongs to the feed
StorageException - -
if the feed does not exist or the feed can not be updatedStorage.updateFeed(org.apache.lucene.gdata.data.ServerBaseFeed,
java.lang.String)
public String getServiceForFeed(String feedId)
throws StorageException
Storage
getServiceForFeed in interface StoragefeedId - -
the feed id
StorageException - -
if no feed for the provided id is storedStorage.getServiceForFeed(java.lang.String)
public GDataAccount getAccount(String accountName)
throws StorageException
StorageGDataAccount for the given account name
getAccount in interface StorageaccountName - -
the name of the requested account
GDataAccount instance for the requested account name
StorageException - -
if no account for the account name is storedStorage.getAccount(java.lang.String)public void close()
Storage
close in interface StorageStorage.close()
public String getAccountNameForFeedId(String feedId)
throws StorageException
Storage
getAccountNameForFeedId in interface StoragefeedId - -
the id of the feed to retrieve the accountname
StorageException - -
if the feed is not stored or the storage can not be accessedStorage.getAccountNameForFeedId(java.lang.String)
public Long getEntryLastModified(String entryId,
String feedId)
throws StorageException
Storage
getEntryLastModified in interface StorageentryId - -
the entry IdfeedId - -
the feed which contains the entry
new Long(0) if the resource can not be found eg.
the time can not be accessed
StorageException - -
if the storage can not be accessedStorage.getEntryLastModified(java.lang.String, java.lang.String)
public Long getFeedLastModified(String feedId)
throws StorageException
Storage
getFeedLastModified in interface StoragefeedId - -
the feed Id
new Long(0) if the resource can not be found eg.
the time can not be accessed
StorageException - -
if the storage can not be accessedStorage.getFeedLastModified(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||