Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Entity(name = "Attachment")
- @Table(name = "attachment")
- @PrimaryKeyJoinColumns({ @PrimaryKeyJoinColumn(name = "attachment_parent_id") })
- @Audited
- public class Attachment extends IdClass {
- @Basic()
- @Column(name = "name")
- private String name = null;
- @Basic()
- @Column(name = "fileblob")
- @Lob()
- private byte[] fileBlob = null;
- @ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST,
- CascadeType.REFRESH }, optional = false)
- @JoinColumns({ @JoinColumn(name = "attachment_entity") })
- private IdClass entity = null;
- public String getName() {
- return name;
- }
- public void setName(String newName) {
- name = newName;
- }
- public byte[] getFileBlob() {
- return fileBlob;
- }
- public void setFileBlob(byte[] newFileBlob) {
- fileBlob = newFileBlob;
- }
- public IdClass getEntity() {
- return entity;
- }
- public void setEntity(IdClass newEntity) {
- entity = newEntity;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement