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

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

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

Record.setupRecordListener介绍

[英]Set up a listener to notify when an external change is made to the current record.
[中]设置侦听器,以便在对当前记录进行外部更改时发出通知。

代码示例

代码示例来源:origin: com.tourgeek.tour/com.tourgeek.tour.booking.remote

/**
 * Add behaviors to this session.
 */
public void addListeners()
{
  super.addListeners();
  
  this.getRecord(BookingDetail.BOOKING_DETAIL_FILE).setupRecordListener(this, true, true);
}
/**

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

/**
 *  Add behaviors to this session.
 */
public void addListeners()
{
  super.addListeners();
  if (this.getMainRecord() != null)
    this.getMainRecord().setupRecordListener(this, true, false);    // Don't allow echos
}
/**

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

/**
 * Set up a listener to notify when an external change is made to the current record.
 * @param listener The listener to set to the new filter. If null, use the record's recordowner.
 * @param bTrackMultipleRecord Use a GridRecordMessageFilter to watch for multiple records.
 * @param bAllowEchos Allow this record to be notified of changes (usually for remotes hooked to grid tables).
 * @param bReceiveAllAdds If true, receive all add notifications, otherwise just receive the adds on secondary reads.
 * @return The new filter.
 */
public BaseMessageFilter setupRecordListener(JMessageListener listener, boolean bTrackMultipleRecords, boolean bAllowEchos)
{
  boolean bReceiveAllAdds = false;
  if (((this.getDatabaseType() & DBConstants.TABLE_MASK) == DBConstants.TABLE)
    || ((this.getDatabaseType() & DBConstants.TABLE_MASK) == DBConstants.LOCAL)
    || ((this.getDatabaseType() & DBConstants.TABLE_MASK) == DBConstants.REMOTE_MEMORY))
      bReceiveAllAdds = true;    // The volume of changes is negligable and there is rarely a secondary, so listen for all changes
  return this.setupRecordListener(listener, bTrackMultipleRecords, bAllowEchos, bReceiveAllAdds);
}
/**

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

/**
 * Set up a listener to notify when an external change is made to the current record.
 * @param listener The listener to set to the new filter. If null, use the record's recordowner.
 * @param bTrackMultipleRecord Use a GridRecordMessageFilter to watch for multiple records.
 * @param bAllowEchos Allow this record to be notified of changes (usually for remotes hooked to grid tables).
 * @param bReceiveAllAdds If true, receive all add notifications, otherwise just receive the adds on secondary reads.
 * @return The new filter.
 */
public BaseMessageFilter setupRecordListener(JMessageListener listener, boolean bTrackMultipleRecords, boolean bAllowEchos)
{
  boolean bReceiveAllAdds = false;
  if (((this.getDatabaseType() & DBConstants.TABLE_MASK) == DBConstants.TABLE)
    || ((this.getDatabaseType() & DBConstants.TABLE_MASK) == DBConstants.LOCAL)
    || ((this.getDatabaseType() & DBConstants.TABLE_MASK) == DBConstants.REMOTE_MEMORY))
      bReceiveAllAdds = true;    // The volume of changes is negligable and there is rarely a secondary, so listen for all changes
  return this.setupRecordListener(listener, bTrackMultipleRecords, bAllowEchos, bReceiveAllAdds);
}
/**

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

/**
 * Set up a listener to notify when an external change is made to the current record.
 * @param listener The listener to set to the new filter. If null, use the record's recordowner.
 * @param bTrackMultipleRecord Use a GridRecordMessageFilter to watch for multiple records.
 * @param bAllowEchos Allow this record to be notified of changes (usually for remotes hooked to grid tables).
 * @param bReceiveAllAdds If true, receive all add notifications, otherwise just receive the adds on secondary reads.
 * @return The new filter.
 */
public BaseMessageFilter setupRecordListener(JMessageListener listener, boolean bTrackMultipleRecords, boolean bAllowEchos)
{
  boolean bReceiveAllAdds = false;
  if (((this.getDatabaseType() & DBConstants.TABLE_MASK) == DBConstants.TABLE)
    || ((this.getDatabaseType() & DBConstants.TABLE_MASK) == DBConstants.LOCAL)
    || ((this.getDatabaseType() & DBConstants.TABLE_MASK) == DBConstants.REMOTE_MEMORY))
      bReceiveAllAdds = true;    // The volume of changes is negligable and there is rarely a secondary, so listen for all changes
  return this.setupRecordListener(listener, bTrackMultipleRecords, bAllowEchos, bReceiveAllAdds);
}
/**

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

recordMain.setupRecordListener(this, false, false);   // I need to listen for record changes
try   {
  if (recordMain.getEditMode() == Constants.EDIT_NONE)

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

recordMain.setupRecordListener(this, false, false);   // I need to listen for record changes
try   {
  if (recordMain.getEditMode() == Constants.EDIT_NONE)

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

/**
 * Set the field that owns this listener.
 * @owner The field that this listener is being added to (if null, this listener is being removed).
 */
public void setOwner(ListenerOwner owner)
{
  if (owner == null)
  {
    if (m_messageListener != null)
    {
      m_messageListener.free();
      m_messageListener = null;
    }
  }
  super.setOwner(owner);
  if (owner != null)
  {
    Record record = this.getOwner().getRecord();
    BaseMessageManager messageManager = ((Application)record.getTask().getApplication()).getMessageManager();
    if (messageManager != null)
    {
      BaseMessageFilter messageFilter = new BaseMessageFilter(MessageConstants.TRX_RETURN_QUEUE, MessageConstants.INTERNET_QUEUE, this, null);
      messageManager.addMessageFilter(messageFilter);
      m_messageListener = new  WaitForFieldChangeMessageListener(messageFilter, this);
      record.setupRecordListener(m_messageListener, false, false);   // I need to listen for record changes
    }
  }            
}
/**

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

/**
 * Set the field that owns this listener.
 * @owner The field that this listener is being added to (if null, this listener is being removed).
 */
public void setOwner(ListenerOwner owner)
{
  if (owner == null)
  {
    if (m_messageListener != null)
    {
      m_messageListener.free();
      m_messageListener = null;
    }
  }
  super.setOwner(owner);
  if (owner != null)
  {
    Record record = this.getOwner().getRecord();
    BaseMessageManager messageManager = ((Application)record.getTask().getApplication()).getMessageManager();
    if (messageManager != null)
    {
      BaseMessageFilter messageFilter = new BaseMessageFilter(MessageConstants.TRX_RETURN_QUEUE, MessageConstants.INTERNET_QUEUE, this, null);
      messageManager.addMessageFilter(messageFilter);
      m_messageListener = new  WaitForFieldChangeMessageListener(messageFilter, this);
      record.setupRecordListener(m_messageListener, false, false);   // I need to listen for record changes
    }
  }            
}
/**

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

/**
 * Set the field that owns this listener.
 * @owner The field that this listener is being added to (if null, this listener is being removed).
 */
public void setOwner(ListenerOwner owner)
{
  if (owner == null)
  {
    if (m_messageListener != null)
    {
      m_messageListener.free();
      m_messageListener = null;
    }
  }
  super.setOwner(owner);
  if (owner != null)
  {
    Record record = this.getOwner().getRecord();
    MessageManager messageManager = ((Application)record.getTask().getApplication()).getMessageManager();
    if (messageManager != null)
    {
      BaseMessageFilter messageFilter = new BaseMessageFilter(MessageConstants.TRX_RETURN_QUEUE, MessageConstants.INTERNET_QUEUE, this, null);
      messageManager.addMessageFilter(messageFilter);
      m_messageListener = new  WaitForFieldChangeMessageListener(messageFilter, this);
      record.setupRecordListener(m_messageListener, false, false);   // I need to listen for record changes
    }
  }            
}
/**

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

gridRecord.setupRecordListener(this, true, false);  // I need to listen for record changes
BaseTable gridTable = gridRecord.getTable();
if (!(gridTable instanceof GridTable))

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

gridRecord.setupRecordListener(this, true, false);  // I need to listen for record changes
BaseTable gridTable = gridRecord.getTable();
if (!(gridTable instanceof GridTable))

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

this.getRecord(Tour.TOUR_FILE).setupRecordListener(this, false, false);   // I need to listen for record changes

相关文章

微信公众号

最新文章

更多

Record类方法