Package tigase.archive.db.derby
Class StoredProcedures
- java.lang.Object
-
- tigase.archive.db.derby.StoredProcedures
-
public class StoredProcedures extends Object
- Author:
- andrzej
-
-
Constructor Summary
Constructors Constructor Description StoredProcedures()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddMessage(String ownerJid, String buddyJid, String buddyRes, Timestamp ts, short direction, String type, String body, String msg, String hash, ResultSet[] data)static voidaddTagToMessage(long msgId, String tag)protected static StringBuilderappendContainsQuery(StringBuilder sb, String contains)protected static StringBuilderappendTagsQuery(StringBuilder sb, String tags)static voiddeleteExpiredMessages(String domain, Timestamp before)static LongensureJid(String jid)static voidgetCollections(String ownerJid, String buddyJid, Timestamp from, Timestamp to, String tags, String contains, short byType, Integer limit, Integer offset, ResultSet[] data)static voidgetCollectionsCount(String ownerJid, String buddyJid, Timestamp from, Timestamp to, String tags, String contains, short byType, ResultSet[] data)static LonggetJidId(tigase.xmpp.jid.BareJID bareJid, String jidSha1)static voidgetMessagePosition(String ownerJid, String buddyJid, Timestamp from, Timestamp to, String tags, String contains, String hash, ResultSet[] data)static voidgetMessages(String ownerJid, String buddyJid, Timestamp from, Timestamp to, String tags, String contains, Integer limit, Integer offset, ResultSet[] data)static voidgetMessagesCount(String ownerJid, String buddyJid, Timestamp from, Timestamp to, String tags, String contains, ResultSet[] data)static voidgetTagsForUser(String ownerJid, String tagStartsWith, Integer limit, Integer offset, ResultSet[] data)static voidgetTagsForUserCount(String ownerJid, String tagStartsWith, ResultSet[] data)static voidremoveMessages(String ownerJid, String buddyJid, Timestamp from, Timestamp to)protected static Stringsha1OfLower(String data)
-
-
-
Method Detail
-
addMessage
public static void addMessage(String ownerJid, String buddyJid, String buddyRes, Timestamp ts, short direction, String type, String body, String msg, String hash, ResultSet[] data) throws SQLException
- Throws:
SQLException
-
addTagToMessage
public static void addTagToMessage(long msgId, String tag) throws SQLException- Throws:
SQLException
-
appendContainsQuery
protected static StringBuilder appendContainsQuery(StringBuilder sb, String contains)
-
appendTagsQuery
protected static StringBuilder appendTagsQuery(StringBuilder sb, String tags)
-
deleteExpiredMessages
public static void deleteExpiredMessages(String domain, Timestamp before) throws SQLException
- Throws:
SQLException
-
ensureJid
public static Long ensureJid(String jid) throws SQLException
- Throws:
SQLException
-
getCollections
public static void getCollections(String ownerJid, String buddyJid, Timestamp from, Timestamp to, String tags, String contains, short byType, Integer limit, Integer offset, ResultSet[] data) throws SQLException
- Throws:
SQLException
-
getCollectionsCount
public static void getCollectionsCount(String ownerJid, String buddyJid, Timestamp from, Timestamp to, String tags, String contains, short byType, ResultSet[] data) throws SQLException
- Throws:
SQLException
-
getJidId
public static Long getJidId(tigase.xmpp.jid.BareJID bareJid, String jidSha1) throws SQLException
- Throws:
SQLException
-
getMessagePosition
public static void getMessagePosition(String ownerJid, String buddyJid, Timestamp from, Timestamp to, String tags, String contains, String hash, ResultSet[] data) throws SQLException
- Throws:
SQLException
-
getMessages
public static void getMessages(String ownerJid, String buddyJid, Timestamp from, Timestamp to, String tags, String contains, Integer limit, Integer offset, ResultSet[] data) throws SQLException
- Throws:
SQLException
-
getMessagesCount
public static void getMessagesCount(String ownerJid, String buddyJid, Timestamp from, Timestamp to, String tags, String contains, ResultSet[] data) throws SQLException
- Throws:
SQLException
-
getTagsForUser
public static void getTagsForUser(String ownerJid, String tagStartsWith, Integer limit, Integer offset, ResultSet[] data) throws SQLException
- Throws:
SQLException
-
getTagsForUserCount
public static void getTagsForUserCount(String ownerJid, String tagStartsWith, ResultSet[] data) throws SQLException
- Throws:
SQLException
-
removeMessages
public static void removeMessages(String ownerJid, String buddyJid, Timestamp from, Timestamp to) throws SQLException
- Throws:
SQLException
-
sha1OfLower
protected static String sha1OfLower(String data) throws SQLException
- Throws:
SQLException
-
-