本文整理了Java中org.jbundle.base.db.Record.getCounterField
方法的一些代码示例,展示了Record.getCounterField
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.getCounterField
方法的具体详情如下:
包路径:org.jbundle.base.db.Record
类名称:Record
方法名:getCounterField
[英]Get the autosequence field if it exists.
[中]获取autosequence字段(如果存在)。
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
public BaseField getMainFileKeyField(boolean bReturnCounterField)
{
if (m_fldMainFile != null)
return m_fldMainFile;
if (m_recordMain != null)
if (bReturnCounterField)
return (BaseField)m_recordMain.getCounterField();
return null;
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
public BaseField getMainFileKeyField(boolean bReturnCounterField)
{
if (m_fldMainFile != null)
return m_fldMainFile;
if (m_recordMain != null)
if (bReturnCounterField)
return (BaseField)m_recordMain.getCounterField();
return null;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
public BaseField getMainFileKeyField(boolean bReturnCounterField)
{
if (m_fldMainFile != null)
return m_fldMainFile;
if (m_recordMain != null)
if (bReturnCounterField)
return (BaseField)m_recordMain.getCounterField();
return null;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Make this field a reference to the current object in this record info class.
* @param record tour.db.Record The current record to set this field to reference.
* @param bDisplayOption If true, display changes.
* @param iMoveMode The move mode.
* @return The error code (or NORMAL_RETURN).
*/
public int setReference(Record record, boolean bDisplayOption, int iMoveMode)
{
return this.moveFieldToThis((BaseField)record.getCounterField(), bDisplayOption, iMoveMode);
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Make this field a reference to the current object in this record info class.
* @param record tour.db.Record The current record to set this field to reference.
* @param bDisplayOption If true, display changes.
* @param iMoveMode The move mode.
* @return The error code (or NORMAL_RETURN).
*/
public int setReference(Record record, boolean bDisplayOption, int iMoveMode)
{
return this.moveFieldToThis((BaseField)record.getCounterField(), bDisplayOption, iMoveMode);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Make this field a reference to the current object in this record info class.
* @param record tour.db.Record The current record to set this field to reference.
* @param bDisplayOption If true, display changes.
* @param iMoveMode The move mode.
* @return The error code (or NORMAL_RETURN).
*/
public int setReference(Record record, boolean bDisplayOption, int iMoveMode)
{
return this.moveFieldToThis((BaseField)record.getCounterField(), bDisplayOption, iMoveMode);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Does this fieldlist have a primary key that is auto-sequence.
* This can be turned off (in thick) by setting table.setProperty(AUTO_SEQUENCE_KEY, FALSE),
* which is primarily used to restore an archive with changing the autosequenced values.
* Note: Thin FieldList's ALWAYS have auto-sequence keys.
* @return True if autosequence key.
*/
public boolean isAutoSequence()
{
if (this.getCounterField() != null)
if (!DBConstants.FALSE.equalsIgnoreCase(this.getTable().getProperty(SQLParams.AUTO_SEQUENCE_ENABLED)))
return super.isAutoSequence(); // Yes, this record has an autosequence key that is enabled.
return false;
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Does this fieldlist have a primary key that is auto-sequence.
* This can be turned off (in thick) by setting table.setProperty(AUTO_SEQUENCE_KEY, FALSE),
* which is primarily used to restore an archive with changing the autosequenced values.
* Note: Thin FieldList's ALWAYS have auto-sequence keys.
* @return True if autosequence key.
*/
public boolean isAutoSequence()
{
if (this.getCounterField() != null)
if (!DBConstants.FALSE.equalsIgnoreCase(this.getTable().getProperty(SQLParams.AUTO_SEQUENCE_ENABLED)))
return super.isAutoSequence(); // Yes, this record has an autosequence key that is enabled.
return false;
}
/**
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.booking.db
/**
* GetKeyFromRecord Method.
*/
public String getKeyFromRecord(Record recBookingDetail, String iFieldSeq)
{
String bookmark = recBookingDetail.getCounterField().toString();
BaseField fieldTarget = recBookingDetail.getField(iFieldSeq);
String strFieldType = fieldTarget.getFieldName();
if ((bookmark == null) || (bookmark.length() == 0))
bookmark = recBookingDetail.getLastModified(DBConstants.BOOKMARK_HANDLE).toString();
String strKey = strFieldType + '.' + bookmark;
return strKey;
}
/**
代码示例来源:origin: com.tourgeek.tour/com.tourgeek.tour.booking.db
/**
* GetKeyFromRecord Method.
*/
public String getKeyFromRecord(Record recBookingDetail, String iFieldSeq)
{
String bookmark = recBookingDetail.getCounterField().toString();
BaseField fieldTarget = recBookingDetail.getField(iFieldSeq);
String strFieldType = fieldTarget.getFieldName();
if ((bookmark == null) || (bookmark.length() == 0))
bookmark = recBookingDetail.getLastModified(DBConstants.BOOKMARK_HANDLE).toString();
String strKey = strFieldType + '.' + bookmark;
return strKey;
}
/**
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.profile.screen
/**
* Add all the screen listeners.
*/
public void addListeners()
{
super.addListeners();
((BaseField)((BaseScreen)this.getParentScreen()).getHeaderRecord().getCounterField()).setEnabled(true);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* AddSubFileFilter Method.
*/
public void addSubFileFilter()
{
this.getMainRecord().addListener(new CompareFileFilter(MessageProcessInfo.kMessageInfoID, (BaseField)this.getHeaderRecord().getCounterField(), DBConstants.EQUALS, null, true));
this.getMainRecord().getField(MessageProcessInfo.kMessageInfoID).addListener(new InitFieldHandler((BaseField)this.getHeaderRecord().getCounterField(), false));
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Add the sub file filter (linking the header to the main file)
* Override this if the header does not have a direct link to the detail.
*/
public void addSubFileFilter()
{
this.getMainRecord().addListener(new CompareFileFilter(MessageProcessInfo.kMessageInfoID, (BaseField)this.getHeaderRecord().getCounterField(), DBConstants.EQUALS, null, true));
this.getMainRecord().getField(MessageProcessInfo.kMessageInfoID).addListener(new InitFieldHandler((BaseField)this.getHeaderRecord().getCounterField(), false));
}
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Move the ID field to the code field.
* @return
*/
public int moveIDToCodeField()
{
if (this.getCodeField().isNull())
return getCodeField().moveFieldToThis((BaseField)this.getOwner().getCounterField());
else
return DBConstants.NORMAL_RETURN;
}
}
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Move the ID field to the code field.
* @return
*/
public int moveIDToCodeField()
{
if (this.getCodeField().isNull())
return getCodeField().moveFieldToThis((BaseField)this.getOwner().getCounterField());
else
return DBConstants.NORMAL_RETURN;
}
}
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Move the ID field to the code field.
* @return
*/
public int moveIDToCodeField()
{
if (this.getCodeField().isNull())
return getCodeField().moveFieldToThis((BaseField)this.getOwner().getCounterField());
else
return DBConstants.NORMAL_RETURN;
}
}
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* If any of the non-counter fields are null, return true.
* @param iAreaDesc
* @return
*/
public boolean isNull(int iAreaDesc, boolean bIncludeTempFields)
{
for (int i = 0; i < this.getKeyFields(false, bIncludeTempFields); i++)
{
if (this.getField(i) != this.getRecord().getCounterField())
if (this.getKeyField(i).getField(iAreaDesc).isNull())
return true; // Is null
}
return false; // is not null
}
}
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* If any of the non-counter fields are null, return true.
* @param iAreaDesc
* @return
*/
public boolean isNull(int iAreaDesc, boolean bIncludeTempFields)
{
for (int i = 0; i < this.getKeyFields(false, bIncludeTempFields); i++)
{
if (this.getField(i) != this.getRecord().getCounterField())
if (this.getKeyField(i).getField(iAreaDesc).isNull())
return true; // Is null
}
return false; // is not null
}
}
代码示例来源:origin: com.tourgeek.tour/com.tourgeek.tour.util
public void checkIt()
{
BookingDetail bookingDetail = (BookingDetail)this.getMainRecord();
bookingDetail.setKeyArea(Booking.ID_KEY);
try {
while (bookingDetail.hasNext())
{
Record record = bookingDetail.next();
Map<String,Object> refs = this.checkReferences(record);
String str = record.getTableNames(false) + "(" + record.getCounterField().toString() + ")" + this.format(refs, 1);
this.analyzeReferences(refs, refs);
}
} catch (DBException e) {
e.printStackTrace();
}
}
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.profile.screen
/**
* SetupSFields Method.
*/
public void setupSFields()
{
// I have to get the header record, since one of the sub-screens is the profile screen.
((BaseScreen)this.getParentScreen()).getHeaderRecord().getField(Profile.NAME).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
Record record = ((BaseScreen)this.getParentScreen()).getHeaderRecord();
Converter converter = record.getCounterField();
new SSelectBox(this.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), this, converter, ScreenConstants.DONT_DISPLAY_DESC, record);
((BaseScreen)this.getParentScreen()).getHeaderRecord().getField(Profile.CONTACT).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
}
内容来源于网络,如有侵权,请联系作者删除!