congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ISqlJetCursor.getString
Code IndexAdd Tabnine to your IDE (free)

How to use
getString
method
in
org.tmatesoft.sqljet.core.table.ISqlJetCursor

Best Java code snippets using org.tmatesoft.sqljet.core.table.ISqlJetCursor.getString (Showing top 20 results out of 315)

origin: org.tmatesoft.sqljet/sqljet

public String getText(int columnIndex) throws SqlJetException {
  if (result instanceof String && columnIndex == 0) {
    return (String) result;
  }
  return cursor.getString(columnIndex);
}
origin: org.tmatesoft.sqljet/sqljet

public String getString(int field) throws SqlJetException {
  return cursor.getString(field);
}
origin: org.tmatesoft.sqljet/sqljet

public String getString(String fieldName) throws SqlJetException {
  return cursor.getString(fieldName);
}
origin: org.syncloud/syncloud-dao-sqljet

private State read(ISqlJetCursor cursor) {
  try {
    String fullname = cursor.getString(StateTable.COL_FULL_NAME);
    String version = null;
    if (!cursor.isNull(StateTable.COL_VERSION))
      version = cursor.getString(StateTable.COL_VERSION);
    return new State(fullname, version);
  } catch (SqlJetException e) {
    logger.error("unable to read", e);
    return null;
  }
}
origin: org.tmatesoft.svnkit/svnkit

  private SVNSkel getConflictSkel(ISqlJetCursor cursor) throws SqlJetException, SVNException {
    String conflictOldRelPath = cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.conflict_old.name());
    String conflictNewRelPath = cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.conflict_new.name());
    String conflictWorkingRelPath = cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.conflict_working.name());
    String propRejectRelPath = cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.prop_reject.name());
    byte[] treeConflictData = cursor.getBlobAsArray(SVNWCDbSchema.ACTUAL_NODE__Fields.tree_conflict_data.name());

    return SvnWcDbConflicts.convertToConflictSkel(conflictOldRelPath, conflictWorkingRelPath, conflictNewRelPath, propRejectRelPath, treeConflictData);
  }
}
origin: org.tmatesoft.svnkit/svnkit

public void beforeDelete(ISqlJetCursor cursor) throws SqlJetException {
  String checksumValue = cursor.getString(NODES__Fields.checksum.toString());
  changeRefCount(checksumValue, -1);
}
origin: org.tmatesoft.svnkit/svnkit

public void beforeUpdate(ISqlJetCursor cursor, Map<String, Object> values) throws SqlJetException {
  if (values.containsKey(NODES__Fields.checksum.toString())) {
    String newChecksum = (String) values.get(NODES__Fields.checksum.toString());
    String oldChecksum = (String) cursor.getString(NODES__Fields.checksum.toString());
    
    changeRefCount(oldChecksum,-1);
    changeRefCount(newChecksum, 1);
  }
}
origin: org.tmatesoft.svnkit/svnkit

public void beforeInsert(SqlJetConflictAction conflictAction, ISqlJetTable table, Map<String, Object> newValues) throws SqlJetException {
  if (conflictAction == SqlJetConflictAction.REPLACE) {
    Object o1 = newValues.get(NODES__Fields.wc_id.toString());
    Object o2 = newValues.get(NODES__Fields.local_relpath.toString());
    Object o3 = newValues.get(NODES__Fields.op_depth.toString());
    ISqlJetCursor cursor = table.lookup(null, new Object[] {o1, o2, o3});
    try { 
      if (!cursor.eof()) {
        changeRefCount(cursor.getString(NODES__Fields.checksum.toString()), -1);
      }
    } finally {
      cursor.close();
    }
  }
  String newChecksumValue = (String) newValues.get(NODES__Fields.checksum.toString());
  changeRefCount(newChecksumValue, 1);
}
origin: org.tmatesoft.svnkit/svnkit

