public class NewsMessage extends DBPersist
NewsMessage
Modifier and Type | Field and Description |
---|---|
static short |
ClassId |
static short |
STATUS_DISCARDED |
static short |
STATUS_EXPIRED |
static short |
STATUS_PENDING |
static short |
STATUS_VALIDATED |
Constructor and Description |
---|
NewsMessage()
Create empty NewsMessage
|
NewsMessage(JDCConnection oConn,
java.lang.String sGuMsg)
Load NewsMessage from database
|
Modifier and Type | Method and Description |
---|---|
int |
countVotes(JDCConnection oConn)
Count number of votes of a message
|
boolean |
delete(JDCConnection oConn)
Delete NewsMessage.
|
static boolean |
delete(JDCConnection oConn,
java.lang.String sNewsMsgGUID)
Delete NewsMessage.
|
DBSubset |
getAttachments(JDCConnection oConn)
Get attachments
|
boolean |
load(JDCConnection oConn,
java.lang.Object[] aPK)
Load the internal value set from a register at a database table
|
boolean |
load(JDCConnection oConn,
java.lang.String sGuMsg)
Load message
|
void |
move(JDCConnection oConn,
java.lang.String sNewsGroupId)
Move this message and all its replies to another NewsGroup
|
java.lang.String |
post(JDCConnection oConn,
java.lang.String sNewsGroupId,
java.lang.String sThreadId,
java.util.Date dtStart,
java.util.Date dtEnd,
short iStatus,
java.lang.String sText)
Post a Plain Text Message
|
boolean |
store(JDCConnection oConn)
Store NewsMessage
Message is posted into a NewsGroup by setting gu_newsgrp property of
NewsMessage to the GUID of newsMessage that will contain it.
|
java.lang.String[] |
subscribers(JDCConnection oConn)
Get e-mails subscribed to current message group or thread
Only active subscribers with digest option not selected are returned
|
java.util.HashMap<java.lang.String,NewsMessageTag> |
tags()
Get tags for this message
|
allcaps, allcaps, clear, clone, columns, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getIntArray, getInteger, getIntegerArray, getIntervalPart, getItemMap, getItems, getMoney, getPrimaryKey, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTime, getTimeOfDay, getTimestamp, isEmpty, isNull, iterator, keySet, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, setPrimaryKey, size, toLowerCase, toUpperCase, toXML, toXML, toXML, values
public static final short STATUS_VALIDATED
public static final short STATUS_PENDING
public static final short STATUS_DISCARDED
public static final short STATUS_EXPIRED
public static final short ClassId
public NewsMessage()
public NewsMessage(JDCConnection oConn, java.lang.String sGuMsg) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String post(JDCConnection oConn, java.lang.String sNewsGroupId, java.lang.String sThreadId, java.util.Date dtStart, java.util.Date dtEnd, short iStatus, java.lang.String sText) throws java.sql.SQLException
oConn
- Database ConenctionsNewsGroupId
- GUID of NewsGroup for postingsThreadId
- GUID of message thread (may be null)dtStart
- Start publishing date (may be null)dtEnd
- Expiration date (may be null)iStatus
- STATUS_VALIDATED or STATUS_PENDINGsText
- Message Textjava.sql.SQLException
public boolean load(JDCConnection oConn, java.lang.String sGuMsg) throws java.sql.SQLException
public DBSubset getAttachments(JDCConnection oConn) throws java.sql.SQLException
oConn
- JDCConnectionjava.sql.SQLException
public boolean load(JDCConnection oConn, java.lang.Object[] aPK) throws java.sql.SQLException
DBPersist
Load the internal value set from a register at a database table
public boolean store(JDCConnection oConn) throws java.sql.SQLException
Store NewsMessage
Message is posted into a NewsGroup by setting gu_newsgrp property of NewsMessage to the GUID of newsMessage that will contain it.public void move(JDCConnection oConn, java.lang.String sNewsGroupId) throws java.sql.SQLException
oConn
- Database ConenctionsNewsGroupId
- GUID of the target NewsGroupjava.sql.SQLException
public boolean delete(JDCConnection oConn) throws java.sql.SQLException
Delete NewsMessage.
Files attached to NewsMessage (stored as Products) are delete prior to the NewsMessage itself. Then k_sp_del_newsmsg stored procedure is called.public java.lang.String[] subscribers(JDCConnection oConn) throws java.sql.SQLException
Get e-mails subscribed to current message group or thread
Only active subscribers with digest option not selected are returnedoConn
- Database Connectionjava.sql.SQLException
public int countVotes(JDCConnection oConn) throws java.sql.SQLException
oConn
- Database Connectionjava.sql.SQLException
public java.util.HashMap<java.lang.String,NewsMessageTag> tags()
public static boolean delete(JDCConnection oConn, java.lang.String sNewsMsgGUID) throws java.sql.SQLException
Delete NewsMessage.
Files attached to NewsMessage (stored as Products) are delete prior to the NewsMessage itself. Then k_sp_del_newsmsg stored procedure is called.oConn
- Database ConnectionsNewsMsgGUID
- GUID of NewsMessage to be deletedjava.sql.SQLException