org.jbundle.thin.base.db.FieldList.getStartingID()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(161)

本文整理了Java中org.jbundle.thin.base.db.FieldList.getStartingID()方法的一些代码示例,展示了FieldList.getStartingID()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FieldList.getStartingID()方法的具体详情如下:
包路径:org.jbundle.thin.base.db.FieldList
类名称:FieldList
方法名:getStartingID

FieldList.getStartingID介绍

[英]Get the starting ID for this table. Override this for different behavior.
[中]获取此表的起始ID。为不同的行为重写此选项。

代码示例

代码示例来源:origin: org.jbundle.base/org.jbundle.base

/**
 * Get the starting ID for this table.
 * Override this for different behavior.
 * @return The starting id
 */
public int getStartingID()
{
  if (this.getTable() != null)
    if (this.getTable().getDatabase() != null)
      return this.getTable().getDatabase().getStartingID();
  return super.getStartingID();   // Never (default)
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
 * Get the starting ID for this table.
 * Override this for different behavior.
 * @return The starting id
 */
public int getStartingID()
{
  if (this.getTable() != null)
    if (this.getTable().getDatabase() != null)
      return this.getTable().getDatabase().getStartingID();
  return super.getStartingID();   // Never (default)
}
/**

代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db

/**
 * Get the starting ID for this table.
 * Override this for different behavior.
 * @return The starting id
 */
public int getStartingID()
{
  if (this.getTable() != null)
    if (this.getTable().getDatabase() != null)
      return this.getTable().getDatabase().getStartingID();
  return super.getStartingID();   // Never (default)
}
/**

代码示例来源:origin: org.jbundle.thin.base.db/org.jbundle.thin.base.db

/**
 * Set the counter to max + 1 again.
 * Note: The position is undefined after this call (and the table is closed).
 * @param table The table to fix the counter on.
 */
public synchronized void fixCounter(FieldTable table)
{
  PKeyArea vKeyArea = this.getPKeyArea(Constants.MAIN_KEY_AREA);
  KeyAreaInfo keyArea = table.getRecord().getKeyArea(Constants.MAIN_KEY_AREA);
  try   {
    BaseBuffer buffer = vKeyArea.doMove(Constants.LAST_RECORD, table, keyArea);
    if (buffer == null)
      m_iCounter = table.getRecord().getStartingID();
    else
    {
      buffer.bufferToFields(table.getRecord(), Constants.DONT_DISPLAY, Constants.READ_MOVE);
      Object data = table.getRecord().getCounterField().getData();
      if (data instanceof Integer)
        m_iCounter = Math.max(m_iCounter, ((Integer)data).intValue() + 1);
    }
    // Now set the pointer back at the first record
    buffer = vKeyArea.doMove(Constants.FIRST_RECORD, table, keyArea);
    if (buffer != null)     // If not at EOF (empty) back up one record
      vKeyArea.doMove(Constants.PREVIOUS_RECORD, table, keyArea);
  } catch (DBException ex)    {
    // Ignore error
  }
}
/**

相关文章