Tabnine Logo
Column.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
liquibase.structure.core.Column
constructor

Best Java code snippets using liquibase.structure.core.Column.<init> (Showing top 10 results out of 315)

origin: liquibase/liquibase-hibernate

Column pkColumn = new Column();
pkColumn.setName((String) pkColumnName.get(tableGenerator));
DataType pkDataType = new DataType(PK_DATA_TYPE);
table.getColumns().add(pkColumn);
Column valueColumn = new Column();
valueColumn.setName((String) valueColumnName.get(tableGenerator));
valueColumn.setType(new DataType(VALUE_DATA_TYPE));
origin: liquibase/liquibase-hibernate

@Override
protected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) throws DatabaseException, InvalidExampleException {
  if (foundObject instanceof Table) {
    org.hibernate.mapping.Table hibernateTable = findHibernateTable(foundObject, snapshot);
    if (hibernateTable == null) {
      return;
    }
    Iterator columnIterator = hibernateTable.getColumnIterator();
    while (columnIterator.hasNext()) {
      org.hibernate.mapping.Column hibernateColumn = (org.hibernate.mapping.Column) columnIterator.next();
      Column column = new Column();
      column.setName(hibernateColumn.getName());
      column.setRelation((Table) foundObject);
      snapshotColumn(column, snapshot);
      ((Table) foundObject).getColumns().add(column);
    }
  }
}
origin: aerogear/aerogear-unifiedpush-server

  @Override
  public void check(Database database) throws CustomPreconditionFailedException, CustomPreconditionErrorException {
    Column column = new Column(this.columnNames);
    UniqueConstraint uniqueConstraint = new UniqueConstraint(this.constraintName, null, null, this.tableName, column);
    boolean markFailed = false;
    try {
      if (!SnapshotGeneratorFactory.getInstance().has(uniqueConstraint, database)) {
        markFailed = true;
      }
    } catch (Exception e) {
      throw new CustomPreconditionErrorException("custom precondition check errored", e);
    }

    if (markFailed) {
      throw new CustomPreconditionFailedException(this.constraintName + " doesn't exist");
    }
  }
}
origin: liquibase/liquibase-hibernate

@Override
protected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) throws DatabaseException, InvalidExampleException {
  if (!snapshot.getSnapshotControl().shouldInclude(Index.class)) {
    return;
  }
  if (foundObject instanceof Table) {
    Table table = (Table) foundObject;
    org.hibernate.mapping.Table hibernateTable = findHibernateTable(table, snapshot);
    if (hibernateTable == null) {
      return;
    }
    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));
      }
      LOG.info("Found index " + index.getName());
      table.getIndexes().add(index);
    }
  }
}
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

while (columnIterator.hasNext()) {
  org.hibernate.mapping.Column hibernateColumn = (org.hibernate.mapping.Column) columnIterator.next();
  uniqueConstraint.addColumn(i, new Column(hibernateColumn.getName()).setRelation(table));
  i++;
    name = name.substring(0, 63);
  uniqueConstraint.addColumn(0, new Column(column.getName()).setRelation(table));
  uniqueConstraint.setName(name);
  LOG.info("Found unique constraint " + uniqueConstraint.toString());
origin: liquibase/liquibase-hibernate

pk.setTable(table);
for (Object hibernateColumn : hibernatePrimaryKey.getColumns()) {
  pk.getColumns().add(new Column(((org.hibernate.mapping.Column) hibernateColumn).getName()).setRelation(table));
origin: liquibase/liquibase-hibernate

@Override
public Table snapshot(IdentifierGenerator ig) {
  TableGenerator tableGenerator = (TableGenerator) ig;
  Table table = new Table().setName(tableGenerator.getTableName());
  Column pkColumn = new Column();
  pkColumn.setName(tableGenerator.getSegmentColumnName());
  DataType pkDataType = new DataType(PK_DATA_TYPE);
  pkDataType.setColumnSize(tableGenerator.getSegmentValueLength());
  pkColumn.setType(pkDataType);
  pkColumn.setCertainDataType(false);
  pkColumn.setRelation(table);
  table.getColumns().add(pkColumn);
  PrimaryKey primaryKey = new PrimaryKey();
  primaryKey.setName(tableGenerator.getTableName() + "PK");
  primaryKey.addColumn(0, new Column(pkColumn.getName()).setRelation(table));
  primaryKey.setTable(table);
  table.setPrimaryKey(primaryKey);
  Column valueColumn = new Column();
  valueColumn.setName(tableGenerator.getValueColumnName());
  valueColumn.setType(new DataType(VALUE_DATA_TYPE));
  valueColumn.setNullable(false);
  valueColumn.setCertainDataType(false);
  valueColumn.setRelation(table);
  table.getColumns().add(valueColumn);
  return table;
}
origin: liquibase/liquibase-hibernate

fk.setForeignKeyTable(currentTable);
for (Object column : hibernateForeignKey.getColumns()) {
  fk.addForeignKeyColumn(new liquibase.structure.core.Column(((org.hibernate.mapping.Column) column).getName()));
  fk.addPrimaryKeyColumn(new liquibase.structure.core.Column(((org.hibernate.mapping.Column) column).getName()));
    fk.addPrimaryKeyColumn(new liquibase.structure.core.Column(((org.hibernate.mapping.Column) column).getName()));
origin: jhipster/jhipster-loaded

while (columnIterator.hasNext()) {
  org.hibernate.mapping.Column hibernateColumn = (org.hibernate.mapping.Column) columnIterator.next();
  Column column = new Column();
  column.setName(hibernateColumn.getName());
liquibase.structure.coreColumn<init>

Popular methods of Column

  • getName
  • getType
  • setAutoIncrementInformation
  • setCertainDataType
  • setDefaultValue
  • setName
  • setNullable
  • setRelation
  • setRemarks
  • setType
  • getRelation
  • isAutoIncrement
  • getRelation,
  • isAutoIncrement,
  • isNullable

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • 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