protected String getColumnString(String f) throws SVNException {
  try {
    if (getCursor() == null || getCursor().eof())
      return null;
    return getCursor().getString(f);
  } catch (SqlJetException e) {
    SVNSqlJetDb.createSqlJetError(e);
    return null;
  }
}
origin: ha-jdbc/ha-jdbc

  @Override
  public Set<String> execute(SqlJetDb database) throws SqlJetException
  {
    Set<String> set = new TreeSet<>();
    ISqlJetTable table = database.getTable(STATE_TABLE);
    ISqlJetCursor cursor = table.lookup(table.getPrimaryKeyIndexName());
    try
    {
      if (!cursor.eof())
      {
        do
        {
          set.add(cursor.getString(DATABASE_COLUMN));
        }
        while (cursor.next());
      }
      return set;
    }
    finally
    {
      close(cursor);
    }
  }
};
origin: org.tmatesoft.svnkit/svnkit

final String conflictOld = actulaNode.getString(ACTUAL_NODE__Fields.conflict_old.toString());
final String conflictWorking = actulaNode.getString(ACTUAL_NODE__Fields.conflict_working.toString());
final String conflictNew = actulaNode.getString(ACTUAL_NODE__Fields.conflict_new.toString());
final String propReject = actulaNode.getString(ACTUAL_NODE__Fields.prop_reject.toString());
final byte[] treeConflictData = actulaNode.getBlobAsArray(ACTUAL_NODE__Fields.tree_conflict_data.toString());
  continue;
final String localRelpath = actulaNode.getString(ACTUAL_NODE__Fields.local_relpath.toString());
final SVNSkel conflictData = SvnWcDbConflicts.convertToConflictSkel(wcRootAbsPath, db, localRelpath, conflictOld, conflictWorking, conflictNew, propReject, treeConflictData);
origin: org.tmatesoft.svnkit/svnkit

public void beforeDelete(ISqlJetCursor cursor) throws SqlJetException {
  ISqlJetTable table = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.REVERT_LIST.toString());
  Map<String, Object> rowValues = new HashMap<String, Object>();
  rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.local_relpath.toString(), cursor.getValue(SVNWCDbSchema.ACTUAL_NODE__Fields.local_relpath.toString()));
  rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.actual.toString(), 1);
  rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.conflict_data.toString(), getConflictData(cursor));
  if (!cursor.isNull(SVNWCDbSchema.ACTUAL_NODE__Fields.properties.toString())
      || !cursor.isNull(SVNWCDbSchema.ACTUAL_NODE__Fields.tree_conflict_data.toString())) {
    rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), 1);
  } else if (!exists(db.getDb(), cursor.getInteger(SVNWCDbSchema.ACTUAL_NODE__Fields.wc_id.toString()), cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.local_relpath.toString()))) {
    rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), 1);
  } else {
    rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), null);
  }
  table.insertByFieldNamesOr(SqlJetConflictAction.REPLACE, rowValues);
}
origin: org.tmatesoft.svnkit/svnkit

public void beforeUpdate(ISqlJetCursor cursor, Map<String, Object> newValues) throws SqlJetException {
  ISqlJetTable table = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.REVERT_LIST.toString());
  Map<String, Object> rowValues = new HashMap<String, Object>();
  rowValues.put(REVERT_LIST__Fields.local_relpath.toString(), cursor.getValue(ACTUAL_NODE__Fields.local_relpath.toString()));
  rowValues.put(REVERT_LIST__Fields.actual.toString(), 1);
  rowValues.put(REVERT_LIST__Fields.conflict_data.toString(), cursor.getBlobAsArray(ACTUAL_NODE__Fields.conflict_data.toString()));
  if (!cursor.isNull(ACTUAL_NODE__Fields.properties.toString())
      || !cursor.isNull(ACTUAL_NODE__Fields.tree_conflict_data.toString())) {
    rowValues.put(REVERT_LIST__Fields.notify.toString(), 1);
  } else if (!exists(db.getDb().getTemporaryDatabase(), cursor.getInteger(ACTUAL_NODE__Fields.wc_id.toString()), cursor.getString(ACTUAL_NODE__Fields.local_relpath.toString()))) {
    rowValues.put(REVERT_LIST__Fields.notify.toString(), 1);
  } else {
    rowValues.put(REVERT_LIST__Fields.notify.toString(), null);
  }
  table.insertByFieldNamesOr(SqlJetConflictAction.REPLACE, rowValues);
}
origin: org.tmatesoft.svnkit/svnkit

