/** * Drops and creates the schema, initializing intact. Beware that it commits transactions */ public static void resetSchema() throws IntactTransactionException { resetSchema(true); }
/** * Creates a schema and initialize the database */ public static void createSchema() { createSchema(true); }
/** * Drops the current schema, emptying the database */ public void dropSchema() throws IntactTransactionException { SchemaUtils.dropSchema(); }
/** * Whether to log or not SQL statements * * @param showSql */ public static void setPrintSql(boolean showSql) { if (showSql) { for (Logger logger : LOG_HIBERNATE_SQL) { setLoggerLevel(logger, Level.DEBUG); } } else { for (Logger logger : LOG_HIBERNATE_SQL) { setLoggerLevel(logger, Level.INFO); } } }
/** * Generates the DDL schema for PostgreSQL. * @return an array containing the SQL statements */ public static String[] generateCreateSchemaDDLForPostgreSQL() { return generateCreateSchemaDDL(PostgreSQLDialect.class.getName()); }
public static void renderIntactObjectAsTree( IntactObject intactObject ) { renderIntactObjectAsTree( intactObject, null ); }
/** * Generates the UPDATE DDL schema for PostgreSQL . * @return an array containing the SQL statements */ public static String[] generateUpdateSchemaDDLForPostgreSQL(Connection connection) throws SQLException { return generateUpdateSchemaDDL(PostgreSQLDialect.class.getName(), connection); }
/** * Drops and creates the schema, initializing intact. Beware that it commits transactions */ public static void resetSchema() throws IntactTransactionException { resetSchema(true); }
/** * Creates a schema and initialize the database */ public static void createSchema() throws IntactTransactionException { createSchema(true); }
/** * Whether to log or not SQL statements * * @param showSql */ public static void setPrintSql(boolean showSql) { if (showSql) { for (Logger logger : LOG_HIBERNATE_SQL) { setLoggerLevel(logger, Level.DEBUG); } } else { for (Logger logger : LOG_HIBERNATE_SQL) { setLoggerLevel(logger, Level.INFO); } } }
/** * Generates the DDL schema for HSQL DB. * @return an array containing the SQL statements */ public static String[] generateCreateSchemaDDLForHSQL() { return generateCreateSchemaDDL(HSQLDialect.class.getName()); }
public static void renderIntactObjectAsTree( IntactObject intactObject ) { renderIntactObjectAsTree( intactObject, null ); }
/** * Generates the UPDATE DDL schema for HSQL . * @return an array containing the SQL statements */ public static String[] generateUpdateSchemaDDLForHSQL(Connection connection) throws SQLException { return generateUpdateSchemaDDL(HSQLDialect.class.getName(), connection); }
/** * Drops and creates the schema, initializing intact. Beware that it commits transactions */ public void resetSchema() throws IntactTransactionException { SchemaUtils.resetSchema(); }
/** * 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); }
/** * Whether to log or not SQL statements * * @param showSql */ public static void setPrintSql(boolean showSql) { if (showSql) { for (Logger logger : LOG_HIBERNATE_SQL) { setLoggerLevel(logger, Level.DEBUG); } } else { for (Logger logger : LOG_HIBERNATE_SQL) { setLoggerLevel(logger, Level.INFO); } } }
/** * Generates the DDL schema for Oracle 9i. * @return an array containing the SQL statements */ public static String[] generateCreateSchemaDDLForOracle() { return generateCreateSchemaDDL(Oracle9iDialect.class.getName()); }
/** * Drops and creates the schema, initializing intact. Beware that it commits transactions */ public static void resetSchema() throws IntactTransactionException { resetSchema(true); }
/** * Creates a schema and initialize the database */ public static void createSchema() { createSchema(true); }
/** * 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 void resetSchema(boolean initializeDatabase) throws IntactTransactionException { SchemaUtils.resetSchema(initializeDatabase); }