Rev 1778 | Rev 1782 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1778 | Rev 1780 | ||
---|---|---|---|
Line 115... | Line 115... | ||
115 | .create(); |
115 | .create(); |
116 | 116 | ||
117 | 117 | ||
118 | 118 | ||
119 | 119 | ||
120 | public 1.5.0/docs/api/java/lang/String.html">String toJson() throws 1.5.0/docs/api/java/io/IOException.html">IOException |
120 | public 1.5.0/docs/api/java/lang/String.html">String toJson() { |
121 | { |
- | |
122 | return gensonSerialize.serialize(this); |
121 | return gensonSerialize.serialize(this); |
123 | } |
122 | } |
124 | 123 | ||
125 | public static JSONArray toJsonArray(List<RepositoryDocumentImpl> docs) throws 1.5.0/docs/api/java/io/IOException.html">IOException, JSONException { |
124 | public static JSONArray toJsonArray(List<RepositoryDocumentImpl> docs) throws 1.5.0/docs/api/java/io/IOException.html">IOException, JSONException { |
126 | return new JSONArray(gensonSerialize.serialize(docs)); |
125 | return new JSONArray(gensonSerialize.serialize(docs)); |
Line 128... | Line 127... | ||
128 | 127 | ||
129 | public static RepositoryDocumentImpl loadFromJson(1.5.0/docs/api/java/lang/String.html">String json) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
128 | public static RepositoryDocumentImpl loadFromJson(1.5.0/docs/api/java/lang/String.html">String json) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
130 | return gensonDeserialize.deserialize(json, RepositoryDocumentImpl.class); |
129 | return gensonDeserialize.deserialize(json, RepositoryDocumentImpl.class); |
131 | } |
130 | } |
132 | 131 | ||
133 | public JSONObject toJsonObject() throws 1.5.0/docs/api/java/io/IOException.html">IOException, JSONException { |
132 | public JSONObject toJsonObject() throws JSONException { |
134 | return new JSONObject(toJson()); |
133 | return new JSONObject(toJson()); |
135 | } |
134 | } |
136 | 135 | ||
137 | public static void main(1.5.0/docs/api/java/lang/String.html">String[] args) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
136 | public static void main(1.5.0/docs/api/java/lang/String.html">String[] args) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
138 | AbstractDao.getCurrentSession().beginTransaction(); |
137 | AbstractDao.getCurrentSession().beginTransaction(); |