/* Copyright 2006 - 2010 Under Dusken Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package no.dusken.aranea.model; import javax.persistence.*; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** * Represents a fact box. Displays facts in a unnumbered list. Typically * displayed within an unordered HTML list: * <p/> * <pre> * <code> * <ul> * <li></li> * </ul> * </code> * </pre> * <p/> * Example: Title: pegadi is: * <ul> * <li>a web CMS</li> * <li>developed by Under Dusken</li> * </ul> * * @author Erlend Hamnaberg<erlenha@underdusken.no> * @author Asbjørn L. Johansen<asbjorjo@underdusken.no> */ @Entity @Table(name = "factbox") @SequenceGenerator(name = "factbox_seq", sequenceName = "factbox_id_seq") public class FactBox extends AraneaObject { /** * title of factbox */ @Column() @Size(max = 255, min = 2) @NotNull private String title; /** * a list of items in the box */ @Column(length = 1000000) @Size(max = 1000000) @NotNull private String text; @ManyToOne private Article article; public FactBox() { } public FactBox(Long ID) { super(ID); } public Article getArticle() { return article; } public void setArticle(Article article) { this.article = article; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getText() { return text; } public void setText(String text) { this.text = text; } public String toString() { return title; } }