/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recDependent The record to free when this record is freed. * @param bCloseOnFree If true, the record freed (always set to true-some special overrides set this to non-true). */ public FreeOnFreeHandler(Record recDependent, boolean bCloseOnFree) { this(); this.init(null, null, recDependent, bCloseOnFree); } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recDependent The record to free when this record is freed. * @param bCloseOnFree If true, the record freed (always set to true-some special overrides set this to non-true). */ public FreeOnFreeHandler(Record recDependent, boolean bCloseOnFree) { this(); this.init(null, null, recDependent, bCloseOnFree); } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param freeable A object to free when this record is freed. */ public FreeOnFreeHandler(Freeable freeable) { this(); this.init(null, freeable, null, false); } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recDependent The record to free when this record is freed. * @param bCloseOnFree If true, the record freed (always set to true-some special overrides set this to non-true). */ public FreeOnFreeHandler(Record recDependent, boolean bCloseOnFree) { this(); this.init(null, null, recDependent, bCloseOnFree); } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param freeable A object to free when this record is freed. */ public FreeOnFreeHandler(Freeable freeable) { this(); this.init(null, freeable, null, false); } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recordMain The main record to create a sub-query for. * @param bRemoteSubRecords Remove sub-records on delete main? */ public void init(Record record, Record recSubFile, String strSubFile, boolean bRemoveSubRecords) { // For this to work right, the booking number field needs a listener to re-select this file whenever it changes super.init(record, null, recSubFile, true); m_strSubFile = strSubFile; m_bRemoveSubRecords = bRemoveSubRecords; } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recDependent The record to free when this record is freed. * @param bCloseOnFree If true, the record freed (always set to true-some special overrides set this to non-true). */ public FreeOnFreeHandler(Record recDependent) { this(); this.init(null, null, recDependent, false); //free } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recDependent The record to free when this record is freed. * @param bCloseOnFree If true, the record freed (always set to true-some special overrides set this to non-true). */ public FreeOnFreeHandler(Record recDependent) { this(); this.init(null, null, recDependent, false); //free } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recDependent The record to free when this record is freed. * @param bCloseOnFree If true, the record freed (always set to true-some special overrides set this to non-true). */ public FreeOnFreeHandler(Record recDependent) { this(); this.init(null, null, recDependent, false); //free } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param freeable A object to free when this record is freed. */ public FreeOnFreeHandler(Freeable freeable) { this(); this.init(null, freeable, null, false); } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recordMain The main record to create a sub-query for. * @param bRemoteSubRecords Remove sub-records on delete main? */ public void init(Record record, Record recSubFile, String strSubFile, boolean bRemoveSubRecords) { // For this to work right, the booking number field needs a listener to re-select this file whenever it changes super.init(record, null, recSubFile, true); m_strSubFile = strSubFile; m_bRemoveSubRecords = bRemoveSubRecords; } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recordMain The main record to create a sub-query for. * @param bRemoteSubRecords Remove sub-records on delete main? */ public void init(Record record, Record recSubFile, String strSubFile, boolean bRemoveSubRecords) { // For this to work right, the booking number field needs a listener to re-select this file whenever it changes super.init(record, null, recSubFile, true); m_strSubFile = strSubFile; m_bRemoveSubRecords = bRemoveSubRecords; } /**
/** * Constructor. */ public void init(Record record, BaseRecordMessageFilter recordMessageFilter, boolean bCloseOnFree) { super.init(record, recordMessageFilter, null, bCloseOnFree); // Should work in the server, if created on the server (but don't replicate down to the server) this.setMasterSlaveFlag(FileListener.RUN_IN_MASTER | FileListener.RUN_IN_SLAVE | FileListener.DONT_REPLICATE_TO_SLAVE); m_recordMessageFilter = recordMessageFilter; } /**
/** * Constructor. */ public void init(Record record, BaseRecordMessageFilter recordMessageFilter, boolean bCloseOnFree) { super.init(record, recordMessageFilter, null, bCloseOnFree); // Should work in the server, if created on the server (but don't replicate down to the server) this.setMasterSlaveFlag(FileListener.RUN_IN_MASTER | FileListener.RUN_IN_SLAVE | FileListener.DONT_REPLICATE_TO_SLAVE); m_recordMessageFilter = recordMessageFilter; } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recHistory The history record. * @param iHistoryDate The last changed date in the history record. * @param fldSourceHistoryDate Where to get the date changed (if null, use current time). * @param bConfirmOnChange If true, ask the user if the changes are okay before writing them. * @param bCloseOnFree Close the history file when this record is freed (default true). */ public void init(Record record, Record recHistory, int iHistoryDateSeq, BaseField fldSourceHistoryDate, boolean bCloseOnFree, String strRecHistoryClass, int iSourceHistoryDateSeq) { if (iHistoryDateSeq == -1) iHistoryDateSeq = recHistory.getFieldCount() - 1; // Last field m_iHistoryDateSeq = iHistoryDateSeq; m_fldSourceHistoryDate = fldSourceHistoryDate; m_strRecHistoryClass = strRecHistoryClass; m_iSourceDateSeq = iSourceHistoryDateSeq; super.init(record, null, recHistory, bCloseOnFree); if (m_recDependent != null) { if (m_recDependent.getListener(RecordChangedHandler.class) != null) m_recDependent.removeListener(m_recDependent.getListener(RecordChangedHandler.class), true); // I replace this listener } this.setMasterSlaveFlag(FileListener.RUN_IN_SLAVE); // This runs on the slave (if there is a slave) } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recHistory The history record. * @param iHistoryDate The last changed date in the history record. * @param fldSourceHistoryDate Where to get the date changed (if null, use current time). * @param bConfirmOnChange If true, ask the user if the changes are okay before writing them. * @param bCloseOnFree Close the history file when this record is freed (default true). */ public void init(Record record, Record recHistory, int iHistoryDateSeq, BaseField fldSourceHistoryDate, boolean bCloseOnFree, String strRecHistoryClass, int iSourceHistoryDateSeq) { if (iHistoryDateSeq == -1) iHistoryDateSeq = recHistory.getFieldCount() - 1; // Last field m_iHistoryDateSeq = iHistoryDateSeq; m_fldSourceHistoryDate = fldSourceHistoryDate; m_strRecHistoryClass = strRecHistoryClass; m_iSourceDateSeq = iSourceHistoryDateSeq; super.init(record, null, recHistory, bCloseOnFree); if (m_recDependent != null) { if (m_recDependent.getListener(RecordChangedHandler.class) != null) m_recDependent.removeListener(m_recDependent.getListener(RecordChangedHandler.class), true); // I replace this listener } this.setMasterSlaveFlag(FileListener.RUN_IN_SLAVE); // This runs on the slave (if there is a slave) } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param recHistory The history record. * @param iHistoryDate The last changed date in the history record. * @param fldSourceHistoryDate Where to get the date changed (if null, use current time). * @param bConfirmOnChange If true, ask the user if the changes are okay before writing them. * @param bCloseOnFree Close the history file when this record is freed (default true). */ public void init(Record record, Record recHistory, String iHistoryDateSeq, BaseField fldSourceHistoryDate, boolean bCloseOnFree, String strRecHistoryClass, String iSourceHistoryDateSeq) { if (iHistoryDateSeq == null) iHistoryDateSeq = recHistory.getField(recHistory.getFieldCount() - 1).getFieldName(); // Last field m_iHistoryDateSeq = iHistoryDateSeq; m_fldSourceHistoryDate = fldSourceHistoryDate; m_strRecHistoryClass = strRecHistoryClass; m_iSourceDateSeq = iSourceHistoryDateSeq; super.init(record, null, recHistory, bCloseOnFree); if (m_recDependent != null) { if (m_recDependent.getListener(RecordChangedHandler.class) != null) m_recDependent.removeListener(m_recDependent.getListener(RecordChangedHandler.class), true); // I replace this listener } this.setMasterSlaveFlag(FileListener.RUN_IN_SLAVE); // This runs on the slave (if there is a slave) } /**