|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.dao.support.DaoSupport org.springframework.orm.hibernate3.support.HibernateDaoSupport de.nava.informa.utils.manager.hibernate.SpringPersistenceManager
public class SpringPersistenceManager
Implementation of Informa's PersistenceManagerIF interface with the Hibernate O/R mapper as backend, making use of the DAO class provided by the Spring Framework. The aim is to ease integration of informa into an Spring scenario.
Field Summary |
---|
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
SpringPersistenceManager()
|
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. |
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
Methods inherited from class org.springframework.dao.support.DaoSupport |
---|
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpringPersistenceManager()
Method Detail |
---|
public ChannelGroupIF createGroup(String title) throws PersistenceManagerException
PersistenceManagerIF
createGroup
in interface PersistenceManagerIF
title
- title of the group.
PersistenceManagerException
- in case of any problems.public void updateGroup(ChannelGroupIF group) throws PersistenceManagerException
PersistenceManagerIF
updateGroup
in interface PersistenceManagerIF
group
- group object
PersistenceManagerException
- in case of any problems.public void deleteGroup(ChannelGroupIF group) throws PersistenceManagerException
PersistenceManagerIF
deleteGroup
in interface PersistenceManagerIF
group
- group to delete.
PersistenceManagerException
- in case of any problems.public void mergeGroups(ChannelGroupIF first, ChannelGroupIF second) throws PersistenceManagerException
PersistenceManagerIF
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.
PersistenceManagerException
- in case of any problems.public ChannelGroupIF[] getGroups() throws PersistenceManagerException
PersistenceManagerIF
getGroups
in interface PersistenceManagerIF
PersistenceManagerException
- in case of any problems.public ChannelIF createChannel(String title, URL location) throws PersistenceManagerException
PersistenceManagerIF
createChannel
in interface PersistenceManagerIF
title
- title of the channel.location
- location of channel data resource.
PersistenceManagerException
- in case of any problems.public void updateChannel(ChannelIF channel) throws PersistenceManagerException
PersistenceManagerIF
updateChannel
in interface PersistenceManagerIF
channel
- channel object.
PersistenceManagerException
- in case of any problems.public void addChannelToGroup(ChannelIF channel, ChannelGroupIF group) throws PersistenceManagerException
PersistenceManagerIF
channel
to the group
.
addChannelToGroup
in interface PersistenceManagerIF
channel
- channel to add.group
- group to use.
PersistenceManagerException
- in case of any problems.public void removeChannelFromGroup(ChannelIF channel, ChannelGroupIF group) throws PersistenceManagerException
PersistenceManagerIF
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.
PersistenceManagerException
- in case of any problems.public void deleteChannel(ChannelIF channel) throws PersistenceManagerException
PersistenceManagerIF
deleteChannel
in interface PersistenceManagerIF
channel
- channel to delete.
PersistenceManagerException
- in case of any problems.public ItemIF createItem(ChannelIF channel, String title) throws PersistenceManagerException
PersistenceManagerIF
createItem
in interface PersistenceManagerIF
channel
- channel to put new item into.title
- title of new item.
PersistenceManagerException
- in case of any problems.public ItemIF createItem(ChannelIF channel, ItemIF ethalon) throws PersistenceManagerException
PersistenceManagerIF
createItem
in interface PersistenceManagerIF
channel
- channel to put new item into.ethalon
- object to copy properties values from.
PersistenceManagerException
- in case of any problems.public void updateItem(ItemIF item) throws PersistenceManagerException
PersistenceManagerIF
updateItem
in interface PersistenceManagerIF
item
- item object.
PersistenceManagerException
- in case of any errors.public void deleteItem(ItemIF item) throws PersistenceManagerException
PersistenceManagerIF
deleteItem
in interface PersistenceManagerIF
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 |