本文整理了Java中org.jbundle.thin.base.db.FieldList.getFieldCount()
方法的一些代码示例,展示了FieldList.getFieldCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FieldList.getFieldCount()
方法的具体详情如下:
包路径:org.jbundle.thin.base.db.FieldList
类名称:FieldList
方法名:getFieldCount
[英]Get rid of this method.
[中]摆脱这种方法。
代码示例来源:origin: org.jbundle.thin.base.db/org.jbundle.thin.base.db
/**
* Number of Fields in this record.
* @return The current field count.
*/
public int size()
{
return this.getFieldCount();
}
/**
代码示例来源:origin: org.jbundle.thin.base.db/org.jbundle.thin.base.db
/**
* Get this field in the record.
* @param strFieldName The field name to find.
* @return The field at this position (Or null if past end of records).
*/
public FieldInfo getField(String strFieldName) // Lookup this field
{
boolean bAddQuotes = false;
if (strFieldName != null) if (strFieldName.length() > 0) if (strFieldName.charAt(0) == '\"')
bAddQuotes = true;
for (int i = 0; i < this.getFieldCount(); i++)
{
FieldInfo field = this.getField(i);
if (field.getFieldName(bAddQuotes, false).toString().equalsIgnoreCase(strFieldName)) // Don't add quotes on compare
return field;
}
return null; // Not found
}
/**
代码示例来源:origin: org.jbundle.thin.base.db/org.jbundle.thin.base.db
/**
* Convert this record to a string.
* @return A string of all the fields.
*/
public String toString()
{
String string = Constants.BLANK;
for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq <= this.getFieldCount() + Constants.MAIN_FIELD - 1; iFieldSeq++) {
FieldInfo field = this.getField(iFieldSeq);
string += field.toString() + '\n';
}
string += '\n';
return string;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Copy the data in this record to the thin version.
* @param fieldList
*/
public final void copyAllFields(Record record, FieldList fieldList)
{
for (int i = 0; i < fieldList.getFieldCount(); i++)
{
FieldInfo fieldInfo = fieldList.getField(i);
BaseField field = record.getField(i);
this.moveFieldToThin(fieldInfo, field, record);
}
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Copy the data in this record to the thin version.
* @param fieldList
*/
public final void copyAllFields(Record record, FieldList fieldList)
{
for (int i = 0; i < fieldList.getFieldCount(); i++)
{
FieldInfo fieldInfo = fieldList.getField(i);
BaseField field = record.getField(i);
this.moveFieldToThin(fieldInfo, field, record);
}
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Copy the data in this record to the thin version.
* @param fieldList
*/
public final void copyAllFields(Record record, FieldList fieldList)
{
for (int i = 0; i < fieldList.getFieldCount(); i++)
{
FieldInfo fieldInfo = fieldList.getField(i);
BaseField field = record.getField(i);
this.moveFieldToThin(fieldInfo, field, record);
}
}
/**
代码示例来源:origin: org.jbundle.thin.base.db/org.jbundle.thin.base.db
/**
* Reset all the fields to their default value.
* <p />NOTE: After executing, this records edit mode is set to NONE.
* @param bDisplay The the new values (on work in the thick model).
* @throws Exception An exception on initing a field.
*/
public void initRecord(boolean bDisplay) throws DBException
{
int iFieldCount = this.getFieldCount(); // Number of fields to read in
for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq < iFieldCount + Constants.MAIN_FIELD; iFieldSeq++)
{
FieldInfo field = this.getField(iFieldSeq);
field.initField(bDisplay);
}
this.setEditMode(Constants.EDIT_NONE);
}
/**
代码示例来源:origin: com.tourgeek.thin.app/com.tourgeek.thin.app.booking
/**
*
*/
private void copyFieldList(FieldList fieldList, FieldList item)
{
for (int i = 0; i < item.getFieldCount(); i++)
{
FieldInfo fldSource = item.getField(i);
FieldInfo fldDest = fieldList.getField(i);
fldDest.setData(fldSource.getData(), Constants.DISPLAY, Constants.READ_MOVE);
}
}
/**
代码示例来源:origin: org.jbundle.thin.base.db/org.jbundle.thin.base.db
/**
* Compare this output buffer to all the fields.
* This is a utility method that compares the record.
* @param record The target record.
* @return True if they are equal.
*/
public boolean compareToBuffer(FieldList record)
{
boolean bBufferEqual = true;
this.resetPosition(); // Start at the first field
int iFieldCount = record.getFieldCount(); // Number of fields to read in
for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq <= iFieldCount + Constants.MAIN_FIELD - 1; iFieldSeq++)
{
FieldInfo field = record.getField(iFieldSeq);
if (!this.skipField(field))
bBufferEqual = this.compareNextToField(field);
if (!bBufferEqual)
break;
}
return bBufferEqual;
}
/**
代码示例来源:origin: org.jbundle.thin.base.db/org.jbundle.thin.base.db
/**
* Move the output buffer to all the fields.
* This is a utility method that populates the record.
* @param record The target record.
* @param bDisplayOption The display option for the movetofield call.
* @param iMoveMove The move mode for the movetofield call.
* @return The error code.
*/
public int bufferToFields(FieldList record, boolean bDisplayOption, int iMoveMode)
{
this.resetPosition(); // Start at the first field
int iFieldCount = record.getFieldCount(); // Number of fields to read in
int iErrorCode = Constants.NORMAL_RETURN;
int iTempError;
for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq <= iFieldCount + Constants.MAIN_FIELD - 1; iFieldSeq++)
{
FieldInfo field = record.getField(iFieldSeq);
if (this.skipField(field))
iTempError = field.initField(bDisplayOption);
else
iTempError = this.getNextField(field, bDisplayOption, iMoveMode);
if (iTempError != Constants.NORMAL_RETURN)
iErrorCode = iTempError;
}
return iErrorCode;
}
/**
代码示例来源:origin: org.jbundle.thin.base.db/org.jbundle.thin.base.db
/**
* Move all the fields to the output buffer.
* This is the same as the fieldsToBuffer method, specifying the fieldTypes to move.
* @param record The target record.
* @param iFieldTypes The field types to move.
*/
public void fieldsToBuffer(FieldList record, int iFieldsTypes)
{
m_iFieldsTypes = iFieldsTypes;
if (this.getHeaderCount() == 0)
this.clearBuffer(); // Being careful. (Remember to call this at the start anyway)
int fieldCount = record.getFieldCount(); // Number of fields to write out
for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq <= fieldCount + Constants.MAIN_FIELD - 1; iFieldSeq++)
{
FieldInfo field = record.getField(iFieldSeq);
if (!this.skipField(field))
this.addNextField(field);
}
this.finishBuffer(); //pDestBuff, recordLength, physicalFieldCount); // two bytes for record length, two for field count
}
/**
代码示例来源:origin: com.tourgeek.thin.app/com.tourgeek.thin.app.booking
/**
*
*/
private FieldList cloneFieldList(FieldList item)
{
FieldList fieldList = new FieldList(null);
for (int i = 0; i < item.getFieldCount(); i++)
{
FieldInfo fldSource = item.getField(i);
FieldInfo fldDest = new FieldInfo(fieldList, fldSource.getFieldName(), fldSource.getMaxLength(), fldSource.getFieldDesc(), fldSource.getDefault());
fldDest.setDataClass(fldSource.getDataClass());
}
return fieldList;
}
/**
代码示例来源:origin: com.tourgeek.thin.app/com.tourgeek.thin.app.booking
/**
* Free.
*/
public void free()
{
if (this.getFieldList(MealPlan.MEAL_PLAN_FILE) != null)
{ // Since the meal plan popup record is shared, I need to free it then disconnect it from the controls.
this.getFieldList(MealPlan.MEAL_PLAN_FILE).free();
FieldList fieldList = this.getFieldList();
for (int iFieldSeq = 0; iFieldSeq < fieldList.getFieldCount(); iFieldSeq++)
{
FieldInfo field = fieldList.getField(iFieldSeq);
Component component = null;
int iIndex = 0;
while ((component = (Component)field.getComponent(iIndex)) != null)
{
if (component instanceof JRemoteComboBox)
if (((JRemoteComboBox)component).getRecord() == this.getFieldList(MealPlan.MEAL_PLAN_FILE))
((JRemoteComboBox)component).setRecord(null);
iIndex++; // Bump counter
}
}
this.removeFieldList(this.getFieldList(MealPlan.MEAL_PLAN_FILE));
}
super.free();
}
/**
代码示例来源:origin: org.jbundle.thin.base.db/org.jbundle.thin.base.db
rgbModified = new boolean[this.getFieldCount()];
for (int iFieldSeq = 0; iFieldSeq < this.getFieldCount(); iFieldSeq++)
this.getTable().edit(); // If I haven't changed any data, just refresh it.
buffer.resetPosition();
for (int iFieldSeq = 0; iFieldSeq < this.getFieldCount(); iFieldSeq++)
for (int iFieldSeq = 0; iFieldSeq < this.getFieldCount(); iFieldSeq++)
代码示例来源:origin: com.tourgeek.thin.app/com.tourgeek.thin.app.booking
field.free();
for (int iFieldSeq = 0; iFieldSeq < recBookingDetail.getFieldCount(); iFieldSeq++)
内容来源于网络,如有侵权,请联系作者删除!