public void beforeUpdate(ISqlJetCursor cursor, Map<String, Object> newValues) throws SqlJetException {
  ISqlJetTable table = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.REVERT_LIST.toString());
  Map<String, Object> rowValues = new HashMap<String, Object>();
  rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.local_relpath.toString(), cursor.getValue(SVNWCDbSchema.ACTUAL_NODE__Fields.local_relpath.toString()));
  rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.actual.toString(), 1);
  rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.conflict_data.toString(), getConflictData(cursor));
  if (!cursor.isNull(SVNWCDbSchema.ACTUAL_NODE__Fields.properties.toString())
      || !cursor.isNull(SVNWCDbSchema.ACTUAL_NODE__Fields.tree_conflict_data.toString())) {
    rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), 1);
  } else if (!exists(db.getDb().getTemporaryDatabase(), cursor.getInteger(SVNWCDbSchema.ACTUAL_NODE__Fields.wc_id.toString()), cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.local_relpath.toString()))) {
    rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), 1);
  } else {
    rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), null);
  }
  table.insertByFieldNamesOr(SqlJetConflictAction.REPLACE, rowValues);
}
origin: org.tmatesoft.svnkit/svnkit

public void beforeDelete(ISqlJetCursor cursor) throws SqlJetException {
  ISqlJetTable table = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.REVERT_LIST.toString());
  
  Map<String, Object> rowValues = new HashMap<String, Object>();
  rowValues.put(REVERT_LIST__Fields.local_relpath.toString(), cursor.getValue(ACTUAL_NODE__Fields.local_relpath.toString()));
  rowValues.put(REVERT_LIST__Fields.actual.toString(), 1);
  rowValues.put(REVERT_LIST__Fields.conflict_data.toString(), cursor.getBlobAsArray(ACTUAL_NODE__Fields.conflict_data.toString()));
  if (!cursor.isNull(ACTUAL_NODE__Fields.properties.toString()) 
      || !cursor.isNull(ACTUAL_NODE__Fields.tree_conflict_data.toString())) {
    rowValues.put(REVERT_LIST__Fields.notify.toString(), 1);
  } else if (!exists(db.getDb(), cursor.getInteger(ACTUAL_NODE__Fields.wc_id.toString()), cursor.getString(ACTUAL_NODE__Fields.local_relpath.toString()))) {
    rowValues.put(REVERT_LIST__Fields.notify.toString(), 1);
  } else {
    rowValues.put(REVERT_LIST__Fields.notify.toString(), null);
  }
  table.insertByFieldNamesOr(SqlJetConflictAction.REPLACE, rowValues);
}
origin: org.tmatesoft.svnkit/svnkit

private String getNodeReposRelpath(long wcId, String path) throws SVNException {
  ISqlJetCursor cursor = null;
  try {
    cursor = getTable().lookup(null, wcId, path);
    if (!cursor.eof()) {
      return cursor.getString(NODES__Fields.repos_path.toString());
    }
  } catch (SqlJetException e) {
    SVNSqlJetDb.createSqlJetError(e);
  } finally {
    if (cursor != null) {
      try {
        cursor.close();
      } catch (SqlJetException e) {
      }
    }
  }
  return null;
}

origin: org.tmatesoft.svnkit/svnkit

private static Map<SvnChecksum, Integer> calculateCorrectChecksumRefcounts(SVNWCDbRoot root) throws SVNException {
  Map<SvnChecksum, Integer> checksumToRefCount = new HashMap<SvnChecksum, Integer>();
  final SqlJetDb db = root.getSDb().getDb();
  try {
    final ISqlJetTable nodesTable = db.getTable(SVNWCDbSchema.NODES.name());
    db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
    final ISqlJetCursor cursor = nodesTable.open();
    for (; !cursor.eof(); cursor.next()) {
      String sha1ChecksumString = cursor.getString(SVNWCDbSchema.NODES__Fields.checksum.name());
      if (sha1ChecksumString == null) {
        continue;
      }
      SvnChecksum sha1Checksum = SvnChecksum.fromString(sha1ChecksumString);
      Integer refCount = checksumToRefCount.get(sha1Checksum);
      int incrementedRefCount = refCount == null ? 1 : refCount + 1;
      checksumToRefCount.put(sha1Checksum, incrementedRefCount);
    }
    cursor.close();
  } catch (SqlJetException e) {
    SVNErrorMessage errorMessage = SVNErrorMessage.create(SVNErrorCode.WC_DB_ERROR, e);
    SVNErrorManager.error(errorMessage, e, SVNLogType.WC);
  } finally {
    try {
      db.commit();
    } catch (SqlJetException ignore) {
    }
  }
  return checksumToRefCount;
}
origin: org.tmatesoft.svnkit/svnkit

private static Map<SvnChecksum, Integer> loadChecksumsRefcountsFromTable(SVNWCDbRoot root) throws SVNException {
  Map<SvnChecksum, Integer> checksumToRefCount = new HashMap<SvnChecksum, Integer>();
  final SqlJetDb db = root.getSDb().getDb();
  try {
    final ISqlJetTable pristineTable = db.getTable(SVNWCDbSchema.PRISTINE.name());
    db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
    final ISqlJetCursor cursor = pristineTable.open();
    for (; !cursor.eof(); cursor.next()) {
      String sha1ChecksumString = cursor.getString(PRISTINE__Fields.checksum.name());
      if (sha1ChecksumString == null) {
        continue;
      }
      SvnChecksum sha1Checksum = SvnChecksum.fromString(sha1ChecksumString);
      long refcount = cursor.getInteger(PRISTINE__Fields.refcount.name());
      checksumToRefCount.put(sha1Checksum, (int)refcount);
    }
    cursor.close();
  } catch (SqlJetException e) {
    SVNErrorMessage errorMessage = SVNErrorMessage.create(SVNErrorCode.WC_DB_ERROR, e);
    SVNErrorManager.error(errorMessage, e, SVNLogType.WC);
  } finally {
    try {
      db.commit();
    } catch (SqlJetException ignore) {
    }
  }
  return checksumToRefCount;
}
origin: org.tmatesoft.svnkit/svnkit

myHash = cursor.getString(HASH_FIELD);
origin: com.svnkit/com.springsource.org.tigris.subversion.javahl

myHash = cursor.getString(HASH_FIELD);
org.tmatesoft.sqljet.core.tableISqlJetCursorgetString

Javadoc

Returns specified field's value as String.

Popular methods of ISqlJetCursor

  • close
    Closes the cursor.
  • eof
    Tests whether this cursor is positioned behind the last record.
  • isNull
    Tests field value for null.
  • getInteger
    Returns specified field's value as integer.
  • delete
    Deletes the current record.
  • getFieldsCount
    Returns number of fields in the current record.
  • next
    Goes to the next record.
  • getBlobAsArray
    Returns specified field's value as BLOB.
  • updateByFieldNames
    Updates the current record.
  • getBoolean
    Returns specified field's value as boolean.
  • getFieldType
    Returns field type.
  • getRowCount
    Returns number of rows accessible with this cursor.
  • getFieldType,
  • getRowCount,
  • getRowValues,
  • getValue,
  • setLimit,
  • update,
  • first,
  • getBlobAsStream,
  • getFloat

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • onRequestPermissionsResult (Fragment)
  • String (java.lang)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now