Package plugins.Freetalk.exceptions

Examples of plugins.Freetalk.exceptions.NoSuchMessageException


      q.descend("mMessage").constrain(message).identity();
      q.descend("mBoard").constrain(this).identity();
      ObjectSet<DownloadedMessageLink> messageLinks = new Persistent.InitializingObjectSet<Board.DownloadedMessageLink>(mFreetalk, q);
     
      switch(messageLinks.size()) {
        case 0: throw new NoSuchMessageException(message.getID());
        case 1: return messageLinks.next();
        default: throw new DuplicateMessageException(message.getID());
      }
    }
View Full Code Here


        q.descend("mBoard").constrain(this).identity();
        q.descend("mIndex").constrain(index);
      final ObjectSet<DownloadedMessageLink> messageLinks = new Persistent.InitializingObjectSet<Board.DownloadedMessageLink>(mFreetalk, q);
     
      switch(messageLinks.size()) {
        case 0: throw new NoSuchMessageException("index: " + index);
        case 1: return messageLinks.next();
        default: throw new DuplicateMessageException("index: " + index);
      }
    }
View Full Code Here

      case 1:
        final Message m = result.next();
        m.initializeTransient(mFreetalk);
        return m;
      case 0:
        throw new NoSuchMessageException(id);
      default:
        throw new DuplicateMessageException(id);
    }
  }
View Full Code Here

      case 1:
        final OwnMessage m = result.next();
        m.initializeTransient(mFreetalk);
        return m;
      case 0:
        throw new NoSuchMessageException(id);
      default:
        throw new DuplicateMessageException(id);
    }
  }
View Full Code Here

                    throw new UnsupportedOperationException();
                }
            };

            if (!iter.hasNext())
                throw new NoSuchMessageException();

            return iter;
    }
View Full Code Here

   */
  public final synchronized MessageURI getThreadURI() throws NoSuchMessageException {
    checkedActivate(1);

    if(mThreadURI == null)
      throw new NoSuchMessageException();

    mThreadURI.initializeTransient(mFreetalk);
    return mThreadURI;
  }
View Full Code Here

   */
  public final synchronized String getThreadID() throws NoSuchMessageException {
    checkedActivate(1); // String is a db4o primitive type so 1 is enough

    if(mThreadID == null)
      throw new NoSuchMessageException();

    return mThreadID;
  }
View Full Code Here

   */
  public final MessageURI getParentURI() throws NoSuchMessageException {
    checkedActivate(1);

    if(mParentURI == null)
      throw new NoSuchMessageException();

    mParentURI.initializeTransient(mFreetalk);
    return mParentURI;
  }
View Full Code Here

  public final String getParentID() throws NoSuchMessageException {
    checkedActivate(1); // String is a db4o primitive type so 1 is enough

    if(mParentID == null)
      throw new NoSuchMessageException();

    return mParentID;
  }
View Full Code Here

  public final synchronized Message getThread() throws NoSuchMessageException {
    /* TODO: Find all usages of this function and check whether we might want to use a higher depth here */
    checkedActivate(1);

    if(mThread == null)
      throw new NoSuchMessageException();

    mThread.initializeTransient(mFreetalk);
    return mThread;
  }
View Full Code Here

TOP

Related Classes of plugins.Freetalk.exceptions.NoSuchMessageException

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.