/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
//$Id$
package org.hibernate.jpa.test.lob;
import java.io.Serializable;
import java.sql.Blob;
import java.sql.Clob;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Lob;
/**
* @author Emmanuel Bernard
*/
@Entity
public class ImageReader implements Serializable {
private long id;
private Blob image;
private Clob text;
@Id
@GeneratedValue
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Lob
@Column(name = "bin_img")
public Blob getImage() {
return image;
}
public void setImage(Blob image) {
this.image = image;
}
@Lob
@Column(name = "img_text")
public Clob getText() {
return text;
}
public void setText(Clob text) {
this.text = text;
}
}