org.jbundle.base.db.Record.getKeyName()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(81)

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

Record.getKeyName介绍

暂无

代码示例

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

/**
 * Called when a new blank record is required for the table/query.
 * @param bDisplayOption If true, display any changes.
 */
public void doNewRecord(boolean bDisplayOption)
{
  super.doNewRecord(bDisplayOption);
  if (this.getOwner().isOpen())   // Don't do first time!
  {
    String strUserID = ((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID();
    int iUserID = -1;
    if ((strUserID != null) && (strUserID.length() > 0))
      iUserID = Integer.parseInt(strUserID);
    this.getOwner().getField(UserInfo.kID).setValue(iUserID);
    String strOldKey = this.getOwner().getKeyName();
    try   {
      this.getOwner().setKeyArea(UserInfo.kIDKey);
      if (!this.getOwner().seek("="))
      {
        this.getOwner().addNew(); // Make a new one
      }
    } catch (DBException ex)    {
      ex.printStackTrace();
    } finally   {
      this.getOwner().setKeyArea(strOldKey);
    }
  }
}
/**

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

/**
 * Called when a new blank record is required for the table/query.
 * @param bDisplayOption If true, display any changes.
 */
public void doNewRecord(boolean bDisplayOption)
{
  super.doNewRecord(bDisplayOption);
  if (this.getOwner().isOpen())   // Don't do first time!
  {
    String strUserID = ((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID();
    int iUserID = -1;
    if ((strUserID != null) && (strUserID.length() > 0))
      iUserID = Integer.parseInt(strUserID);
    this.getOwner().getField(UserInfo.ID).setValue(iUserID);
    String strOldKey = this.getOwner().getKeyName();
    try   {
      this.getOwner().setKeyArea(UserInfo.ID_KEY);
      if (!this.getOwner().seek("="))
      {
        this.getOwner().addNew(); // Make a new one
      }
    } catch (DBException ex)    {
      ex.printStackTrace();
    } finally   {
      this.getOwner().setKeyArea(strOldKey);
    }
  }
}
/**

相关文章

微信公众号

最新文章

更多

Record类方法