title: Using OrmLiteSqliteOpenHelper with DAO classes
body: <p>I'm using the following libs:</p>
  
  <p>ormlite-android-4.28.jar
  ormlite-core-4.28.jar
  roboguice-2.0.jar
  guice-3.0-no_aop.jar
  guice-assistedinject-3.0-rc2.jar
  android-support-v13.jar</p>
  
  <p>All my injection services are working fine but Im having issues with the following scenario. I've created a DaoProvider as follows;</p>
  
  <pre><code>public class DaoProvider&lt;T extends DatabaseEntity, ID&gt; implements Provider&lt;Dao&lt;T, ID&gt;&gt;
  </code></pre>
  
  <p>My AbstractModule class looks like this;</p>
  
  <pre><code>bind(new TypeLiteral&lt;Dao&lt;CityPersist, Integer&gt;&gt;() {
          }).toProvider(new DaoProvider&lt;CityPersist, Integer&gt;(ormLiteSqliteOpenHelper.getConnectionSource(), CityPersist.class))
  </code></pre>
  
  <p>My CityDao looks like this;</p>
  
  <pre><code>@ImplementedBy(CityDaoImpl.class)
  public interface CityDao
      extends Dao&lt;CityPersist, Long&gt;
  {
      ConnectionSource getConnectionSource();
  
      CityPersist create(JSONObject json);
  
      CityPersist findByCityId(String cityId);
  }
  </code></pre>
  
  <p>The issue Im having is trying to create ConnectionSource in the AbstractModule. If using the roboguice 1 I can just set the following;</p>
  
  <pre><code>public ClientServicesModule(OrmLiteSqliteOpenHelper ormLiteSqliteOpenHelper)
      {
           super();
           this.ormLiteSqliteOpenHelper = ormLiteSqliteOpenHelper;
      }
  </code></pre>
  
  <p>By creating a new AbstractModule in my Application class. However, I've seen anywhere that allows me to create the same in roboguice 2.</p>
  
  <p>Any ideas? </p>
  
  <p>Thanks in advance.</p>