4343import com .marklogic .client .document .JSONDocumentManager ;
4444import com .marklogic .client .document .XMLDocumentManager ;
4545import com .marklogic .client .io .Format ;
46- import com .marklogic .client .io .JacksonPojoHandle ;
46+ import com .marklogic .client .io .JacksonDatabindHandle ;
4747import com .marklogic .client .query .DeleteQueryDefinition ;
4848import com .marklogic .client .query .QueryManager ;
4949import com .marklogic .client .test .Common ;
@@ -69,7 +69,7 @@ public static void afterClass() {
6969 }
7070
7171 /** Here we're trying to keep it simple and demonstrate how you would use Jackson
72- * via JacksonPojoHandle to do the most common-case databinding to serialize your
72+ * via JacksonDatabindHandle to do the most common-case databinding to serialize your
7373 * pojos to json. To reuse existing code we're letting BulkReadWriteTest load
7474 * records from a csv file and populate our City pojos. We just manage the
7575 * serialization and persistence logic.
@@ -81,8 +81,8 @@ public class JsonCityWriter implements CityWriter {
8181
8282 public void addCity (City city ) {
8383 if ( numCities >= MAX_TO_WRITE ) return ;
84- // instantiate a JacksonPojoHandle ready to serialize this city to json
85- JacksonPojoHandle handle = new JacksonPojoHandle (city );
84+ // instantiate a JacksonDatabindHandle ready to serialize this city to json
85+ JacksonDatabindHandle handle = new JacksonDatabindHandle (city );
8686 // demonstrate our ability to set advanced configuration on the mapper
8787 // in this case, we're saying wrap our serialization with the name of the pojo class
8888 handle .getMapper ().enableDefaultTyping (ObjectMapper .DefaultTyping .NON_FINAL , JsonTypeInfo .As .WRAPPER_OBJECT );
@@ -110,7 +110,7 @@ public void testDatabind() throws Exception {
110110
111111 /** We're going to demonstrate the versitility of Jackson by using and XmlMapper
112112 * to serialize instead of the default JsonMapper to serialize to json. Most
113- * importantly, this points to the ability with JacksonHandle or JacksonPojoHandle
113+ * importantly, this points to the ability with JacksonHandle or JacksonDatabindHandle
114114 * to bring your own mapper and all the power that comes with it.
115115 **/
116116 public static class XmlCityWriter implements CityWriter {
@@ -125,7 +125,7 @@ public static class XmlCityWriter implements CityWriter {
125125
126126 public void addCity (City city ) {
127127 if ( numCities >= MAX_TO_WRITE ) return ;
128- JacksonPojoHandle handle = new JacksonPojoHandle (city );
128+ JacksonDatabindHandle handle = new JacksonDatabindHandle (city );
129129 // NOTICE: We've set the mapper to an XmlMapper, showing the versitility of Jackson
130130 handle .setMapper (mapper );
131131 handle .setFormat (Format .XML );
@@ -166,7 +166,7 @@ class ToponymMixIn2 {
166166
167167 /** Demonstrate using Jackson's CSV mapper directly to simplify reading in data, populating a
168168 * third-party pojo (one we cannot annotate) then writing it out
169- * via JacksonPojoHandle with configuration provided by mix-in annotations.
169+ * via JacksonDatabindHandle with configuration provided by mix-in annotations.
170170 **/
171171 @ Test
172172 public void testDatabindingThirdPartyPojoWithMixinAnnotations () throws JsonProcessingException , IOException {
@@ -201,7 +201,7 @@ public void testDatabindingThirdPartyPojoWithMixinAnnotations() throws JsonProce
201201 String line = null ;
202202 for (int numWritten = 0 ; numWritten < MAX_TO_WRITE && (line = cityReader .readLine ()) != null ; numWritten ++ ) {
203203 Toponym city = reader .readValue (line );
204- JacksonPojoHandle handle = new JacksonPojoHandle (city );
204+ JacksonDatabindHandle handle = new JacksonDatabindHandle (city );
205205 handle .getMapper ().addMixInAnnotations (Toponym .class , ToponymMixIn2 .class );
206206 set .add (DIRECTORY + "/thirdPartyJsonCities/" + city .getGeoNameId () + ".json" , handle );
207207 }
0 commit comments