/** * Called when a error happens on a file operation, return the errorcode, or fix the problem. * @param iChangeType The type of change that occurred. * @param iErrorCode The error code encountered on the file operation. * @return The new error code, or return the original code if you can't fix it. */ public int handleErrorReturn(int iChangeType, int iErrorCode) // init this field override for other value { BaseListener nextListener = this.getNextEnabledListener(); while (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Don't allow it to be called again iErrorCode = ((FileListener)nextListener).doErrorReturn(iChangeType, iErrorCode); nextListener.setEnabledListener(bOldState); nextListener = nextListener.getNextEnabledListener(); } iErrorCode = this.doErrorReturn(iChangeType, iErrorCode); return iErrorCode; } /**
/** * Called when a error happens on a file operation, return the errorcode, or fix the problem. * @param iChangeType The type of change that occurred. * @param iErrorCode The error code encountered on the file operation. * @return The new error code, or return the original code if you can't fix it. */ public int handleErrorReturn(int iChangeType, int iErrorCode) // init this field override for other value { BaseListener nextListener = this.getNextEnabledListener(); while (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Don't allow it to be called again iErrorCode = ((FileListener)nextListener).doErrorReturn(iChangeType, iErrorCode); nextListener.setEnabledListener(bOldState); nextListener = nextListener.getNextEnabledListener(); } iErrorCode = this.doErrorReturn(iChangeType, iErrorCode); return iErrorCode; } /**
/** * Called when a error happens on a file operation, return the errorcode, or fix the problem. * @param iChangeType The type of change that occurred. * @param iErrorCode The error code encountered on the file operation. * @return The new error code, or return the original code if you can't fix it. */ public int handleErrorReturn(int iChangeType, int iErrorCode) // init this field override for other value { BaseListener nextListener = this.getNextEnabledListener(); while (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Don't allow it to be called again iErrorCode = ((FileListener)nextListener).doErrorReturn(iChangeType, iErrorCode); nextListener.setEnabledListener(bOldState); nextListener = nextListener.getNextEnabledListener(); } iErrorCode = this.doErrorReturn(iChangeType, iErrorCode); return iErrorCode; } /**
return super.doErrorReturn(iChangeType, iErrorCode);
return super.doErrorReturn(iChangeType, iErrorCode);
return super.doErrorReturn(iChangeType, iErrorCode);
/** * Called when a error happens on a file operation, return the error code, or fix the problem. * @param changeType The type of change that occurred. * @param iErrorCode The error code from the previous listener. * @return The new error code. */ public int doErrorReturn(int iChangeType, int iErrorCode) // init this field override for other value { if (iChangeType == DBConstants.AFTER_UPDATE_TYPE) if (this.isModLockMode()) { if (this.getOwner().getTable().getCurrentTable() == this.getOwner().getTable()) { // Must be the top-level record to do the merge. Otherwise, return an error and let the current record handle the merge boolean bRunMergeCode = false; if ((this.getOwner().getMasterSlave() & RecordOwner.MASTER) != 0) if ((this.getOwner().getDatabaseType() & DBConstants.SERVER_REWRITES) == 0) bRunMergeCode = true; // Typically refresh in the client so listeners can be run if ((this.getOwner().getMasterSlave() & RecordOwner.SLAVE) != 0) if ((this.getOwner().getDatabaseType() & DBConstants.SERVER_REWRITES) != 0) bRunMergeCode = true; // Unless server rewrite is set, then do the rewrite in the server if (bRunMergeCode) return this.refreshMergeAndRewrite(iErrorCode); // Only do this in the master and shared code } } return super.doErrorReturn(iChangeType, iErrorCode); } /**
/** * Called when a error happens on a file operation, return the error code, or fix the problem. * @param changeType The type of change that occurred. * @param iErrorCode The error code from the previous listener. * @return The new error code. */ public int doErrorReturn(int iChangeType, int iErrorCode) // init this field override for other value { if (iChangeType == DBConstants.AFTER_UPDATE_TYPE) if (this.isModLockMode()) { if (this.getOwner().getTable().getCurrentTable() == this.getOwner().getTable()) { // Must be the top-level record to do the merge. Otherwise, return an error and let the current record handle the merge boolean bRunMergeCode = false; if ((this.getOwner().getMasterSlave() & RecordOwner.MASTER) != 0) if ((this.getOwner().getDatabaseType() & DBConstants.SERVER_REWRITES) == 0) bRunMergeCode = true; // Typically refresh in the client so listeners can be run if ((this.getOwner().getMasterSlave() & RecordOwner.SLAVE) != 0) if ((this.getOwner().getDatabaseType() & DBConstants.SERVER_REWRITES) != 0) bRunMergeCode = true; // Unless server rewrite is set, then do the rewrite in the server if (bRunMergeCode) return this.refreshMergeAndRewrite(iErrorCode); // Only do this in the master and shared code } } return super.doErrorReturn(iChangeType, iErrorCode); } /**
/** * Called when a error happens on a file operation, return the error code, or fix the problem. * @param changeType The type of change that occurred. * @param iErrorCode The error code from the previous listener. * @return The new error code. */ public int doErrorReturn(int iChangeType, int iErrorCode) // init this field override for other value { if (iChangeType == DBConstants.AFTER_UPDATE_TYPE) if (this.isModLockMode()) { if (this.getOwner().getTable().getCurrentTable() == this.getOwner().getTable()) { // Must be the top-level record to do the merge. Otherwise, return an error and let the current record handle the merge boolean bRunMergeCode = false; if ((this.getOwner().getMasterSlave() & RecordOwner.MASTER) != 0) if ((this.getOwner().getDatabaseType() & DBConstants.SERVER_REWRITES) == 0) bRunMergeCode = true; // Typically refresh in the client so listeners can be run if ((this.getOwner().getMasterSlave() & RecordOwner.SLAVE) != 0) if ((this.getOwner().getDatabaseType() & DBConstants.SERVER_REWRITES) != 0) bRunMergeCode = true; // Unless server rewrite is set, then do the rewrite in the server if (bRunMergeCode) return this.refreshMergeAndRewrite(iErrorCode); // Only do this in the master and shared code } } return super.doErrorReturn(iChangeType, iErrorCode); } /**