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

How to use
SchemaUtils
in
uk.ac.ebi.intact.core.util

Best Java code snippets using uk.ac.ebi.intact.core.util.SchemaUtils (Showing top 20 results out of 315)

origin: uk.ac.ebi.intact.core/intact-core

  /**
   * 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);
  }
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Generates the DDL schema for PostgreSQL.
 * @return an array containing the SQL statements
 */
public static String[] generateCreateSchemaDDLForPostgreSQL() {
  return generateCreateSchemaDDL(PostgreSQLDialect.class.getName());
}
origin: uk.ac.ebi.intact/intact-core

/**
 * Generates the DDL schema for Oracle
 * @return an array containing the SQL statements
 */
public static String[] generateDropSchemaDDLForOracle() {
  return generateDropSchemaDDL(Oracle9Dialect.class.getName());
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * Generates the DDL schema
 * @param dialect the dialect to use (complete class name for the hibernate dialect object)
 * @return an array containing the SQL statements
 */
public static String[] generateCreateSchemaDDL(String dialect) {
  Properties props = new Properties();
  props.put(Environment.DIALECT, dialect);
  Configuration cfg = createConfiguration(props);
  String[] sqls = cfg.generateSchemaCreationScript(Dialect.getDialect(props));
  addDelimiters(sqls);
  return sqls;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * Drops and creates the schema, initializing intact. Beware that it commits transactions
 */
public static void resetSchema() throws IntactTransactionException {
  resetSchema(true);
}
origin: uk.ac.ebi.intact/intact-core

/**
 * Creates a schema and initialize the database
 */
public static void createSchema() throws IntactTransactionException {
  createSchema(true);
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * 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);
}
origin: uk.ac.ebi.intact/intact-core

/**
 * Drops the current schema, emptying the database
 */
public void dropSchema() throws IntactTransactionException {
  SchemaUtils.dropSchema();
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Drops the current schema, emptying the database
 */
public static void dropSchema() {
  if (log.isDebugEnabled()) log.debug("Droping schema");
  SchemaExport se = newSchemaExport();
  se.drop(false, true);
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

public static String[] getTableNames() {
  List<String> tableNames = new ArrayList<String>();
  Configuration cfg = createConfiguration(new Properties());
  Iterator<PersistentClass> classMappings = cfg.getClassMappings();
  while (classMappings.hasNext()) {
    PersistentClass o =  classMappings.next();
    tableNames.add(o.getTable().getName());
  }
  return tableNames.toArray(new String[tableNames.size()]);
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Generates the DDL schema
 * @param dialect the dialect to use (complete class name for the hibernate dialect object)
 * @return an array containing the SQL statements
 */
public static String[] generateDropSchemaDDL(String dialect) {
  Properties props = new Properties();
  props.put(Environment.DIALECT, dialect);
  Configuration cfg = createConfiguration(props);
  String[] sqls = cfg.generateSchemaCreationScript(Dialect.getDialect(props));
  addDelimiters(sqls);
  return sqls;
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Drops and creates the schema, initializing intact. Beware that it commits transactions
 */
public static void resetSchema() throws IntactTransactionException {
  resetSchema(true);
}
origin: uk.ac.ebi.intact/intact-core

/**
 * 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);
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * 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);
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * Drops the current schema, emptying the database
 */
public static void dropSchema() {
  if (log.isDebugEnabled()) log.debug("Droping schema");
  SchemaExport se = newSchemaExport();
  se.drop(false, true);
}
origin: uk.ac.ebi.intact.core/intact-core

public static String[] getTableNames() {
  List<String> tableNames = new ArrayList<String>();
  Configuration cfg = createConfiguration(new Properties());
  Iterator<PersistentClass> classMappings = cfg.getClassMappings();
  while (classMappings.hasNext()) {
    PersistentClass o =  classMappings.next();
    tableNames.add(o.getTable().getName());
  }
  return tableNames.toArray(new String[tableNames.size()]);
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

  /**
   * 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);
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * Generates the DDL schema
 * @param dialect the dialect to use (complete class name for the hibernate dialect object)
 * @return an array containing the SQL statements
 */
public static String[] generateDropSchemaDDL(String dialect) {
  Properties props = new Properties();
  props.put(Environment.DIALECT, dialect);
  Configuration cfg = createConfiguration(props);
  String[] sqls = cfg.generateSchemaCreationScript(Dialect.getDialect(props));
  addDelimiters(sqls);
  return sqls;
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Generates the DDL schema for HSQL DB.
 * @return an array containing the SQL statements
 */
public static String[] generateCreateSchemaDDLForHSQL() {
  return generateCreateSchemaDDL(HSQLDialect.class.getName());
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Generates the DDL schema for Oracle
 * @return an array containing the SQL statements
 */
public static String[] generateDropSchemaDDLForOracle() {
  return generateDropSchemaDDL(Oracle9iDialect.class.getName());
}
uk.ac.ebi.intact.core.utilSchemaUtils

Javadoc

IntAct schema utils, that contains methods to create/drop the database schema, create DDLs...

Most used methods

  • createSchema
    Creates a schema
  • dropSchema
    Drops the current schema, emptying the database
  • generateCreateSchemaDDL
    Generates the DDL schema
  • generateDropSchemaDDL
    Generates the DDL schema
  • resetSchema
    Drops and creates the schema. Beware that it commits transactions
  • addDelimiters
  • createConfiguration
  • generateUpdateSchemaDDL
  • newSchemaExport

Popular in Java

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JOptionPane (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top Sublime Text plugins
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