org.jbundle.model.Task.getDefaultLockType()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(99)

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

Task.getDefaultLockType介绍

暂无

代码示例

代码示例来源: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.base/org.jbundle.base

/**
 * Initialize this listener.
 * @param field The basefield owner of this listener (usually null and set on setOwner()).
 * @param record The secondary record that this field triggers a read to.
 * @param iQueryKeyArea The key area in the secondary record to read from.
 * @param bCloseOnFree Close the record when this behavior is removed?
 * @param bUpdateRecord Update the secondary record before reading (if it has changed)?
 * @param bAllowNull If true, a null field value will trigger a new record; if false a key not found error.
 */
public void init(BaseField field, Record record, String keyAreaName, boolean bCloseOnFree, boolean bUpdateRecord, boolean bAllowNull)
{
  super.init(field);
  m_record = record;
  this.keyAreaName = keyAreaName;
  m_keyField = null;
  m_bCloseOnFree = bCloseOnFree;
  m_bUpdateRecord = bUpdateRecord;
  m_bAllowNull = bAllowNull;
  m_bMoveBehavior = false;
  m_record.addListener(new FileRemoveBOnCloseHandler(this));  // Remove this if you close the file first
  if (m_bUpdateRecord)
  {
    if ((m_record.getOpenMode() & DBConstants.LOCK_TYPE_MASK) == 0)  // If there is no lock strategy or type, set one.
      if (m_record.getTask() != null)
        m_record.setOpenMode(m_record.getOpenMode() | m_record.getTask().getDefaultLockType(m_record.getDatabaseType()));
  }
  else
    m_record.setOpenMode(DBConstants.OPEN_READ_ONLY);       // Dont Lock the record if any changes (Also caches records).
}
/**

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

/**
 * Initialize this listener.
 * @param field The basefield owner of this listener (usually null and set on setOwner()).
 * @param record The secondary record that this field triggers a read to.
 * @param iQueryKeyArea The key area in the secondary record to read from.
 * @param bCloseOnFree Close the record when this behavior is removed?
 * @param bUpdateRecord Update the secondary record before reading (if it has changed)?
 * @param bAllowNull If true, a null field value will trigger a new record; if false a key not found error.
 */
public void init(BaseField field, Record record, int iQueryKeyArea, boolean bCloseOnFree, boolean bUpdateRecord, boolean bAllowNull)
{
  super.init(field);
  m_record = record;
  m_iQueryKeyArea = iQueryKeyArea;
  m_KeyField = null;
  m_bCloseOnFree = bCloseOnFree;
  m_bUpdateRecord = bUpdateRecord;
  m_bAllowNull = bAllowNull;
  m_bMoveBehavior = false;
  m_record.addListener(new FileRemoveBOnCloseHandler(this));  // Remove this if you close the file first
  if (m_bUpdateRecord)
  {
    if ((m_record.getOpenMode() & DBConstants.LOCK_TYPE_MASK) == 0)  // If there is no lock strategy or type, set one.
      if (m_record.getTask() != null)
        m_record.setOpenMode(m_record.getOpenMode() | m_record.getTask().getDefaultLockType(m_record.getDatabaseType()));
  }
  else
    m_record.setOpenMode(DBConstants.OPEN_READ_ONLY);       // Dont Lock the record if any changes (Also caches records).
}
/**

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

/**
 * Initialize this listener.
 * @param field The basefield owner of this listener (usually null and set on setOwner()).
 * @param record The secondary record that this field triggers a read to.
 * @param iQueryKeyArea The key area in the secondary record to read from.
 * @param bCloseOnFree Close the record when this behavior is removed?
 * @param bUpdateRecord Update the secondary record before reading (if it has changed)?
 * @param bAllowNull If true, a null field value will trigger a new record; if false a key not found error.
 */
public void init(BaseField field, Record record, int iQueryKeyArea, boolean bCloseOnFree, boolean bUpdateRecord, boolean bAllowNull)
{
  super.init(field);
  m_record = record;
  m_iQueryKeyArea = iQueryKeyArea;
  m_KeyField = null;
  m_bCloseOnFree = bCloseOnFree;
  m_bUpdateRecord = bUpdateRecord;
  m_bAllowNull = bAllowNull;
  m_bMoveBehavior = false;
  m_record.addListener(new FileRemoveBOnCloseHandler(this));  // Remove this if you close the file first
  if (m_bUpdateRecord)
  {
    if ((m_record.getOpenMode() & DBConstants.LOCK_TYPE_MASK) == 0)  // If there is no lock strategy or type, set one.
      if (m_record.getTask() != null)
        m_record.setOpenMode(m_record.getOpenMode() | m_record.getTask().getDefaultLockType(m_record.getDatabaseType()));
  }
  else
    m_record.setOpenMode(DBConstants.OPEN_READ_ONLY);       // Dont Lock the record if any changes (Also caches records).
}
/**

代码示例来源:origin: com.tourgeek.tour/com.tourgeek.tour.message.process

if ((record.getOpenMode() & (DBConstants.LOCK_TYPE_MASK | DBConstants.LOCK_STRATEGY_MASK)) == 0)
  if (this.getTask() != null)
    record.setOpenMode(record.getOpenMode() | this.getTask().getDefaultLockType(record.getDatabaseType()));  // Never
record = record.setHandle(strObjectID, DBConstants.OBJECT_ID_HANDLE);
if (record != null)

相关文章