- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Connection c =
DataSource dataSource;dataSource.getConnection()
String url;DriverManager.getConnection(url)
IdentityDatabaseUtil.getDBConnection()
- Smart code suggestions by Codota
}
/** * Creates a schema and initialize the database */ public static void createSchema() { createSchema(true); }
/** * Creates a schema and initialize the database */ public static void createSchema() { createSchema(true); }
/** * Creates a schema and initialize the database */ public static void createSchema() throws IntactTransactionException { createSchema(true); }
/** * Creates a schema * @param initializeDatabase If false, do not initialize the database (e.g. don't create Institution) */ public void createSchema(boolean initializeDatabase) throws IntactTransactionException { SchemaUtils.createSchema(initializeDatabase); }
/** * Drops and creates the schema. Beware that it commits transactions * @param initializeDatabase If false, do not initialize the database (e.g. don't create Institution) */ public static void resetSchema(boolean initializeDatabase) throws IntactTransactionException { if (log.isDebugEnabled()) log.debug("Resetting schema"); dropSchema(); createSchema(initializeDatabase); } }
/** * Drops and creates the schema. Beware that it commits transactions * @param initializeDatabase If false, do not initialize the database (e.g. don't create Institution) */ public static void resetSchema(boolean initializeDatabase) throws IntactTransactionException { if (log.isDebugEnabled()) log.debug("Resetting schema"); dropSchema(); createSchema(initializeDatabase); } }
/** * Drops and creates the schema. Beware that it commits transactions * @param initializeDatabase If false, do not initialize the database (e.g. don't create Institution) */ public static void resetSchema(boolean initializeDatabase) throws IntactTransactionException { if (log.isDebugEnabled()) log.debug("Resetting schema"); DataContext dataContext = IntactContext.getCurrentInstance().getDataContext(); if (dataContext.isTransactionActive()) { throw new IllegalStateException("To reset the schema, the transaction must NOT be active: "+dataContext.getDaoFactory().getCurrentTransaction()); } dropSchema(); createSchema(initializeDatabase); } }