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

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

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

FieldList.getTask介绍

[英]Get the task for this field list. This is a convience method which calls this.getRecordOwner().getTask() in the thick model. Note: This is always the shared instance of BaseApplet for the thin model.
[中]获取此字段列表的任务。这是一个方便的方法,可以调用它。getRecordOwner()。厚模型中的getTask()。注意:对于精简模型,这始终是BaseApplet的共享实例。

代码示例

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

/**
 * init.
 */
public void init(Object recordOwner)
{
  m_recordOwner = recordOwner;
  if (m_dbOpenMode == Constants.OPEN_NORMAL)  // In case it was changed in contructor() and init was called after
    m_dbOpenMode = Constants.OPEN_NORMAL;
  if (this.getTask() != null)
    m_dbOpenMode = m_dbOpenMode | this.getTask().getDefaultLockType(this.getDatabaseType());
  m_vFieldInfo = new Vector<Field>();
  m_vKeyAreaList = new Vector<Key>();
  this.setupFields();         // Add this FieldList's fields
  this.setupKeys();       // Set up the key areas
  m_dbEditMode = Constants.EDIT_NONE;
  m_bIsAutoSequence = true;
}
/**

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

/**
 * Look up this string in the resource table.
 * This is a convience method - calls getString in the task.
 * @param string The string key.
 * @return The local string (or the key if the string doesn't exist).
 */
public String getString(String string)
{
  if (this.getRecord() != null)
    if (this.getRecord().getTask() != null)
      string = this.getRecord().getTask().getString(string);
  return string;
}
/**

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

/**
 * Convert and move string to this field.
 * Override this method to convert the String to the actual Physical Data Type.
 * @param bState the state to set the data to.
 * @param bDisplayOption Display the data on the screen if true.
 * @param iMoveMode INIT, SCREEN, or READ move mode.
 * @return The error code (or NORMAL_RETURN).
 */
public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value
{
  try {
    Object objData = Converter.convertObjectToDatatype(strString, this.getDataClass(), null, m_ibScale);
    if (objData == null)
      if (this.getDataClass() != Boolean.class)
        if (!(Number.class.isAssignableFrom(this.getDataClass())))
          if (this.getDataClass() != java.util.Date.class)
            objData = Constants.BLANK;    // To set a null internally, you must call setData directly
    return this.setData(objData, bDisplayOption, iMoveMode);
  } catch (Exception ex)  {
    String strError = ex.getMessage();
    if (strError == null)
      strError = ex.getClass().getName();
    if (this.getRecord() != null)
      if (this.getRecord().getTask() != null)
        return this.getRecord().getTask().setLastError(strError);
    return Constants.ERROR_RETURN;
  }
}
/**

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

/**
 * Get the task for this field list.
 * This is a convience method which calls this.getRecordOwner().getTask() in the thick model.
 * @return The task which contains this fieldList's recordowner Guaranteed to to non-null.
 */
public Task getTask()
{
  if (this.getRecordOwner() != null)
    return this.getRecordOwner().getTask();
  Task task = super.getTask();   // Null
  if (task == null)
  {   // Look a little harder
    task = this.getTable().getDatabase().getDatabaseOwner().getEnvironment().getDefaultApplication().getMainTask();
  }
  return task;
}
/**

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

/**
 * Get the task for this field list.
 * This is a convience method which calls this.getRecordOwner().getTask() in the thick model.
 * @return The task which contains this fieldList's recordowner Guaranteed to to non-null.
 */
public Task getTask()
{
  if (this.getRecordOwner() != null)
    return this.getRecordOwner().getTask();
  Task task = super.getTask();   // Null
  if (task == null)
  {   // Look a little harder
    task = this.getTable().getDatabase().getDatabaseOwner().getEnvironment().getDefaultApplication().getMainTask();
  }
  return task;
}
/**

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

/**
 * Get the task for this field list.
 * This is a convience method which calls this.getRecordOwner().getTask() in the thick model.
 * @return The task which contains this fieldList's recordowner Guaranteed to to non-null.
 */
public Task getTask()
{
  if (this.getRecordOwner() != null)
    return this.getRecordOwner().getTask();
  Task task = super.getTask();   // Null
  if (task == null)
  {   // Look a little harder
    if (this.getTable() != null)
      if (this.getTable().getDatabase() != null)
        if (this.getTable().getDatabase().getDatabaseOwner() != null)
          if (((Environment)this.getTable().getDatabase().getDatabaseOwner().getEnvironment()).getDefaultApplication() != null)
            task = ((BaseApplication)((Environment)this.getTable().getDatabase().getDatabaseOwner().getEnvironment()).getDefaultApplication()).getMainTask();
  }
  return task;
}
/**

相关文章