|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistenceManagerIF
General interface for all persistence managers. This interface defines methods, which can be safely used by client application to perform changes over persistent data.
Main assumption is that client application operates with objects (instances) created ONLY by manager instance. Some persistence implementations might be very sensitive to duplicate objects representing the same data in persistent storage. Please take care about thread-safety of your implementation. Single instance will be shared byPersistenceManagerConfig
through whole application.
Method Summary | |
---|---|
void |
addChannelToGroup(ChannelIF channel,
ChannelGroupIF group)
Adds channel to the group . |
ChannelIF |
createChannel(String title,
URL location)
Creates new channel object and persists it into storage. |
ChannelGroupIF |
createGroup(String title)
Creates new group of channels in persistent storage. |
ItemIF |
createItem(ChannelIF channel,
ItemIF ethalon)
Creates new item using specified object as ethalon. |
ItemIF |
createItem(ChannelIF channel,
String title)
Creates new item in the channel. |
void |
deleteChannel(ChannelIF channel)
Deletes channel from persistent storage. |
void |
deleteGroup(ChannelGroupIF group)
Deletes group from persistent storage. |
void |
deleteItem(ItemIF item)
Deletes the item from the persistent storage. |
ChannelGroupIF[] |
getGroups()
Returns the list of groups available in database. |
void |
mergeGroups(ChannelGroupIF first,
ChannelGroupIF second)
Takes channels from the second group and put them all in first
group. |
void |
removeChannelFromGroup(ChannelIF channel,
ChannelGroupIF group)
Deletes channel from the group . |
void |
updateChannel(ChannelIF channel)
Updates data in database with data from channel object. |
void |
updateGroup(ChannelGroupIF group)
Updates data in storage with data from the group object. |
void |
updateItem(ItemIF item)
Updates data in database with data from item object. |
Method Detail |
---|
ChannelGroupIF createGroup(String title) throws PersistenceManagerException
title
- title of the group.
PersistenceManagerException
- in case of any problems.void updateGroup(ChannelGroupIF group) throws PersistenceManagerException
group
- group object
PersistenceManagerException
- in case of any problems.void deleteGroup(ChannelGroupIF group) throws PersistenceManagerException
group
- group to delete.
PersistenceManagerException
- in case of any problems.void mergeGroups(ChannelGroupIF first, ChannelGroupIF second) throws PersistenceManagerException
second
group and put them all in first
group. Then second
group is deleted.
first
- first group of channels.second
- second group of channels.
PersistenceManagerException
- in case of any problems.ChannelGroupIF[] getGroups() throws PersistenceManagerException
PersistenceManagerException
- in case of any problems.ChannelIF createChannel(String title, URL location) throws PersistenceManagerException
title
- title of the channel.location
- location of channel data resource.
PersistenceManagerException
- in case of any problems.void updateChannel(ChannelIF channel) throws PersistenceManagerException
channel
- channel object.
PersistenceManagerException
- in case of any problems.void addChannelToGroup(ChannelIF channel, ChannelGroupIF group) throws PersistenceManagerException
channel
to the group
.
channel
- channel to add.group
- group to use.
PersistenceManagerException
- in case of any problems.void removeChannelFromGroup(ChannelIF channel, ChannelGroupIF group) throws PersistenceManagerException
channel
from the group
.
This method doesn't delete channel from persistent storage. It only
breaks the association between channel and group.
channel
- channel to delete.group
- group to use.
PersistenceManagerException
- in case of any problems.void deleteChannel(ChannelIF channel) throws PersistenceManagerException
channel
- channel to delete.
PersistenceManagerException
- in case of any problems.ItemIF createItem(ChannelIF channel, String title) throws PersistenceManagerException
channel
- channel to put new item into.title
- title of new item.
PersistenceManagerException
- in case of any problems.ItemIF createItem(ChannelIF channel, ItemIF ethalon) throws PersistenceManagerException
channel
- channel to put new item into.ethalon
- object to copy properties values from.
PersistenceManagerException
- in case of any problems.void updateItem(ItemIF item) throws PersistenceManagerException
item
- item object.
PersistenceManagerException
- in case of any errors.void deleteItem(ItemIF item) throws PersistenceManagerException
item
- item to delete.
PersistenceManagerException
- in case of any problems.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |