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

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

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

Record.getOpenMode介绍

暂无

代码示例

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

/**
 * Am I checking for modification locks?
 * @return True if I am.
 */
public boolean isModLockMode()
{
  Record record = this.getOwner();
  if (record != null)
    if ((record.getOpenMode() & DBConstants.OPEN_LAST_MOD_LOCK_TYPE) == DBConstants.OPEN_LAST_MOD_LOCK_TYPE)
      return true;
  return false;
}
/**

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

/**
 * Am I checking for modification locks?
 * @return True if I am.
 */
public boolean isModLockMode()
{
  Record record = this.getOwner();
  if (record != null)
    if ((record.getOpenMode() & DBConstants.OPEN_LAST_MOD_LOCK_TYPE) == DBConstants.OPEN_LAST_MOD_LOCK_TYPE)
      return true;
  return false;
}
/**

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

/**
 * Am I checking for modification locks?
 * @return True if I am.
 */
public boolean isModLockMode()
{
  Record record = this.getOwner();
  if (record != null)
    if ((record.getOpenMode() & DBConstants.OPEN_LAST_MOD_LOCK_TYPE) == DBConstants.OPEN_LAST_MOD_LOCK_TYPE)
      return true;
  return false;
}
/**

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

/**
   * SyncRecords - Synchronize the records to the same row.
   * @return an error code.
   */
  public int syncRecords()
  { // Read a valid record
    if ((this.getOwner().getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) == DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE)
      return DBConstants.NORMAL_RETURN;   // Don't need to resync if I'm doing a write and refresh.
    m_recordToSync.close();
    return DBConstants.NORMAL_RETURN;
  }
}

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

/**
   * SyncRecords - Synchronize the records to the same row.
   * @return an error code.
   */
  public int syncRecords()
  { // Read a valid record
    if ((this.getOwner().getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) == DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE)
      return DBConstants.NORMAL_RETURN;   // Don't need to resync if I'm doing a write and refresh.
    m_recordToSync.close();
    return DBConstants.NORMAL_RETURN;
  }
}

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

/**
   * SyncRecords - Synchronize the records to the same row.
   * @return an error code.
   */
  public int syncRecords()
  { // Read a valid record
    if ((this.getOwner().getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) == DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE)
      return DBConstants.NORMAL_RETURN;   // Don't need to resync if I'm doing a write and refresh.
    m_recordToSync.close();
    return DBConstants.NORMAL_RETURN;
  }
}

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

public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
  if (iMoveMode != DBConstants.SCREEN_MOVE)	// This is necessary if an override change the repondsTo.
    // Also, if just refreshing the record, don't change this if set
    if ((m_bChangeDataOnRefresh) || ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) != DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE))
      if ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_UPDATE_LAST_READ) != DBConstants.OPEN_DONT_UPDATE_LAST_READ)    // This is a special case where I want a subsequent write to get an error if changed 
        this.setOriginalData(this.getOwner().getData());
  return super.fieldChanged(bDisplayOption, iMoveMode);
}
/**

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

/**
 * 
 * @param bAddNewHeaderOnAdd
 */
public void setAddNewHeaderOnAdd(boolean bAddNewHeaderOnAdd)
{
  m_bAddNewHeaderOnAdd = bAddNewHeaderOnAdd;
  if (m_bAddNewHeaderOnAdd)
    if (this.getMainRecord() != null)
      this.getMainRecord().setOpenMode((this.getMainRecord().getOpenMode() | DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY));
}
/**

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

public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
  if (iMoveMode != DBConstants.SCREEN_MOVE)	// This is necessary if an override change the repondsTo.
    // Also, if just refreshing the record, don't change this if set
    if ((m_bChangeDataOnRefresh) || ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) != DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE))
      if ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_UPDATE_LAST_READ) != DBConstants.OPEN_DONT_UPDATE_LAST_READ)    // This is a special case where I want a subsequent write to get an error if changed 
        this.setOriginalData(this.getOwner().getData());
  return super.fieldChanged(bDisplayOption, iMoveMode);
}
/**

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

public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
  if (iMoveMode != DBConstants.SCREEN_MOVE)	// This is necessary if an override change the repondsTo.
    // Also, if just refreshing the record, don't change this if set
    if ((m_bChangeDataOnRefresh) || ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) != DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE))
      if ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_UPDATE_LAST_READ) != DBConstants.OPEN_DONT_UPDATE_LAST_READ)    // This is a special case where I want a subsequent write to get an error if changed 
        this.setOriginalData(this.getOwner().getData());
  return super.fieldChanged(bDisplayOption, iMoveMode);
}
/**

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

/**
 * Add this record (Always called from the record class).
 * @exception DBException File exception.
 */
