/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param iMainFilesField The sequence of the date changed field in this record. * @param field The date changed field in this record. */ public void init(Record record, DateTimeField field) { super.init(record); m_field = field; FieldDataScratchHandler listener = new FieldDataScratchHandler(null); listener.setAlwaysEnabled(true); // Since this holds the current key m_field.addListener(listener); // I will need the original value for the sql update this.setMasterSlaveFlag(FileListener.RUN_IN_SLAVE | FileListener.RUN_IN_MASTER); // Set date key in slave code, check for error in master code } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param iMainFilesField The sequence of the date changed field in this record. * @param field The date changed field in this record. */ public void init(Record record, DateTimeField field) { super.init(record); m_field = field; FieldDataScratchHandler listener = new FieldDataScratchHandler(null); listener.setAlwaysEnabled(true); // Since this holds the current key m_field.addListener(listener); // I will need the original value for the sql update this.setMasterSlaveFlag(FileListener.RUN_IN_SLAVE | FileListener.RUN_IN_MASTER); // Set date key in slave code, check for error in master code } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param iMainFilesField The sequence of the date changed field in this record. * @param field The date changed field in this record. */ public void init(Record record, DateTimeField field) { super.init(record); m_field = field; FieldDataScratchHandler listener = new FieldDataScratchHandler(null); listener.setAlwaysEnabled(true); // Since this holds the current key m_field.addListener(listener); // I will need the original value for the sql update this.setMasterSlaveFlag(FileListener.RUN_IN_SLAVE | FileListener.RUN_IN_MASTER); // Set date key in slave code, check for error in master code } /**
if (iMoveMode == DBConstants.READ_MOVE) // Very obscure - Make sure this fake read move does not change the scratch area if (fldDest.getNextValidListener(iMoveMode) instanceof FieldDataScratchHandler) // Always enable would have to be true since listeners have been disabled (listenerScratchData = ((FieldDataScratchHandler)fldDest.getNextValidListener(iMoveMode))).setAlwaysEnabled(false); listenerScratchData.setAlwaysEnabled(true);
if (iMoveMode == DBConstants.READ_MOVE) // Very obscure - Make sure this fake read move does not change the scratch area if (fldDest.getNextValidListener(iMoveMode) instanceof FieldDataScratchHandler) // Always enable would have to be true since listeners have been disabled (listenerScratchData = ((FieldDataScratchHandler)fldDest.getNextValidListener(iMoveMode))).setAlwaysEnabled(false); listenerScratchData.setAlwaysEnabled(true);
if (iMoveMode == DBConstants.READ_MOVE) // Very obscure - Make sure this fake read move does not change the scratch area if (fldDest.getNextValidListener(iMoveMode) instanceof FieldDataScratchHandler) // Always enable would have to be true since listeners have been disabled (listenerScratchData = ((FieldDataScratchHandler)fldDest.getNextValidListener(iMoveMode))).setAlwaysEnabled(false); listenerScratchData.setAlwaysEnabled(true);