Tabnine Logo
EnumArgumentFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
EnumArgumentFactory
in
com.ning.billing.util.dao

Best Java code snippets using com.ning.billing.util.dao.EnumArgumentFactory (Showing top 2 results out of 315)

origin: com.ning.billing/killbill-analytics

  private DBI createDBI(final ConfigSource configSource) {
    final ComboPooledDataSource dataSource = new ComboPooledDataSource();
    dataSource.setJdbcUrl(configSource.getString(ANALYTICS_DBI_CONFIG_STRING + "url"));
    dataSource.setUser(configSource.getString(ANALYTICS_DBI_CONFIG_STRING + "user"));
    dataSource.setPassword(configSource.getString(ANALYTICS_DBI_CONFIG_STRING + "password"));
    dataSource.setMinPoolSize(1);
    dataSource.setMaxPoolSize(10);
    dataSource.setCheckoutTimeout(10 * 1000);
    dataSource.setMaxIdleTime(60 * 60);
    dataSource.setMaxConnectionAge(0);
    dataSource.setIdleConnectionTestPeriod(5 * 60);

    final DBI dbi = new DBI(dataSource);
    dbi.registerArgumentFactory(new UUIDArgumentFactory());
    dbi.registerArgumentFactory(new DateTimeZoneArgumentFactory());
    dbi.registerArgumentFactory(new DateTimeArgumentFactory());
    dbi.registerArgumentFactory(new LocalDateArgumentFactory());
    dbi.registerArgumentFactory(new EnumArgumentFactory());
    dbi.registerMapper(new UuidMapper());
    try {
      dbi.setTransactionHandler((TransactionHandler) Class.forName("com.ning.jetty.jdbi.RestartTransactionRunner").newInstance());
    } catch (Exception e) {
      logger.warn("Unable to register transaction handler");
    }

    return dbi;
  }
}
origin: com.ning.billing/killbill-util

  @Override
  public IDBI get() {
    final DBI dbi = new DBI(ds);
    dbi.registerArgumentFactory(new UUIDArgumentFactory());
    dbi.registerArgumentFactory(new DateTimeZoneArgumentFactory());
    dbi.registerArgumentFactory(new DateTimeArgumentFactory());
    dbi.registerArgumentFactory(new LocalDateArgumentFactory());
    dbi.registerArgumentFactory(new EnumArgumentFactory());
    dbi.registerMapper(new UuidMapper());
    dbi.registerMapper(new AuditLogModelDaoMapper());
    dbi.registerMapper(new RecordIdIdMappingsMapper());

    // Restart transactions in case of deadlocks
    dbi.setTransactionHandler(new SerializableTransactionRunner());
    //final SQLLog log = new Log4JLog();
    //dbi.setSQLLog(log);

    return dbi;
  }
}
com.ning.billing.util.daoEnumArgumentFactory

Most used methods

  • <init>

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Notification (javax.management)
  • JComboBox (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now