All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fi.foyt.fni.persistence.model.forum.ForumTopic Maven / Gradle / Ivy

There is a newer version: 3.3.13
Show newest version
package fi.foyt.fni.persistence.model.forum;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Transient;

import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;

@Entity
@PrimaryKeyJoinColumn (name="id")
@Indexed
@Cacheable (true)
public class ForumTopic extends ForumMessage {

  public String getSubject() {
    return subject;
  }
  
  public void setSubject(String subject) {
    this.subject = subject;
  }
  
  public String getUrlName() {
    return urlName;
  }
  
  public void setUrlName(String urlName) {
    this.urlName = urlName;
  }
  
  public Forum getForum() {
    return forum;
  }
  
  public void setForum(Forum forum) {
    this.forum = forum;
  }
  
  @Transient
  public String getFullPath() {
  	return getForum().getUrlName() + "/" + getUrlName();
  }
  
  @ManyToOne
  private Forum forum;
  
  @Column (nullable=false)
  @Field
  private String subject;
  
  @Column (nullable=false)
  private String urlName;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy