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

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

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

FieldList.getCounterField介绍

[英]Get the autosequence field if it exists.
[中]获取autosequence字段(如果存在)。

代码示例

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

/**
 * Get a unique object that can be used to reposition to this record.
 * @exception FILE_NOT_OPEN.
 * @exception INVALID_RECORD - There is no current record.
 */
public Object getHandle(int iHandleType) throws DBException   
{
  return this.getRecord().getCounterField().getData();
}
/**

代码示例来源:origin: com.tourgeek.thin.app/com.tourgeek.thin.app.booking

if (strObjectID.equalsIgnoreCase(record.getCounterField().getString()))

代码示例来源: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
  }
}
/**

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

/**
 * Reposition to this record using this bookmark.
 * @param bookmark The handle to use to position the record.
 * @param iHandleType The type of handle (DATA_SOURCE/OBJECT_ID,OBJECT_SOURCE,BOOKMARK).
 * @return  - true - record found/false - record not found
 * @exception FILE_NOT_OPEN.
 * @exception DBException File exception.
 */
public boolean doSetHandle(Object bookmark, int iHandleType) throws DBException
{
  String strCurrentOrder = this.getRecord().getKeyName();
  this.getRecord().setKeyArea(Constants.PRIMARY_KEY);
  this.getRecord().getCounterField().setData(bookmark);
  boolean bSuccess = this.seek(Constants.EQUALS);
  this.getRecord().setKeyArea(strCurrentOrder);
  return bSuccess;
}
/**

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

/**
 * Log this transaction.
 * @param strTrxType The transaction type.
 */
public void logTrx(FieldList record, String strTrxType)
{
  BaseBuffer buffer = this.getBuffer();
  buffer.clearBuffer();
  buffer.addHeader(strTrxType);
  buffer.addHeader(record.getTableNames(false));
  buffer.addHeader(record.getCounterField().toString());
  if (ProxyConstants.REMOVE != strTrxType)
    buffer.fieldsToBuffer(record);
  Object objLogData = buffer.getPhysicalData();
  this.logTrx(objLogData);
}
/**

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

/**
 * Log this transaction.
 * @param strTrxType The transaction type.
 */
public void logTrx(FieldList record, String strTrxType)
{
  BaseBuffer buffer = this.getBuffer();
  buffer.clearBuffer();
  buffer.addHeader(strTrxType);
  buffer.addHeader(record.getTableNames(false));
  buffer.addHeader(record.getCounterField().toString());
  if (ProxyConstants.REMOVE != strTrxType)
    buffer.fieldsToBuffer(record);
  Object objLogData = buffer.getPhysicalData();
  this.logTrx(objLogData);
}
/**

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

/**
 * Log this transaction.
 * @param strTrxType The transaction type.
 */
public void logTrx(FieldList record, String strTrxType)
{
  BaseBuffer buffer = this.getBuffer();
  buffer.clearBuffer();
  buffer.addHeader(strTrxType);
  buffer.addHeader(record.getTableNames(false));
  buffer.addHeader(record.getCounterField().toString());
  if (ProxyConstants.REMOVE != strTrxType)
    buffer.fieldsToBuffer(record);
  Object objLogData = buffer.getPhysicalData();
  this.logTrx(objLogData);
}
/**

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

|| (this.getEditMode() == Constants.EDIT_IN_PROGRESS))
Object bookmark = this.getCounterField().getData();
if (bookmark != null)
    this.getCounterField().setData(bookmark);
    boolean bSuccess = this.getTable().seek(null);
    this.setKeyName(strOldKey);
      this.getCounterField().setData(bookmark);
      this.getTable().seek(null);
      this.setKeyName(strOldKey);

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

if (iKeyArea == Constants.MAIN_KEY_AREA)
  FieldInfo field = table.getRecord().getCounterField();
  if (field != null)
    if (!field.isNull())

相关文章