com.github.gentity.demogallery.PictureData Maven / Gradle / Ivy
package com.github.gentity.demogallery;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.OneToOne;
import javax.persistence.Table;
@Entity
@Table(name = "PICTURE_DATA")
public class PictureData implements Serializable
{
@Lob
@Column(name = "DATA", nullable = false)
protected byte[] data;
@OneToOne
@JoinColumn(name = "PICTURE_ID", nullable = false)
protected Picture picture;
public static PictureData.Builder builder() {
return new PictureData.Builder();
}
public byte[] getData() {
return data;
}
public void setData(byte[] data) {
this.data = data;
}
public Picture getPicture() {
return picture;
}
public void setPicture(Picture picture) {
this.picture = picture;
}
public static class Builder {
private final PictureData instance = new PictureData();
public PictureData build() {
return instance;
}
public PictureData.Builder data(byte[] data) {
instance.data = data;
return this;
}
public PictureData.Builder picture(Picture picture) {
instance.picture = picture;
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy