@@ -37,6 +37,7 @@ public MappingConverter(IBaseAeroMapper mapper, IAerospikeClient aerospikeClient
3737 /**
3838 * Translate a Java object to an Aerospike format object. Note that this could potentially have performance issues as
3939 * the type information of the passed object must be determined on every call.
40+ *
4041 * @param obj A given Java object.
4142 * @return An Aerospike format object.
4243 */
@@ -51,6 +52,7 @@ public Object translateToAerospike(Object obj) {
5152 /**
5253 * Translate an Aerospike object to a Java object. Note that this could potentially have performance issues as
5354 * the type information of the passed object must be determined on every call.
55+ *
5456 * @param obj A given Java object.
5557 * @return An Aerospike format object.
5658 */
@@ -66,10 +68,12 @@ public <T> T translateFromAerospike(@NotNull Object obj, @NotNull Class<T> expec
6668 // The following are convenience methods to convert objects to / from lists / maps / records in case
6769 // it is needed to perform this operation manually. They will not be needed in most use cases.
6870 // --------------------------------------------------------------------------------------------------
71+
6972 /**
7073 * Given a record loaded from Aerospike and a class type, attempt to convert the record to
7174 * an instance of the passed class.
72- * @param clazz The class type to convert the Aerospike record to.
75+ *
76+ * @param clazz The class type to convert the Aerospike record to.
7377 * @param record The Aerospike record to convert.
7478 * @return A virtual list.
7579 * @throws AerospikeException an AerospikeException will be thrown in case of an encountering a ReflectiveOperationException.
@@ -85,9 +89,10 @@ public <T> T convertToObject(Class<T> clazz, Record record) {
8589 /**
8690 * Given a record loaded from Aerospike and a class type, attempt to convert the record to
8791 * an instance of the passed class.
88- * @param clazz The class type to convert the Aerospike record to.
92+ *
93+ * @param clazz The class type to convert the Aerospike record to.
8994 * @param record The Aerospike record to convert.
90- * @param entry The entry that holds information on how to store the provided class.
95+ * @param entry The entry that holds information on how to store the provided class.
9196 * @return A virtual list.
9297 * @throws AerospikeException an AerospikeException will be thrown in case of an encountering a ReflectiveOperationException.
9398 */
@@ -112,7 +117,8 @@ public <T> T convertToObject(Class<T> clazz, Record record, ClassCacheEntry<T> e
112117 /**
113118 * Given a list of records loaded from Aerospike and a class type, attempt to convert the records to
114119 * an instance of the passed class.
115- * @param clazz The class type to convert the Aerospike record to.
120+ *
121+ * @param clazz The class type to convert the Aerospike record to.
116122 * @param record The Aerospike records to convert.
117123 * @return A virtual list.
118124 * @throws AerospikeException an AerospikeException will be thrown in case of an encountering a ReflectiveOperationException.
@@ -142,7 +148,8 @@ public <T> T convertToObject(Class<T> clazz, List<Object> record, boolean resolv
142148 /**
143149 * Given a map of records loaded from Aerospike and a class type, attempt to convert the records to
144150 * an instance of the passed class.
145- * @param clazz The class type to convert the Aerospike record to.
151+ *
152+ * @param clazz The class type to convert the Aerospike record to.
146153 * @param record The Aerospike records to convert.
147154 * @return A virtual list.
148155 * @throws AerospikeException an AerospikeException will be thrown in case of an encountering a ReflectiveOperationException.
@@ -154,9 +161,11 @@ public <T> T convertToObject(Class<T> clazz, Map<String, Object> record) {
154161
155162 /**
156163 * Given an instance of a class (of any type), convert its properties to a list
164+ *
157165 * @param instance The instance of a class (of any type).
158166 * @return a List of the properties of the given instance.
159167 */
168+ @ SuppressWarnings ("unchecked" )
160169 public <T > List <Object > convertToList (@ NotNull T instance ) {
161170 ClassCacheEntry <T > entry = (ClassCacheEntry <T >) ClassCache .getInstance ().loadClass (instance .getClass (), mapper );
162171 return entry .getList (instance , false , false );
@@ -165,9 +174,11 @@ public <T> List<Object> convertToList(@NotNull T instance) {
165174 /**
166175 * Given an instance of a class (of any type), convert its properties to a map, properties names will use as the
167176 * key and properties values will be the values.
177+ *
168178 * @param instance The instance of a class (of any type).
169179 * @return the properties {@link Map} of the given instance.
170180 */
181+ @ SuppressWarnings ("unchecked" )
171182 public <T > Map <String , Object > convertToMap (@ NotNull T instance ) {
172183 ClassCacheEntry <T > entry = (ClassCacheEntry <T >) ClassCache .getInstance ().loadClass (instance .getClass (), mapper );
173184 return entry .getMap (instance , false );
@@ -180,6 +191,7 @@ private Key createKey(ClassCacheEntry<?> entry, DeferredObjectLoader.DeferredObj
180191 return new Key (entry .getNamespace (), entry .getSetName (), Value .get (entry .translateKeyToAerospikeKey (deferredObject .getKey ())));
181192 }
182193 }
194+
183195 /**
184196 * If an object refers to other objects (eg A has a list of B via references), then reading the object will populate the
185197 * ids. If configured to do so, these objects can be loaded via a batch load and populated back into the references which
@@ -190,6 +202,7 @@ private Key createKey(ClassCacheEntry<?> entry, DeferredObjectLoader.DeferredObj
190202 * the list of deferred objects is empty. The deferred objects are stored in a <pre>ThreadLocalData<pre> list, so are thread safe
191203 * @param parentEntity - the ClassCacheEntry of the parent entity. This is used to get the batch policy to use.
192204 */
205+ @ SuppressWarnings ("unchecked" )
193206 public void resolveDependencies (ClassCacheEntry <?> parentEntity ) {
194207 List <DeferredObjectLoader .DeferredObjectSetter > deferredObjects = DeferredObjectLoader .getAndClear ();
195208
0 commit comments