com.ibm.commerce.negotiation.objects
Class MessageCountAccessBean

java.lang.Object
  |
  +--com.ibm.ivj.ejb.runtime.AbstractAccessBean
        |
        +--com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
              |
              +--com.ibm.commerce.negotiation.objects.MessageCountAccessBean
All Implemented Interfaces:
MessageCountAccessBeanData, java.io.Serializable
Direct Known Subclasses:
MessageCountDataBean

public class MessageCountAccessBean
extends com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
implements MessageCountAccessBeanData

This bean provides access to the MSGCOUNTVW table.

The following is a description of this table:

This is a view of the MSGVIEW table that lists the number of messages of each status for each recipient.

See Also:
Serialized Form

Fields inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
DEFAULT_NAMESERVICE_PROVIDER_URL, DEFAULT_NAMESERVICE_TYPE, ejbRef
 
Constructor Summary
MessageCountAccessBean()
          Zero argument constructor used to initialize the access bean.
MessageCountAccessBean(javax.ejb.EJBObject object)
          Creates an access bean for the specified EJB
 
Method Summary
 void commitCopyHelper()
          Update(flush) data to the EJBObject (persistent storage).
 java.util.Enumeration findAll()
          Retrieves all message counts.
 java.util.Enumeration findByRecipient(java.lang.Long recipientId)
          Retrieves all message counts for the recipient.
 java.util.Enumeration findByRecipientAndMultipleStatus(java.lang.Long recipientId, java.lang.String[] status)
          Retrieves all message counts, for messages of certain statuses, for the recipient.
 java.util.Enumeration findByRecipientAndStatus(java.lang.Long recipientId, java.lang.String status)
          Retrieves all message counts, for messages of a certain status, for the recipient.
 java.lang.String getCount()
          This method provides access to the MSGCOUNTVW.MSGCOUNT column of DB2 type INTEGER NOT NULL.
 int getCountInEJBType()
          This method provides access to the MSGCOUNTVW.MSGCOUNT column of DB2 type INTEGER NOT NULL.
 java.lang.String getRecipientId()
          This method provides access to the MSGCOUNTVW.RECIPIENT_ID column of DB2 type BIGINT NOT NULL.
 java.lang.Long getRecipientIdInEJBType()
          This method provides access to the MSGCOUNTVW.RECIPIENT_ID column of DB2 type BIGINT NOT NULL.
 java.lang.String getStatus()
          This method provides access to the MSGCOUNTVW.STATUS column of DB2 type CHARACTER(4) NOT NULL.
 void refreshCopyHelper()
          Load data from the EJBObject.
 void setInitKey_recipientId(java.lang.Long aInitKey_recipientId1)
          Set the primary key for this object
 void setInitKey_status(java.lang.String aInitKey_status1)
          Set the primary key for this object
 
Methods inherited from class com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
__getCache, __getCache, __getKey, __setCache, __setCache, __setKey, commitCopyHelper, createAccessBeans, createAccessBeans, instantiateEJBByPrimaryKey, refreshCopyHelper, setEJBRef
 
Methods inherited from class com.ibm.ivj.ejb.runtime.AbstractAccessBean
defaultJNDIName, defaultNameServiceType, defaultNameServiceURL, getEJBRef, getGlobalHome, getHome, getInit_GlobalNameServiceTypeName, getInit_GlobalNameServiceURLName, getInit_JNDIName, getInit_NameServiceTypeName, getInit_NameServiceURLName, getInitContext, getInitContext, instantiateEJB, resetEJBRef, resetHomeCache, setInit_GlobalNameServiceTypeName, setInit_GlobalNameServiceURLName, setInit_JNDIName, setInit_NameServiceTypeName, setInit_NameServiceURLName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageCountAccessBean

public MessageCountAccessBean()

Zero argument constructor used to initialize the access bean. This constructor corresponds to the following home interface method:

public abstract com.ibm.commerce.negotiation.objects.MessageCount com.ibm.commerce.negotiation.objimpl.MessageCountHomeBase.findByPrimaryKey(com.ibm.commerce.negotiation.objects.MessageCountKey) throws java.rmi.RemoteException,javax.ejb.FinderException

The home interface method properties need to be set by calling the following setter methods before calling any business methods:


MessageCountAccessBean

public MessageCountAccessBean(javax.ejb.EJBObject object)
                       throws java.rmi.RemoteException

Creates an access bean for the specified EJB

Parameters:
object - The EJB Object used for the access bean construction.
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception.
Method Detail

commitCopyHelper

public void commitCopyHelper()
                      throws java.rmi.RemoteException,
                             javax.ejb.CreateException,
                             javax.ejb.FinderException,
                             javax.naming.NamingException

Update(flush) data to the EJBObject (persistent storage).

Overrides:
commitCopyHelper in class com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
Returns:
void
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

findAll

public java.util.Enumeration findAll()
                              throws java.rmi.RemoteException,
                                     javax.ejb.FinderException,
                                     javax.naming.NamingException

Retrieves all message counts.

The SQL query used to fetch all the required rows from the MSGCOUNTVW table is:

SELECT * FROM MSGCOUNTVW T1 WHERE 1=1

Returns:
An Enumeration of all the MessageCountAccessBeans representing rows that match the search criteria.

findByRecipient

public java.util.Enumeration findByRecipient(java.lang.Long recipientId)
                                      throws java.rmi.RemoteException,
                                             javax.ejb.FinderException,
                                             javax.naming.NamingException

