Package tigase.muc.repository
Class JDBCMucDAO
- java.lang.Object
-
- tigase.muc.repository.AbstractMucDAO<tigase.db.DataRepository,java.lang.Long>
-
- tigase.muc.repository.JDBCMucDAO
-
- All Implemented Interfaces:
tigase.db.DataSourceAware<tigase.db.DataRepository>
,tigase.db.util.RepositoryVersionAware
,IMucDAO<tigase.db.DataRepository,java.lang.Long>
public class JDBCMucDAO extends AbstractMucDAO<tigase.db.DataRepository,java.lang.Long> implements tigase.db.util.RepositoryVersionAware
- Author:
- bmalkow
-
-
Field Summary
Fields Modifier and Type Field Description protected tigase.db.DataRepository
data_repo
-
Constructor Summary
Constructors Constructor Description JDBCMucDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Long
createRoom(RoomWithId<java.lang.Long> room)
void
destroyRoom(tigase.xmpp.jid.BareJID roomJID)
java.util.Map<tigase.xmpp.jid.BareJID,RoomAffiliation>
getAffiliations(RoomWithId<java.lang.Long> room)
RoomWithId<java.lang.Long>
getRoom(tigase.xmpp.jid.BareJID roomJID)
java.lang.String
getRoomAvatar(RoomWithId<java.lang.Long> room)
java.util.List<tigase.xmpp.jid.BareJID>
getRoomsJIDList()
protected void
initPreparedStatements(tigase.db.DataRepository repo)
void
setAffiliation(RoomWithId<java.lang.Long> room, tigase.xmpp.jid.BareJID jid, RoomAffiliation affiliation)
void
setDataSource(tigase.db.DataRepository dataSource)
void
setSubject(RoomWithId<java.lang.Long> room, java.lang.String subject, java.lang.String creatorNickname, java.util.Date changeDate)
void
updateRoomAvatar(RoomWithId<java.lang.Long> room, java.lang.String encodedAvatar, java.lang.String hash)
void
updateRoomConfig(RoomConfig roomConfig)
-
Methods inherited from class tigase.muc.repository.AbstractMucDAO
parseConfigElement
-
-
-
-
Method Detail
-
createRoom
public java.lang.Long createRoom(RoomWithId<java.lang.Long> room) throws tigase.component.exceptions.RepositoryException
- Specified by:
createRoom
in interfaceIMucDAO<tigase.db.DataRepository,java.lang.Long>
- Throws:
tigase.component.exceptions.RepositoryException
-
destroyRoom
public void destroyRoom(tigase.xmpp.jid.BareJID roomJID) throws tigase.component.exceptions.RepositoryException
- Specified by:
destroyRoom
in interfaceIMucDAO<tigase.db.DataRepository,java.lang.Long>
- Throws:
tigase.component.exceptions.RepositoryException
-
getAffiliations
public java.util.Map<tigase.xmpp.jid.BareJID,RoomAffiliation> getAffiliations(RoomWithId<java.lang.Long> room) throws tigase.component.exceptions.RepositoryException
- Specified by:
getAffiliations
in interfaceIMucDAO<tigase.db.DataRepository,java.lang.Long>
- Throws:
tigase.component.exceptions.RepositoryException
-
getRoom
public RoomWithId<java.lang.Long> getRoom(tigase.xmpp.jid.BareJID roomJID) throws tigase.component.exceptions.RepositoryException
-
getRoomsJIDList
public java.util.List<tigase.xmpp.jid.BareJID> getRoomsJIDList() throws tigase.component.exceptions.RepositoryException
- Specified by:
getRoomsJIDList
in interfaceIMucDAO<tigase.db.DataRepository,java.lang.Long>
- Throws:
tigase.component.exceptions.RepositoryException
-
setAffiliation
public void setAffiliation(RoomWithId<java.lang.Long> room, tigase.xmpp.jid.BareJID jid, RoomAffiliation affiliation) throws tigase.component.exceptions.RepositoryException
- Specified by:
setAffiliation
in interfaceIMucDAO<tigase.db.DataRepository,java.lang.Long>
- Throws:
tigase.component.exceptions.RepositoryException
-
getRoomAvatar
public java.lang.String getRoomAvatar(RoomWithId<java.lang.Long> room) throws tigase.component.exceptions.RepositoryException
- Specified by:
getRoomAvatar
in interfaceIMucDAO<tigase.db.DataRepository,java.lang.Long>
- Throws:
tigase.component.exceptions.RepositoryException
-
updateRoomAvatar
public void updateRoomAvatar(RoomWithId<java.lang.Long> room, java.lang.String encodedAvatar, java.lang.String hash) throws tigase.component.exceptions.RepositoryException
- Specified by:
updateRoomAvatar
in interfaceIMucDAO<tigase.db.DataRepository,java.lang.Long>
- Throws:
tigase.component.exceptions.RepositoryException
-
setSubject
public void setSubject(RoomWithId<java.lang.Long> room, java.lang.String subject, java.lang.String creatorNickname, java.util.Date changeDate) throws tigase.component.exceptions.RepositoryException
- Specified by:
setSubject
in interfaceIMucDAO<tigase.db.DataRepository,java.lang.Long>
- Throws:
tigase.component.exceptions.RepositoryException
-
updateRoomConfig
public void updateRoomConfig(RoomConfig roomConfig) throws tigase.component.exceptions.RepositoryException
- Specified by:
updateRoomConfig
in interfaceIMucDAO<tigase.db.DataRepository,java.lang.Long>
- Throws:
tigase.component.exceptions.RepositoryException
-
setDataSource
public void setDataSource(tigase.db.DataRepository dataSource)
- Specified by:
setDataSource
in interfacetigase.db.DataSourceAware<tigase.db.DataRepository>
-
initPreparedStatements
protected void initPreparedStatements(tigase.db.DataRepository repo) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-