Beispiel #1
0
  // properties of entities
  public String getTitle() {

    if (type == TYPE_FORUM_TOPIC) {
      if (topic == null) topic = getTopicById(true, id);
      if (topic == null) return null;
      return topic.getTitle();
    } else {
      if (forum == null) forum = getForumById(true, id);
      if (forum == null) return null;
      return forum.getTitle();
    }
  }
Beispiel #2
0
  // only used for topics
  public String getObjectId() {
    String title = getTitle();
    // fetches topic as well
    if (title == null) return null;

    if (type == TYPE_FORUM_TOPIC) {
      BaseForum forum = topic.getBaseForum();
      return "forum_topic/" + id + "/" + title + "\n" + forum.getTitle();
    } else {
      return "forum_forum/" + id + "/" + title;
    }
  }