Package tigase.muc.repository
Class JDBCMucDAO
java.lang.Object
tigase.muc.repository.AbstractMucDAO<tigase.db.DataRepository,Long>
tigase.muc.repository.JDBCMucDAO
- All Implemented Interfaces:
tigase.db.DataSourceAware<tigase.db.DataRepository>
,tigase.db.util.RepositoryVersionAware
,IMucDAO<tigase.db.DataRepository,
Long>
public class JDBCMucDAO
extends AbstractMucDAO<tigase.db.DataRepository,Long>
implements tigase.db.util.RepositoryVersionAware
- Author:
- bmalkow
-
Nested Class Summary
Nested classes/interfaces inherited from interface tigase.db.util.RepositoryVersionAware
tigase.db.util.RepositoryVersionAware.SchemaVersion
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateRoom
(RoomWithId<Long> room) void
destroyRoom
(tigase.xmpp.jid.BareJID roomJID) Map<tigase.xmpp.jid.BareJID,
RoomAffiliation> getAffiliations
(RoomWithId<Long> room) getRoom
(tigase.xmpp.jid.BareJID roomJID) getRoomAvatar
(RoomWithId<Long> room) List<tigase.xmpp.jid.BareJID>
protected void
initPreparedStatements
(tigase.db.DataRepository repo) void
setAffiliation
(RoomWithId<Long> room, tigase.xmpp.jid.BareJID jid, RoomAffiliation affiliation) void
setDataSource
(tigase.db.DataRepository dataSource) void
setSubject
(RoomWithId<Long> room, String subject, String creatorNickname, Date changeDate) void
updateRoomAvatar
(RoomWithId<Long> room, String encodedAvatar, String hash) void
updateRoomConfig
(RoomConfig roomConfig) Methods inherited from class tigase.muc.repository.AbstractMucDAO
parseConfigElement
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tigase.db.util.RepositoryVersionAware
getVersion, updateSchema
-
Field Details
-
data_repo
protected tigase.db.DataRepository data_repo
-
-
Constructor Details
-
JDBCMucDAO
public JDBCMucDAO()
-
-
Method Details
-
createRoom
public Long createRoom(RoomWithId<Long> room) throws tigase.component.exceptions.RepositoryException - Specified by:
createRoom
in interfaceIMucDAO<tigase.db.DataRepository,
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,
Long> - Throws:
tigase.component.exceptions.RepositoryException
-
getAffiliations
public Map<tigase.xmpp.jid.BareJID,RoomAffiliation> getAffiliations(RoomWithId<Long> room) throws tigase.component.exceptions.RepositoryException - Specified by:
getAffiliations
in interfaceIMucDAO<tigase.db.DataRepository,
Long> - Throws:
tigase.component.exceptions.RepositoryException
-
getRoom
public RoomWithId<Long> getRoom(tigase.xmpp.jid.BareJID roomJID) throws tigase.component.exceptions.RepositoryException -
getRoomsJIDList
public List<tigase.xmpp.jid.BareJID> getRoomsJIDList() throws tigase.component.exceptions.RepositoryException- Specified by:
getRoomsJIDList
in interfaceIMucDAO<tigase.db.DataRepository,
Long> - Throws:
tigase.component.exceptions.RepositoryException
-
setAffiliation
public void setAffiliation(RoomWithId<Long> room, tigase.xmpp.jid.BareJID jid, RoomAffiliation affiliation) throws tigase.component.exceptions.RepositoryException - Specified by:
setAffiliation
in interfaceIMucDAO<tigase.db.DataRepository,
Long> - Throws:
tigase.component.exceptions.RepositoryException
-
getRoomAvatar
public String getRoomAvatar(RoomWithId<Long> room) throws tigase.component.exceptions.RepositoryException - Specified by:
getRoomAvatar
in interfaceIMucDAO<tigase.db.DataRepository,
Long> - Throws:
tigase.component.exceptions.RepositoryException
-
updateRoomAvatar
public void updateRoomAvatar(RoomWithId<Long> room, String encodedAvatar, String hash) throws tigase.component.exceptions.RepositoryException - Specified by:
updateRoomAvatar
in interfaceIMucDAO<tigase.db.DataRepository,
Long> - Throws:
tigase.component.exceptions.RepositoryException
-
setSubject
public void setSubject(RoomWithId<Long> room, String subject, String creatorNickname, Date changeDate) throws tigase.component.exceptions.RepositoryException - Specified by:
setSubject
in interfaceIMucDAO<tigase.db.DataRepository,
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,
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
- Throws:
SQLException
-