1 package org.hibernate.test.annotations.lob; 3 4 import javax.persistence.Column; 5 import javax.persistence.Entity; 6 import javax.persistence.GeneratorType; 7 import javax.persistence.Id; 8 import javax.persistence.Lob; 9 import javax.persistence.LobType; 10 11 14 @Entity 15 public class Book { 16 private Integer id; 17 private String shortDescription; 18 private String fullText; 19 private Character [] code; 20 private char[] code2; 21 private Editor editor; 22 23 @Id(generate=GeneratorType.AUTO) 24 public Integer getId() { 25 return id; 26 } 27 28 public void setId(Integer id) { 29 this.id = id; 30 } 31 32 public String getShortDescription() { 33 return shortDescription; 34 } 35 36 public void setShortDescription(String shortDescription) { 37 this.shortDescription = shortDescription; 38 } 39 @Lob(type=LobType.CLOB) 40 @Column(name="fld_fulltext") 41 public String getFullText() { 42 return fullText; 43 } 44 45 public void setFullText(String fullText) { 46 this.fullText = fullText; 47 } 48 49 @Lob(type = LobType.CLOB) 50 @Column(name="fld_code") 51 public Character [] getCode() { 52 return code; 53 } 54 55 public void setCode(Character [] code) { 56 this.code = code; 57 } 58 59 @Lob(type = LobType.CLOB) 60 public char[] getCode2() { 61 return code2; 62 } 63 64 public void setCode2(char[] code2) { 65 this.code2 = code2; 66 } 67 68 @Lob(type = LobType.BLOB) 69 public Editor getEditor() { 70 return editor; 71 } 72 73 public void setEditor(Editor editor) { 74 this.editor = editor; 75 } 76 } 77 | Popular Tags |