Retrieves all message counts for the recipient.

The SQL query used to fetch all the required rows from the MSGCOUNTVW table is:

SELECT * FROM MSGCOUNTVW T1 WHERE T1.RECIPIENT_ID=?

Parameters:
recipientId - The recipient id.
Returns:
An Enumeration of all the MessageCountAccessBeans representing rows that match the search criteria.

findByRecipientAndMultipleStatus

public java.util.Enumeration findByRecipientAndMultipleStatus(java.lang.Long recipientId,
                                                              java.lang.String[] status)
                                                       throws java.rmi.RemoteException,
                                                              javax.ejb.FinderException,
                                                              javax.naming.NamingException

Retrieves all message counts, for messages of certain statuses, for the recipient.

The SQL query used to fetch all the required rows from the MSGCOUNTVW table is:

SELECT * FROM MSGCOUNTVW T1 WHERE T1.RECIPIENT_ID=? AND (T1.STATUS=? {OR T1.STATUS=?}*)

Parameters:
recipientId - The recipient id.
status - The message statuses. Valid values: N=new message not read by recipient, O=opened, recipient has read the message, D=delete, recipient has deleted the message. An OR clause is added for each additional status.
Returns:
An Enumeration of all the MessageCountAccessBeans representing rows that match the search criteria.

findByRecipientAndStatus

public java.util.Enumeration findByRecipientAndStatus(java.lang.Long recipientId,
                                                      java.lang.String status)
                                               throws java.rmi.RemoteException,
                                                      javax.ejb.FinderException,
                                                      javax.naming.NamingException

Retrieves all message counts, for messages of a certain status, for the recipient.

The SQL query used to fetch all the required rows from the MSGCOUNTVW table is:

SELECT * FROM MSGCOUNTVW T1 WHERE T1.RECIPIENT_ID=? AND T1.STATUS=?

Parameters:
recipientId - The recipient id.
status - The message status. Valid values: N=new message not read by recipient, O=opened, recipient has read the message, D=delete, recipient has deleted the message.
Returns:
An Enumeration of all the MessageCountAccessBeans representing rows that match the search criteria.

getCount

public java.lang.String getCount()
                          throws java.rmi.RemoteException,
                                 javax.ejb.CreateException,
                                 javax.ejb.FinderException,
                                 javax.naming.NamingException

This method provides access to the MSGCOUNTVW.MSGCOUNT column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

From COUNT(MSGVIEW.MESSAGE_ID).

Specified by:
getCount in interface MessageCountAccessBeanData
Returns:
java.lang.String
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getCountInEJBType

public int getCountInEJBType()
                      throws java.rmi.RemoteException,
                             javax.ejb.CreateException,
                             javax.ejb.FinderException,
                             javax.naming.NamingException

This method provides access to the MSGCOUNTVW.MSGCOUNT column of DB2 type INTEGER NOT NULL.

The following is a description of this column:

From COUNT(MSGVIEW.MESSAGE_ID).

Returns:
int
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getRecipientId

public java.lang.String getRecipientId()
                                throws java.rmi.RemoteException,
                                       javax.ejb.CreateException,
                                       javax.ejb.FinderException,
                                       javax.naming.NamingException

This method provides access to the MSGCOUNTVW.RECIPIENT_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

From MSGVIEW.RECIPIENT_ID.

Specified by:
getRecipientId in interface MessageCountAccessBeanData
Returns:
java.lang.String
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getRecipientIdInEJBType

public java.lang.Long getRecipientIdInEJBType()
                                       throws java.rmi.RemoteException,
                                              javax.ejb.CreateException,
                                              javax.ejb.FinderException,
                                              javax.naming.NamingException

This method provides access to the MSGCOUNTVW.RECIPIENT_ID column of DB2 type BIGINT NOT NULL.

The following is a description of this column:

From MSGVIEW.RECIPIENT_ID.

Returns:
java.lang.Long
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

getStatus

public java.lang.String getStatus()
                           throws java.rmi.RemoteException,
                                  javax.ejb.CreateException,
                                  javax.ejb.FinderException,
                                  javax.naming.NamingException

This method provides access to the MSGCOUNTVW.STATUS column of DB2 type CHARACTER(4) NOT NULL.

The following is a description of this column:

From MSGVIEW.STATUS.

Specified by:
getStatus in interface MessageCountAccessBeanData
Returns:
java.lang.String
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

refreshCopyHelper

public void refreshCopyHelper()
                       throws java.rmi.RemoteException,
                              javax.ejb.CreateException,
                              javax.ejb.FinderException,
                              javax.naming.NamingException

Load data from the EJBObject.

Overrides:
refreshCopyHelper in class com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
Returns:
void
Throws:
java.rmi.RemoteException - The java.rmi.RemoteException exception
javax.ejb.CreateException - The javax.ejb.CreateException exception
javax.ejb.FinderException - The javax.ejb.FinderException exception
javax.naming.NamingException - The javax.naming.NamingException exception

setInitKey_recipientId

public void setInitKey_recipientId(java.lang.Long aInitKey_recipientId1)

Set the primary key for this object

Parameters:
aInitKey_recipientId1 - java.lang.Long
Returns:
void

setInitKey_status

public void setInitKey_status(java.lang.String aInitKey_status1)

Set the primary key for this object

Parameters:
aInitKey_status1 - java.lang.String
Returns:
void