public void add(Rec fieldList) throws DBException
{
  Record record = (Record)fieldList;
  if (((this.getRecord().getOpenMode() & DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY) != DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY)
    || (record.isRefreshedRecord()))
      this.restoreMainRecord(record, true);
  super.add(record);
}
/**

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

/**
 * Add this record (Always called from the record class).
 * @exception DBException File exception.
 */
public void add(Rec fieldList) throws DBException
{
  Record record = (Record)fieldList;
  if (((this.getRecord().getOpenMode() & DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY) != DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY)
    || (record.isRefreshedRecord()))
      this.restoreMainRecord(record, true);
  super.add(record);
}
/**

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

/**
 * Add this record (Always called from the record class).
 * @exception DBException File exception.
 */
public void add(Rec fieldList) throws DBException
{
  Record record = (Record)fieldList;
  if (((this.getRecord().getOpenMode() & DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY) != DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY)
    || (record.isRefreshedRecord()))
      this.restoreMainRecord(record, true);
  super.add(record);
}
/**

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

/**
 * Code to display a Menu.
 * @param strMenu The menu to set up.
 */
public void preSetupGrid(String strMenu)
{
  Record record = this.getMainRecord();
  if (record != null)
    record.setOpenMode(record.getOpenMode() | DBConstants.OPEN_CACHE_RECORDS);    // Cache recently used records.
  if (record != null) if (record.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
    record.setKeyArea(record.getDefaultScreenKeyArea());
}
/**

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

/**
 * Code to display a Menu.
 * @param strMenu The menu to set up.
 */
public void preSetupGrid(String strMenu)
{
  Record record = this.getMainRecord();
  if (record != null)
    record.setOpenMode(record.getOpenMode() | DBConstants.OPEN_CACHE_RECORDS);    // Cache recently used records.
  if (record != null) if (record.getKeyArea().getKeyName().equals(DBConstants.PRIMARY_KEY))
    record.setKeyArea(record.getDefaultScreenKeyArea());
}
/**

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

/**
 * Set the field or file that owns this listener.
 * @param owner My owner.
 */
public void setOwner(ListenerOwner owner)
{
  super.setOwner(owner);
  if (this.getOwner() != null)
    this.getOwner().setOpenMode(this.getOwner().getOpenMode() | DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY);    // Make sure keys are updated before sync
}
/**

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

/**
 * Set the field or file that owns this listener.
 * @param owner My owner.
 */
public void setOwner(ListenerOwner owner)
{
  super.setOwner(owner);
  if (this.getOwner() != null)
    this.getOwner().setOpenMode(this.getOwner().getOpenMode() | DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY);    // Make sure keys are updated before sync
}
/**

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

/**
 * Set the field or file that owns this listener.
 * @param owner My owner.
 */
public void setOwner(ListenerOwner owner)
{
  super.setOwner(owner);
  if (this.getOwner() != null)
    this.getOwner().setOpenMode(this.getOwner().getOpenMode() | DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY);    // Make sure keys are updated before sync
}
/**

代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.booking.entry

/**
 * Override this to open the other files in the query.
 */
public void openOtherRecords()
{
  super.openOtherRecords();
  new BookingControl(this);
  new ProfileControl(this);
  
  Record recBooking = this.getMainRecord();
  Record recTour = ((ReferenceField)recBooking.getField(Booking.TOUR_ID)).getReferenceRecord(this);
  recTour.setOpenMode((recTour.getOpenMode() & ~DBConstants.OPEN_READ_ONLY) | DBConstants.OPEN_LOCK_ON_CHANGE_STRATEGY);
  Record recTourHeader = ((ReferenceField)recTour.getField(Tour.TOUR_HEADER_ID)).getReferenceRecord(this);
}
/**

代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.acctrec.screen

/**
 * Add all the screen listeners.
 */
public void addListeners()
{
  super.addListeners();
  this.getMainRecord().setOpenMode(this.getMainRecord().getOpenMode() | DBConstants.OPEN_READ_ONLY);
  this.getMainRecord().setKeyArea(Mco.MCO_NO_KEY);
  this.setEnabled(false);
  this.getMainRecord().getField(Mco.MCO_NO).setEnabled(true);
  this.getMainRecord().getField(Mco.MCO_NO).addListener(new MainFieldHandler(Mco.MCO_NO_KEY));
}
/**

相关文章

微信公众号

最新文章

更多

Record类方法