Package org.openqreg.bean

Examples of org.openqreg.bean.Systemmessage


      con = DbHandler.getConnection();
      Iterator<? extends Usergroup> groupsIterator = UsergroupFinderBase
          .findAll(con).iterator();
      Iterator<? extends Systemmessage> messageIterator;
      Usergroup usergroup;
      Systemmessage systemmessage;
      Set<Systemmessage> group;
      while (groupsIterator.hasNext()) {
        usergroup = groupsIterator.next();
        group = new HashSet<Systemmessage>();
        messageIterator = SystemmessageFinder.findByGroupid(con,
View Full Code Here


      Date now = new Date();
      Date validFrom;
      Date validTo;
      Timestamp lastview;
      Systemmessage sm = null;

      while (messageIterator.hasNext()) {
        sm = messageIterator.next();
        validFrom = sm.getValidfrom();
        validTo = sm.getValidto();
        if (sm.getLanguageid().equals(currentUser.getLanguageid())
            && validFrom.before(now)) {
          if (null == validTo || validTo.after(now)) {
            // no validto date, or valid to date after now
            lastview = currentUser.getTslastviewedsystemmessage();
            if (null == lastview || lastview.before(validFrom)
                || lastview.before(sm.getTsupdated())) {
              // not seen any message
              // or last seen before validfrom date
              // or last view before message last updated
              return true;
            }
View Full Code Here

TOP

Related Classes of org.openqreg.bean.Systemmessage

Copyright © 2018 www.massapicom. 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.