|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.nava.informa.utils.manager.memory.PersistenceManager
public class PersistenceManager
In-memory implementation of persistence manager. Uses local memory to store data.
Constructor Summary | |
---|---|
PersistenceManager()
Creates persistence manager. |
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. |
(package private) void |
moveChannels(ChannelGroupIF src,
ChannelGroupIF dest)
Moves channels from source to destination 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersistenceManager()
Method Detail |
---|
public final ChannelGroupIF createGroup(String title)
createGroup
in interface PersistenceManagerIF
title
- title of the group.
public void updateGroup(ChannelGroupIF group)
updateGroup
in interface PersistenceManagerIF
group
- group objectpublic final void deleteGroup(ChannelGroupIF group)
deleteGroup
in interface PersistenceManagerIF
group
- group to delete.public final void mergeGroups(ChannelGroupIF first, ChannelGroupIF second)
second
group and put them all in first
group. Then second
group is deleted.
mergeGroups
in interface PersistenceManagerIF
first
- first group of channels.second
- second group of channels.public final ChannelGroupIF[] getGroups()
getGroups
in interface PersistenceManagerIF
public final ChannelIF createChannel(String title, URL location)
createChannel
in interface PersistenceManagerIF
title
- title of the channel.location
- location of channel data resource.
public void updateChannel(ChannelIF channel)
updateChannel
in interface PersistenceManagerIF
channel
- channel object.public final void addChannelToGroup(ChannelIF channel, ChannelGroupIF group)
channel
to the group
.
addChannelToGroup
in interface PersistenceManagerIF
channel
- channel to add.group
- group to use.public final void removeChannelFromGroup(ChannelIF channel, ChannelGroupIF group)
channel
from the group
.
This method doesn't delete channel from persistent storage. It only
breaks the association between channel and group.
removeChannelFromGroup
in interface PersistenceManagerIF
channel
- channel to delete.group
- group to use.public final void deleteChannel(ChannelIF channel)
deleteChannel
in interface PersistenceManagerIF
channel
- channel to delete.public final ItemIF createItem(ChannelIF channel, String title)
createItem
in interface PersistenceManagerIF
channel
- channel to put new item into.title
- title of new item.
public final ItemIF createItem(ChannelIF channel, ItemIF ethalon)
createItem
in interface PersistenceManagerIF
channel
- channel to put new item into.ethalon
- object to copy properties values from.
public void updateItem(ItemIF item)
updateItem
in interface PersistenceManagerIF
item
- item object.public final void deleteItem(ItemIF item)
deleteItem
in interface PersistenceManagerIF
item
- item to delete.final void moveChannels(ChannelGroupIF src, ChannelGroupIF dest)
src
- source group to take channels from.dest
- destination group to put channel into.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |