Tabnine Logo
DataBaseConnector.getPrimaryKeyIndices
Code IndexAdd Tabnine to your IDE (free)

How to use
getPrimaryKeyIndices
method
in
de.julielab.xmlData.dataBase.DataBaseConnector

Best Java code snippets using de.julielab.xmlData.dataBase.DataBaseConnector.getPrimaryKeyIndices (Showing top 2 results out of 315)

origin: de.julielab/jcore-xmi-db-reader

private String getPkStringFromData(byte[][] data) {
  List<Integer> pkIndices = dbc.getPrimaryKeyIndices();
  StringBuilder sb = new StringBuilder();
  for (int i = 0; i < pkIndices.size(); ++i) {
    Integer index = pkIndices.get(i);
    byte[] pkElementValue = data[index];
    String elementString = new String(pkElementValue);
    sb.append(elementString);
    if (i < pkIndices.size() - 1)
      sb.append("-");
  }
  return sb.toString();
}
origin: de.julielab/jcore-db-reader

public static String setDBProcessingMetaData(DataBaseConnector dbc, boolean readDataTable, String tableName, byte[][] data, JCas cas) {
  String pkString = null;
  // remove previously added dbMetaData
  JCasUtil.select(cas, DBProcessingMetaData.class).forEach(x -> x.removeFromIndexes());
  DBProcessingMetaData dbMetaData = new DBProcessingMetaData(cas);
  List<Integer> pkIndices = dbc.getPrimaryKeyIndices();
  StringArray pkArray = new StringArray(cas, pkIndices.size());
  for (int i = 0; i < pkIndices.size(); ++i) {
    Integer index = pkIndices.get(i);
    String pkElementValue = new String(data[index], Charset.forName("UTF-8"));
    pkArray.set(i, pkElementValue);
  }
  if (log.isDebugEnabled())
    log.debug("Setting primary key to {}", Arrays.toString(pkArray.toArray()));
  dbMetaData.setPrimaryKey(pkArray);
  if (!readDataTable)
    dbMetaData.setSubsetTable(
        tableName.contains(".") ? tableName : dbc.getActivePGSchema() + "." + tableName);
  dbMetaData.addToIndexes();
  return pkString;
}
de.julielab.xmlData.dataBaseDataBaseConnectorgetPrimaryKeyIndices

Popular methods of DataBaseConnector

  • <init>
  • checkTableDefinition
  • getActiveDataPGSchema
  • getFieldConfiguration
  • obtainOrReserveConnection
  • tableExists
  • addXmiAnnotationFieldConfiguration
  • addXmiDocumentFieldConfiguration
  • addXmiTextFieldConfiguration
  • close
  • getActiveTableFieldConfiguration
  • getNextOrThisDataTable
  • getActiveTableFieldConfiguration,
  • getNextOrThisDataTable,
  • isDataTable,
  • releaseConnections,
  • reserveConnection,
  • checkTableSchemaCompatibility,
  • countRowsOfDataTable,
  • countUnprocessed,
  • createSchema

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • BoxLayout (javax.swing)
  • Top plugins for WebStorm
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