本文整理了Java中org.jbundle.base.db.Record.handleRecordChange
方法的一些代码示例,展示了Record.handleRecordChange
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.handleRecordChange
方法的具体详情如下:
包路径:org.jbundle.base.db.Record
类名称:Record
方法名:handleRecordChange
[英]Called when a change is the record status is about to happen/has happened.
[中]当记录状态即将发生/已发生更改时调用。
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Called when a change is the record status is about to happen/has happened.
* @param iChangeType The type of change.
* @return An error code.
*/
public int handleRecordChange(int iChangeType) // init this field override for other value
{
return this.handleRecordChange(null, iChangeType, this.getDisplayOption());
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Called when a change is the record status is about to happen/has happened.
* @param iChangeType The type of change.
* @return An error code.
*/
public int handleRecordChange(int iChangeType) // init this field override for other value
{
return this.handleRecordChange(null, iChangeType, this.getDisplayOption());
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Called when a change is the record status is about to happen/has happened.
* @param iChangeType The type of change.
* @return An error code.
*/
public int handleRecordChange(int iChangeType) // init this field override for other value
{
return this.handleRecordChange(null, iChangeType, this.getDisplayOption());
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* This field changed, if this is the main record, lock it!
* @param field The field that changed.
*/
public void fieldChanged(BaseField field)
{
Record record = this.getMainRecord();
if (field != null)
if (record != null)
if (field.getRecord() == record)
{
int iErrorCode= record.handleRecordChange(field, DBConstants.FIELD_CHANGED_TYPE, DBConstants.DONT_DISPLAY); // Tell table that I'm getting changed (if not locked)
if (iErrorCode != DBConstants.NORMAL_RETURN)
this.displayError(iErrorCode);
}
}
/**
代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model
/**
* This field changed, if this is the main record, lock it!
* @param field The field that changed.
*/
public void fieldChanged(Field field)
{
Record record = this.getMainRecord();
if (field != null)
if (record != null)
if (field.getRecord() == record)
{
int iErrorCode= record.handleRecordChange((BaseField)field, DBConstants.FIELD_CHANGED_TYPE, DBConstants.DONT_DISPLAY); // Tell table that I'm getting changed (if not locked)
if (iErrorCode != DBConstants.NORMAL_RETURN)
this.displayError(iErrorCode);
}
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* The Field has Changed.
* @param bDisplayOption If true, display the change.
* @param iMoveMode The type of move being done (init/read/screen).
* @return The error code (or NORMAL_RETURN if okay).
*/
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
int result = DBConstants.NORMAL_RETURN;
Record record = m_fldTarget.getRecord();
boolean bSetDirty = true;
if (m_bIfNewRecord) if (record.getEditMode() == Constants.EDIT_ADD)
bSetDirty = true;
if (m_bIfCurrentRecord) if ((record.getEditMode() == Constants.EDIT_CURRENT) || (record.getEditMode() == Constants.EDIT_IN_PROGRESS))
bSetDirty = true;
if (bSetDirty)
{
m_fldTarget.setModified(true);
result = record.handleRecordChange(m_fldTarget, DBConstants.FIELD_CHANGED_TYPE, bDisplayOption); // Tell table that I'm getting changed (if not locked)
}
return result;
}
}
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* The Field has Changed.
* @param bDisplayOption If true, display the change.
* @param iMoveMode The type of move being done (init/read/screen).
* @return The error code (or NORMAL_RETURN if okay).
*/
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
int result = DBConstants.NORMAL_RETURN;
Record record = m_fldTarget.getRecord();
boolean bSetDirty = true;
if (m_bIfNewRecord) if (record.getEditMode() == Constants.EDIT_ADD)
bSetDirty = true;
if (m_bIfCurrentRecord) if ((record.getEditMode() == Constants.EDIT_CURRENT) || (record.getEditMode() == Constants.EDIT_IN_PROGRESS))
bSetDirty = true;
if (bSetDirty)
{
m_fldTarget.setModified(true);
result = record.handleRecordChange(m_fldTarget, DBConstants.FIELD_CHANGED_TYPE, bDisplayOption); // Tell table that I'm getting changed (if not locked)
}
return result;
}
}
代码示例来源: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
{
this.syncCurrentToBase();
boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.ADD_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
super.add(fieldList);
this.syncCurrentToBase();
rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.AFTER_ADD_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
}
/**
代码示例来源: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
{
this.syncCurrentToBase();
boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.ADD_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
super.add(fieldList);
this.syncCurrentToBase();
rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.AFTER_ADD_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
}
/**
代码示例来源: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
{
this.syncCurrentToBase();
boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.ADD_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
super.add(fieldList);
this.syncCurrentToBase();
rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.AFTER_ADD_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Delete this record (Always called from the record class).
* Always override this method.
* @exception DBException File exception.
*/
public void remove() throws DBException
{
this.syncCurrentToBase();
boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.DELETE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
super.remove();
this.syncCurrentToBase();
rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.AFTER_DELETE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Delete this record (Always called from the record class).
* Always override this method.
* @exception DBException File exception.
*/
public void remove() throws DBException
{
this.syncCurrentToBase();
boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.DELETE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
super.remove();
this.syncCurrentToBase();
rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.AFTER_DELETE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Convert the display's index to the field value and move to field.
* @param index The index to convert an set this field to.
* @param bDisplayOption If true, display the change in the converters.
* @param iMoveMove The type of move.
*/
public int convertIndexToField(int index, boolean bDisplayOption, int iMoveMode)
{ // User selected an item... Read it in!
int iErrorCode = this.moveToIndex(index);
if (iErrorCode == DBConstants.NORMAL_RETURN)
m_record.handleRecordChange(null, DBConstants.SELECT_TYPE, bDisplayOption); // Record selected!!!
// These next lines causes the FieldBehaviors with SCREEN_MOVE to be executed!!!
FieldInfo field = this.getField();
if (iErrorCode == DBConstants.NORMAL_RETURN) if (field != null)
{
if (field instanceof ReferenceField)
((ReferenceField)field).setReference(m_record, bDisplayOption, iMoveMode);
else if (field instanceof StringField)
field.setString(m_record.getField(m_iFieldSeq).toString());
}
return iErrorCode;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Update this record (Always called from the record class).
* @exception DBException File exception.
*/
public void set(Rec fieldList) throws DBException
{
this.syncCurrentToBase();
boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.UPDATE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
super.set(fieldList);
this.syncCurrentToBase();
rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.AFTER_UPDATE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Update this record (Always called from the record class).
* @exception DBException File exception.
*/
public void set(Rec fieldList) throws DBException
{
this.syncCurrentToBase();
boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.UPDATE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
super.set(fieldList);
this.syncCurrentToBase();
rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.AFTER_UPDATE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Update this record (Always called from the record class).
* @exception DBException File exception.
*/
public void set(Rec fieldList) throws DBException
{
this.syncCurrentToBase();
boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.UPDATE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
super.set(fieldList);
this.syncCurrentToBase();
rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.AFTER_UPDATE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Delete this record (Always called from the record class).
* Always override this method.
* @exception DBException File exception.
*/
public void remove() throws DBException
{
this.syncCurrentToBase();
boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.DELETE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
super.remove();
this.syncCurrentToBase();
rgbListenerState = this.getRecord().setEnableListeners(false);
this.getRecord().handleRecordChange(DBConstants.AFTER_DELETE_TYPE); // Fake the call for the grid table
this.getRecord().setEnableListeners(rgbListenerState);
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Requery the table.
* <p>NOTE: You do not need to Open to do a seek or addNew.
* The record pointer is positioned before the first record at BOF.
* @exception DBException
*/
public void open() throws DBException
{
if (this.isOpen())
return; // Ignore if already open
m_bIsOpen = false;
this.getRecord().handleInitialKey(); // Set up the smaller key
this.getRecord().handleEndKey(); // Set up the larger key
this.doOpen(); // Now do the physical open in sub class.
m_bIsOpen = true;
m_iRecordStatus = DBConstants.RECORD_INVALID | DBConstants.RECORD_AT_BOF;
if ((this.getRecord().getOpenMode() & DBConstants.OPEN_SUPPRESS_MESSAGES) == 0)
this.getRecord().handleRecordChange(DBConstants.AFTER_REQUERY_TYPE); // Notify listeners that a new table will be built
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Requery the table.
* <p>NOTE: You do not need to Open to do a seek or addNew.
* The record pointer is positioned before the first record at BOF.
* @exception DBException
*/
public void open() throws DBException
{
if (this.isOpen())
return; // Ignore if already open
m_bIsOpen = false;
this.getRecord().handleInitialKey(); // Set up the smaller key
this.getRecord().handleEndKey(); // Set up the larger key
this.doOpen(); // Now do the physical open in sub class.
m_bIsOpen = true;
m_iRecordStatus = DBConstants.RECORD_INVALID | DBConstants.RECORD_AT_BOF;
if ((this.getRecord().getOpenMode() & DBConstants.OPEN_SUPPRESS_MESSAGES) == 0)
this.getRecord().handleRecordChange(DBConstants.AFTER_REQUERY_TYPE); // Notify listeners that a new table will be built
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Requery the table.
* <p>NOTE: You do not need to Open to do a seek or addNew.
* The record pointer is positioned before the first record at BOF.
* @exception DBException
*/
public void open() throws DBException
{
if (this.isOpen())
return; // Ignore if already open
m_bIsOpen = false;
this.getRecord().handleInitialKey(); // Set up the smaller key
this.getRecord().handleEndKey(); // Set up the larger key
this.doOpen(); // Now do the physical open in sub class.
m_bIsOpen = true;
m_iRecordStatus = DBConstants.RECORD_INVALID | DBConstants.RECORD_AT_BOF;
if ((this.getRecord().getOpenMode() & DBConstants.OPEN_SUPPRESS_MESSAGES) == 0)
this.getRecord().handleRecordChange(DBConstants.AFTER_REQUERY_TYPE); // Notify listeners that a new table will be built
}
/**
内容来源于网络,如有侵权,请联系作者删除!