|
package com.cp.adrabi.jln.model;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
/**
* Todo entity from http://www.vogella.de/articles/JavaPersistenceAPI/article.html
*
* @author ADRABI Abderrahim (z3vil)
* @author Lars Vogel
*
*/
@Entity
public class Todo implements Serializable
{
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Size(min=10, max=100)
@Pattern(regexp="^#[\\w+\\s]+")
private String summary;
@Size(min=10, max=500)
private String description;
public Long getId()
{
return id;
}
public String getSummary()
{
return summary;
}
public void setSummary(String summary)
{
this.summary = summary;
}
public String getDescription()
{
return description;
}
public void setDescription(String description)
{
this.description = description;
}
@Override
public String toString()
{
return "Todo [summary=" + summary + ", description=" + description
+ "]";
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.