title: compare timestamp column in jpa without missing microseconds
body: <p>I have a java.lang.String which contains a timestamp with microseconds precision.
  I want to compare this timestamp with a <code>TIMESTAMP</code> column in an Oracle database backend via <code>JPA</code></p>
  
  <p>(In <code>query.setParameter</code> method argument)</p>
  
  <p><strong>Query:</strong></p>
  
  <pre><code>select CUSTOMER_NAME from CUSTOMER where REG_TIME &lt; timestamp_which_i_want_to_pass;
  </code></pre>
  
  <p>When I referred in the answer given in the <a href="https://stackoverflow.com/questions/15469284/jpa-custom-query-and-dates">stackoverflow_link</a>  I understood that javatype to be compared with DB timestamp should be either <code>java.util.Date</code> or <code>java.util.Calendar</code>.</p>
  
  <p>My problem is that if I convert the timeStamp(in String) to <code>Date</code>/<code>Calendar</code>, I will lose microseconds. But I need accurate comparison.</p>
  
  <p>How to achieve this comparison without losing microseconds?</p>