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

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

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

Record.getIDFromCode介绍

[英]Get the referenced record's ID given the code. This method converts the code to the record ID by reading the secondary key of the referenced record.
[中]根据代码获取引用记录的ID。此方法通过读取被引用记录的次键,将代码转换为记录ID。

代码示例

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

/**
 * Get the referenced record's ID given the code.
 * This method converts the code to the record ID by reading the secondary key of the referenced record.
 * @param strCode The code to convert (ie., "EMAIL_TYPE")
 * @return int The ID of the referenced record (or 0 if not found).
 */
public int getIDFromCode(String strCode)
{
  int iID = 0;
  try   {
    iID = Integer.parseInt(strCode);    // Special case - if an integer, just convert it.
  } catch (NumberFormatException ex)  {
    iID = 0;
  }
  if (iID == 0)
  {
    Record record = this.getReferenceRecord();
    if (record != null)
      iID = record.getIDFromCode(strCode);
  }
  return iID;
}
public static Object NONE_BUTTON = null;

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

/**
 * Get the referenced record's ID given the code.
 * This method converts the code to the record ID by reading the secondary key of the referenced record.
 * @param strCode The code to convert (ie., "EMAIL_TYPE")
 * @return int The ID of the referenced record (or 0 if not found).
 */
public int getIDFromCode(String strCode)
{
  int iID = 0;
  try   {
    iID = Integer.parseInt(strCode);    // Special case - if an integer, just convert it.
  } catch (NumberFormatException ex)  {
    iID = 0;
  }
  if (iID == 0)
  {
    Record record = this.getReferenceRecord();
    if (record != null)
      iID = record.getIDFromCode(strCode);
  }
  return iID;
}
public static ImageIcon NONE_BUTTON = null;

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

/**
 * Get the referenced record's ID given the code.
 * This method converts the code to the record ID by reading the secondary key of the referenced record.
 * @param strCode The code to convert (ie., "EMAIL_TYPE")
 * @return int The ID of the referenced record (or 0 if not found).
 */
public int getIDFromCode(String strCode)
{
  int iID = 0;
  try   {
    iID = Integer.parseInt(strCode);    // Special case - if an integer, just convert it.
  } catch (NumberFormatException ex)  {
    iID = 0;
  }
  if (iID == 0)
  {
    Record record = this.getReferenceRecord();
    if (record != null)
      iID = record.getIDFromCode(strCode);
  }
  return iID;
}
public static ImageIcon NONE_BUTTON = null;

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

field.setValue(field.getReferenceRecord(this).getIDFromCode(MessageInfoType.REQUEST));
field = (ReferenceField)this.getScreenRecord().getField(MessageLogScreenRecord.kMessageTypeID);
field.setValue(field.getReferenceRecord(this).getIDFromCode(MessageType.MESSAGE_OUT));
field = (ReferenceField)this.getScreenRecord().getField(MessageLogScreenRecord.kMessageStatusID);
field.setValue(field.getReferenceRecord(this).getIDFromCode(MessageStatus.SENT));

相关文章

微信公众号

最新文章

更多

Record类方法