Skip to content

Commit

Permalink
Merge pull request #148 from entando/ENG-2405-allowing-local-date-tim…
Browse files Browse the repository at this point in the history
…e-object-as-filter

ENG-2405 and ENG-2450 Allowing LocalDateTime object as filter
  • Loading branch information
entando-jx authored Jun 14, 2021
2 parents 9c94b8c + 93ef986 commit da4d4db
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.entando</groupId>
<artifactId>entando-core-parent</artifactId>
<version>6.3.13</version>
<version>6.3.14</version>
</parent>
<groupId>org.entando.entando</groupId>
<artifactId>entando-engine</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
Expand Down Expand Up @@ -215,6 +216,8 @@ protected void addObjectSearchStatementBlock(PreparedStatement stat,
stat.setBigDecimal(index, (BigDecimal) object);
} else if (object instanceof Boolean) {
stat.setString(index, ((Boolean) object).toString());
} else if (object instanceof LocalDateTime) {
stat.setObject(index, Timestamp.valueOf((LocalDateTime)object));
} else {
stat.setObject(index, object);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void testRunAnalysis() throws Exception {

result.andExpect(status().isOk());
result.andDo(MockMvcResultHandlers.print());
result.andExpect(content().contentType("application/json;charset=UTF-8"));
result.andExpect(content().contentType("application/json"));
checkByComponentType(result, "widgets");
checkByComponentType(result, "fragments");
checkByComponentType(result, "pages");
Expand Down

0 comments on commit da4d4db

Please sign in to comment.