/** * Get a unique object that can be used to reposition to this record. * @exception FILE_NOT_OPEN. * @exception INVALID_RECORD - There is no current record. */ public Object getHandle(int iHandleType) throws DBException { return this.getRecord().getCounterField().getData(); } /**
/** * Create a new empty record. * Discard the current fields, init all the fields and display them, * and set the status to EDIT_ADD. */ public void addNew() throws DBException { this.getRecord().initRecord(true); this.getRecord().setEditMode(Constants.EDIT_ADD); } /**
/** * Get the field description. * @return The field description. */ public String getFieldDesc() { // Must be overidden if (this.getNextConverter() != null) return this.getNextConverter().getFieldDesc(); else return super.getFieldDesc(); } /**
/** * Add this field to this Key Area. * @param iFieldSeq The field to add. * @param bKeyArea The order (ascending/descending). */ public void addKeyField(int iFieldSeq, boolean bKeyOrder) { this.addKeyField(m_record.getField(iFieldSeq), bKeyOrder); } /**
/** * Get this field's name. * @return The name of the field on the end of the converter chain. */ public String getFieldName() { if (this.getField() == null) return null; else return this.getField().getFieldName(false, false); } /**
/** * Get the field on the end of this converter chain. * @return The field on the end of the chain. */ public FieldInfo getField() { if (this.getNextConverter() != null) return this.getNextConverter().getField(); else return super.getField(); } // Return the source BaseField (if linked to a field!) /**
/** * Get the next record (return a null at EOF). * Note: Remember to set the data source before returning a NORMAL_RETURN. * @param iRelPosition The relative records to move. * @return A record status (NORMAL_RETURN means the move was successful). */ public int doMove(int iRelPosition) throws DBException { this.getRecord().setEditMode(Constants.EDIT_NONE); return Constants.ERROR_RETURN; // You better override this. } /**
/** * Get the current string length of the data at the end of this converter chain. * @return The string length (or -1 if unknown). */ public int getLength() { // Must be overidden if (this.getNextConverter() != null) return this.getNextConverter().getLength(); else return super.getLength(); } /**
/** * Add this component to the components displaying this field. * @param Object sField The screen component.. either a awt.Component or a ScreenField. */ public void addComponent(Object screenField) { if (this.getNextConverter() != null) this.getNextConverter().addComponent(screenField); else super.addComponent(screenField); } /**
/** * Get the maximum length of this field. * @return The maximum field length. */ public int getMaxLength() { // Must be overidden if (this.getNextConverter() != null) return this.getNextConverter().getMaxLength(); else return super.getMaxLength(); } /**
/** * Get the current key order. * @return The current Key order. */ public String getDefaultKeyName() { return this.getKeyArea(m_iDefaultOrder).getKeyName(); } /**
/** * Add this field to this Key Area. * @param strFieldName The field to add. * @param bKeyArea The order (ascending/descending). */ public void addKeyField(String strFieldName, boolean bKeyOrder) { this.addKeyField(m_record.getField(strFieldName), bKeyOrder); } /**
/** * Close the file. * Reset the current position. */ public void close() { m_bIsOpen = false; this.getRecord().setEditMode(Constants.EDIT_NONE); } /**
/** * Get the name of the current key. * Note: This is a convience method, the current KeyArea's name is returned. * @return The key's name. */ public String getKeyName() { if (this.getKeyArea(-1) != null) return this.getKeyArea(-1).getKeyName(); return null; } /**