In spring, I use jdbcTemplate, but I have a problem that it returns a Linkedcaseinsensitivemap when querying a List, when I do the following, I still get spring linkedcaseinsensitivemap, even if I passed it to java util List and define the left side of the job as java.util.List.
First, how is this possible?
final java.util.List<Map<String, Object>> list = (java.util.List<Map<String, Object>>) jdbc .queryForList("SELECT * FROM customer");
So how can this type of upcaste be achieved? without having to declare a second list, allocate memory for it, and then manually place objects in java.util.List?
Since LinkedCaseInsensitive is a subclass of a java object, Im is having difficulty figuring out how to distinguish a super object, which is a java list. How to achieve this is a mystery at the moment.
since there is currently no way to know which brokers will use our AMQ, the goal is too strictly related to jms objects, so I can not start sending spring objects, since jms should be our standard, also keep in mind that I have no way to implement AMQProtocol, I need to send basic java objects,
Since serialization in JSON was proposed, I will explain why it does not work in this case, why I need to send "as-are" objects to the recipient, since they will be placed in the Notes document.
for (int i = 1; i <= metadata.getColumnCount(); i++) { String columnName = metadata.getColumnName(i); Object values = sqlConnection.getRset().getObject(i); doc.replaceItemValue(columnName, values); }
So SO'ers, how to achieve this more beautiful? please help thanks in advance!