title: How to write several item in table at the same time using ORMLite
body: <p>I use ORMLite on a solution made by server and clients.</p>
  <p>On server side I use PostgreSql, on client side I use SQLite.
  In code, I use the same ORMLite methods, without taking care of the DB that is managed (PostgreSql or SQLite).</p>
  <p>Let's say that:</p>
  <ul>
  <li>Table A corresponds to class A</li>
  <li>I have an Arraylist of objects A</li>
  <li>I want to insert all items of ArrayList in DB.</li>
  </ul>
  <p>Today I use a for() cycle, and I insert them one by one (doing it in Transaction Manager).
  When the items are few, no problem, but now the items are becaming more and this is not probably the best way, also because I lock the DB for long time.</p>
  <p>I'm searching a way to insert all the items in one step, so to go quickly, to not lock the DB for long time. I understood that it should be a sort of Stored Procedures (I'm not expert...).</p>
  <p>To be noted that some items could be new (that is it not exist already an item with the same primary key id), then must be performed and INSERT; other items could be existing, so it should be performed an UPDATE.</p>
  <p>Thank you</p>