Codota Logo
DatabaseObject.getSnapshotId
Code IndexAdd Codota to your IDE (free)

How to use
getSnapshotId
method
in
liquibase.structure.DatabaseObject

Best Java code snippets using liquibase.structure.DatabaseObject.getSnapshotId (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: liquibase/liquibase-hibernate

@Override
protected DatabaseObject snapshotObject(DatabaseObject example, DatabaseSnapshot snapshot) throws DatabaseException, InvalidExampleException {
  if (example.getSnapshotId() != null) {
    return example;
  }
  Table table = ((Index) example).getTable();
  org.hibernate.mapping.Table hibernateTable = findHibernateTable(table, snapshot);
  if (hibernateTable == null) {
    return example;
  }
  Iterator indexIterator = hibernateTable.getIndexIterator();
  while (indexIterator.hasNext()) {
    org.hibernate.mapping.Index hibernateIndex = (org.hibernate.mapping.Index) indexIterator.next();
    Index index = new Index();
    index.setTable(table);
    index.setName(hibernateIndex.getName());
    Iterator columnIterator = hibernateIndex.getColumnIterator();
    while (columnIterator.hasNext()) {
      org.hibernate.mapping.Column hibernateColumn = (org.hibernate.mapping.Column) columnIterator.next();
      index.getColumns().add(new Column(hibernateColumn.getName()).setRelation(table));
    }
    if (index.getColumnNames().equalsIgnoreCase(((Index) example).getColumnNames())) {
      LOG.info("Found index " + index.getName());
      table.getIndexes().add(index);
      return index;
    }
  }
  return example;
}
origin: liquibase/liquibase-hibernate

  @Override
  protected DatabaseObject snapshotObject(DatabaseObject example, DatabaseSnapshot snapshot) throws DatabaseException, InvalidExampleException {
    if (example.getSnapshotId() != null) {
      return example;
    }
    org.hibernate.mapping.Table hibernateTable = findHibernateTable(example, snapshot);
    if (hibernateTable == null) {
      return example;
    }

    Table table = new Table().setName(hibernateTable.getName());
    LOG.info("Found table " + table.getName());
//        table.setSnapshotId(SnapshotIdService.getInstance().generateId());
    table.setSchema(example.getSchema());


    return table;
  }

liquibase.structureDatabaseObjectgetSnapshotId

Popular methods of DatabaseObject

  • getSchema
  • getName

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now