Tabnine Logo
UniqueConstraint.builder
Code IndexAdd Tabnine to your IDE (free)

How to use
builder
method
in
it.unibz.inf.ontop.dbschema.UniqueConstraint

Best Java code snippets using it.unibz.inf.ontop.dbschema.UniqueConstraint.builder (Showing top 6 results out of 315)

origin: ontop/ontop

private static void extractPrimaryKey(DatabaseRelationDefinition relation, QuotedIDFactory idfac, RelationID id, ResultSet rs) throws SQLException {
  Map<Integer, String> primaryKeyAttributes = new HashMap<>();
  String currentName = null;
  while (rs.next()) {
    // TABLE_CAT is ignored for now; assume here that relation has a fully specified name
    RelationID id2 = RelationID.createRelationIdFromDatabaseRecord(idfac,
              rs.getString("TABLE_SCHEM"), rs.getString("TABLE_NAME"));
    if (id2.equals(id)) {
      currentName = rs.getString("PK_NAME"); // may be null
      String attr = rs.getString("COLUMN_NAME");
      int seq = rs.getShort("KEY_SEQ");
      primaryKeyAttributes.put(seq, attr);
    }
  }
  if (!primaryKeyAttributes.isEmpty()) {
    // use the KEY_SEQ values to restore the correct order of attributes in the PK
    UniqueConstraint.Builder builder = UniqueConstraint.builder(relation);
    for (int i = 1; i <= primaryKeyAttributes.size(); i++) {
      QuotedID attrId = QuotedID.createIdFromDatabaseRecord(idfac, primaryKeyAttributes.get(i));
      builder.add(relation.getAttribute(attrId));
    }
    relation.addUniqueConstraint(builder.build(currentName, true));
  }
}
origin: it.unibz.inf.ontop/ontop-rdb

UniqueConstraint.Builder builder = UniqueConstraint.builder(relation);
for (int i = 1; i <= primaryKeyAttributes.size(); i++) {
  QuotedID attrId = QuotedID.createIdFromDatabaseRecord(idfac, primaryKeyAttributes.get(i));
origin: ontop/ontop

builder = UniqueConstraint.builder(relation);
currentName = rs.getString("INDEX_NAME");
origin: it.unibz.inf.ontop/ontop-rdb

builder = UniqueConstraint.builder(relation);
currentName = rs.getString("INDEX_NAME"); 
origin: ontop/ontop

  continue;
UniqueConstraint.Builder builder = UniqueConstraint.builder(td);
String[] attrs = uc[1].split(",");
for (String attr : attrs) {
origin: it.unibz.inf.ontop/ontop-mapping-core

  continue;
UniqueConstraint.Builder builder = UniqueConstraint.builder(td);
String[] attrs = uc[1].split(",");
for (String attr : attrs) {
it.unibz.inf.ontop.dbschemaUniqueConstraintbuilder

Javadoc

creates a UNIQUE constraint builder (which is also used for a PRIMARY KET builder)

Popular methods of UniqueConstraint

  • getAttributes
    return the list of attributes in the unique constraint
  • <init>
  • getRelation
    return the database relation for the unique constraint
  • isPrimaryKey
    return true if it is a primary key and false otherwise

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • compareTo (BigDecimal)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Option (scala)
  • Top PhpStorm 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