Share on Google+Share on Google+


This package is the part of the Spring and Hibernate JPA integration application which contains model classes.


This package is the part of the Spring and Hibernate JPA  integration application which contains model classes.

For returning to main example(Spring Jpa Hibernate). Click here.

package net.roseindia.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(name = "article")
public class Article {

@Column(name = "article_id")
private Long articleId;

@Column(name = "article_name", nullable = false, length=20)
private String articleName;

@Column(name = "article_desc", nullable = false)
private String articleDesc;

@Column(name = "date_added")
private Date addedDate;

public Article() { 

public Long getArticleId() {
return articleId;

public void setArticleId(Long articleId) {
this.articleId = articleId;

public String getArticleName() {
return articleName;

public void setArticleName(String articleName) {
this.articleName = articleName;

public String getArticleDesc() {
return articleDesc;

public void setArticleDesc(String articleDesc) {
this.articleDesc = articleDesc;

public Date getAddedDate() {
return addedDate;

public void setAddedDate(Date addedDate) {
this.addedDate = addedDate;



Posted on: May 7, 2012 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: net.roseindia.model  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image