|
| 1 | +package org.nutz.dao.test.normal.psql; |
| 2 | + |
| 3 | +import org.nutz.dao.entity.annotation.ColDefine; |
| 4 | +import org.nutz.dao.entity.annotation.ColType; |
| 5 | +import org.nutz.dao.entity.annotation.Id; |
| 6 | +import org.nutz.dao.entity.annotation.Table; |
| 7 | +import org.nutz.dao.impl.jdbc.psql.PsqlJsonAdaptor; |
| 8 | +import org.nutz.dao.impl.jdbc.psql.PsqlJsonCompactAdaptor; |
| 9 | +import org.nutz.dao.impl.jdbc.psql.PsqlJsonTidyAdaptor; |
| 10 | + |
| 11 | +@Table("t_psql_json_adaptor_test_bean") |
| 12 | +public class PsqlJsonAdaptorTestBean { |
| 13 | + |
| 14 | + @Id |
| 15 | + private int id; |
| 16 | + |
| 17 | + @ColDefine(customType = "jsonb", type = ColType.PSQL_JSON) |
| 18 | + private StudentResult noneAdaptor; |
| 19 | + |
| 20 | + @ColDefine(customType = "json", type = ColType.PSQL_JSON, adaptor = PsqlJsonAdaptor.class) |
| 21 | + private StudentResult jsonAdaptor; |
| 22 | + |
| 23 | + @ColDefine(customType = "json", type = ColType.PSQL_JSON, adaptor = PsqlJsonCompactAdaptor.class) |
| 24 | + private StudentResult jsonCompactAdaptor; |
| 25 | + |
| 26 | + @ColDefine(customType = "json", type = ColType.PSQL_JSON, adaptor = PsqlJsonTidyAdaptor.class) |
| 27 | + private StudentResult jsonTidyAdaptor; |
| 28 | + |
| 29 | + public int getId() { |
| 30 | + return id; |
| 31 | + } |
| 32 | + |
| 33 | + public void setId(int id) { |
| 34 | + this.id = id; |
| 35 | + } |
| 36 | + |
| 37 | + public org.nutz.dao.test.normal.psql.StudentResult getNoneAdaptor() { |
| 38 | + return noneAdaptor; |
| 39 | + } |
| 40 | + |
| 41 | + public void setNoneAdaptor(StudentResult noneAdaptor) { |
| 42 | + this.noneAdaptor = noneAdaptor; |
| 43 | + } |
| 44 | + |
| 45 | + public StudentResult getJsonAdaptor() { |
| 46 | + return jsonAdaptor; |
| 47 | + } |
| 48 | + |
| 49 | + public void setJsonAdaptor(StudentResult jsonAdaptor) { |
| 50 | + this.jsonAdaptor = jsonAdaptor; |
| 51 | + } |
| 52 | + |
| 53 | + public StudentResult getJsonCompactAdaptor() { |
| 54 | + return jsonCompactAdaptor; |
| 55 | + } |
| 56 | + |
| 57 | + public void setJsonCompactAdaptor(StudentResult jsonCompactAdaptor) { |
| 58 | + this.jsonCompactAdaptor = jsonCompactAdaptor; |
| 59 | + } |
| 60 | + |
| 61 | + public StudentResult getJsonTidyAdaptor() { |
| 62 | + return jsonTidyAdaptor; |
| 63 | + } |
| 64 | + |
| 65 | + public void setJsonTidyAdaptor(StudentResult jsonTidyAdaptor) { |
| 66 | + this.jsonTidyAdaptor = jsonTidyAdaptor; |
| 67 | + } |
| 68 | +} |
0 commit comments