コード例 #1
0
ファイル: ForumEntity.java プロジェクト: yllyx/sakai
  // 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();
    }
  }
コード例 #2
0
ファイル: ForumEntity.java プロジェクト: yllyx/sakai
  // 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;
    }
  }