Examples of MessageBean


Examples of com.apress.prospring.ch16.remoting.MessageBean

*
*/
public class SimpleMessageService implements MessageService {

  public MessageBean getMessage() {
    MessageBean mb = new MessageBean();
    mb.setMessage("Hello World!");
    mb.setSenderName("Rob Harrop");
   
    return mb;
  }
View Full Code Here

Examples of com.apress.prospring.ch16.remoting.MessageBean

    public static void main(String[] args) throws Exception {
        ApplicationContext ctx = new FileSystemXmlApplicationContext(
        "./ch16/src/conf/jaxrpc/messageServiceClient.xml");
        MessageService service = (MessageService)ctx.getBean("messageService");
        MessageBean bean = service.getMessage();
        System.out.println(bean);
    }
View Full Code Here

Examples of com.apress.prospring.ch16.remoting.MessageBean

* @author robh
*/
public class JaxRpcMessageService implements MessageService {

    public MessageBean getMessage() throws RemoteException {
        MessageBean bean = new MessageBean();
        bean.setMessage("Hello World!");
        bean.setSenderName("Rob Harrop");
        return bean;
    }
View Full Code Here

Examples of com.gwain.springexgwain.entites.MessageBean

    //private MessageBean mess = new MessageBean();//not multisession-safe
   
    @ModelAttribute("message2")
    public MessageBean getMessageBean(){
        //return mess;
        return new MessageBean();
    }
View Full Code Here

Examples of com.lichtfragmente.beans.MessageBean

                stmt.setInt(1,userid);
                ResultSet result=stmt.executeQuery();

                //wrap the results into a list of beans
                while (result.next()) {
                    MessageBean temp=new MessageBean();

                    temp.setId(result.getInt(1));
                    temp.setTitle(result.getString(2));
                    temp.setDate(result.getTimestamp(3));
                    temp.setRead(result.getBoolean(4));
                    temp.getSenderBean().setName(result.getString(5));
                    temp.getSenderBean().setId(result.getInt(6));

                    list.add(temp);
                }

                result.close();
View Full Code Here

Examples of com.lichtfragmente.beans.MessageBean

                stmt.setInt(1,userid);
                ResultSet result=stmt.executeQuery();

                //store messages in list of beans
                while (result.next()) {
                    MessageBean temp=new MessageBean();

                    temp.setId(result.getInt(1));
                    temp.setTitle(result.getString(2));
                    temp.setDate(result.getTimestamp(3));
                    temp.getRecipientBean().setName(result.getString(4));
                    temp.getRecipientBean().setId(result.getInt(5));

                    list.add(temp);
                }

                result.close();
View Full Code Here

Examples of com.liusoft.dlog4j.beans.MessageBean

  protected static void upgradeMessages(Session old_ssn, Session new_ssn){
    Query q = old_ssn.createQuery("FROM MessageForm l ORDER BY l.id ASC");
    List msgs = q.list();   
    for(int i=0;i<msgs.size();i++){
      MessageForm msg = (MessageForm)msgs.get(i)
      MessageBean mbean = new MessageBean();
      mbean.setContent(msg.getContent());
      mbean.setReadTime(msg.getReadTime());
      mbean.setSendTime(msg.getSendTime());
      mbean.setStatus(msg.getStatus());
      mbean.setFromUser((UserBean)userids.get(new Integer(msg.getFromUserId())));
      mbean.setToUser((UserBean)userids.get(new Integer(msg.getToUserId())));
      new_ssn.save(mbean);
      System.out.println("MESSAGE: " + msg.getId() + " -> " + mbean.getId());
    }
  }
View Full Code Here

Examples of com.liusoft.dlog4j.beans.MessageBean

   * @param sender
   */
  public static void SendMsgs(List users, String content, UserBean sender){
    try{
      //������Ϣbean
      MessageBean msg = new MessageBean();
      msg.setContent(content);
      msg.setSendTime(new Date());
      msg.setFromUser(sender);
      msg.setStatus(MessageBean.STATUS_NEW);
      //����д�����ݿ�
      Session ssn = getSession();
      beginTransaction();
      for(int i=0;i<users.size();i++){
        UserBean user = (UserBean)users.get(i);
        msg.setToUser(user);
        ssn.save(msg);
        if(i % 20 == 0){
          ssn.flush();
          ssn.clear();
        }
View Full Code Here

Examples of com.liusoft.dlog4j.beans.MessageBean

      //�жϽ������Ƿ��Ѿ��������߼�Ϊ������
      if(UserDAO.isUserInBlackList(receiver.getId(), loginUser.getId())){
        msgs.add("message", new ActionMessage("message.sent"));
        break;
      }
      MessageBean msgbean = new MessageBean();
      String content = StringUtils.abbreviate(super.autoFiltrate(null,
          msgform.getContent()), MAX_MESSAGE_LENGTH);
      msgbean.setContent(super.filterScriptAndStyle(content));
      msgbean.setExpiredTime(msgform.getExpiredTime());
      msgbean.setFromUser(loginUser);
      msgbean.setToUser(receiver);
      msgbean.setStatus(MessageBean.STATUS_NEW);
      msgbean.setSendTime(new Date());
      try{
        MessageDAO.save(msgbean);
        msgs.add("message", new ActionMessage("message.sent"));
      }catch(HibernateException e){
        context().log("undelete diary failed.", e);
View Full Code Here

Examples of com.liusoft.dlog4j.beans.MessageBean

      //�жϽ������Ƿ��Ѿ��������߼�Ϊ������
      if(UserDAO.isUserInBlackList(receiver.getId(), loginUser.getId())){
        msgs.add("message", new ActionMessage("message.sent"));
        break;
      }
      MessageBean msgbean = new MessageBean();
      String content = StringUtils.abbreviate(super.autoFiltrate(null,
          msgform.getContent()), MAX_MESSAGE_LENGTH);
      msgbean.setContent(super.filterScriptAndStyle(content));
      msgbean.setExpiredTime(msgform.getExpiredTime());
      msgbean.setFromUser(loginUser);
      msgbean.setToUser(receiver);
      msgbean.setStatus(MessageBean.STATUS_NEW);
      msgbean.setSendTime(new Date());
      try{
        MessageDAO.replyAndDeleteMessage(msgform.getMsgID(), msgbean);
        msgs.add("message", new ActionMessage("message.sent"));
      }catch(HibernateException e){
        context().log("undelete diary failed.", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.