flux.database
Interface DatabaseTrigger

All Superinterfaces:
Action, java.lang.Cloneable, DatabaseAction, RuntimeDataMap, java.io.Serializable, Trigger

public interface DatabaseTrigger
extends DatabaseAction, Trigger

Detects business exceptions in a database. By definition, a database exception occurs if a configured database query returns one or more rows, the first of which satisfies a specified exception condition.

Author:
Copyright 2000-2008 Flux Corporation. All rights reserved.

Nested Class Summary
static class DatabaseTrigger.Database_Trigger_Result
          Deprecated. Use DatabaseExceptionActionResult instead. Deprecated in Flux 7.2. Will be removed in Flux 8.0.
static class DatabaseTrigger.DatabaseTriggerResult
          The result when a database exception action runs.
 
Method Summary
 java.lang.Object getArgument(int parameterIndex)
          Returns the specified database query argument corresponding to the database query's parameter list.
 int getArgumentCount()
          Returns the number of query arguments in the database query.
 java.math.BigDecimal getBigDecimalArgument(int parameterIndex)
          Returns the specified argument, as a BigDecimal, from database query's argument list.
 byte[] getBytesArgument(int parameterIndex)
          Returns the specified argument, as an array of bytes, from database query's argument list.
 java.sql.Date getDateArgument(int parameterIndex)
          Returns the specified argument, as a Date, from database query's argument list.
 java.lang.Double getDoubleArgument(int parameterIndex)
          Returns the specified argument, as a Double, from database query's argument list.
 java.lang.String getExceptionCondition()
          Returns the expression that is tested to detect a business exception.
 java.lang.Float getFloatArgument(int parameterIndex)
          Returns the specified argument, as a Float, from database query's argument list.
 java.lang.Integer getIntegerArgument(int parameterIndex)
          Returns the specified argument, as an Integer, from database query's argument list.
 java.lang.Long getLongArgument(int parameterIndex)
          Returns the specified argument, as a Long, from database query's argument list.
 java.lang.String getQuery()
          Returns the database query that is used to detect business exceptions in the database.
 java.lang.Short getShortArgument(int parameterIndex)
          Returns the specified argument, as a Short, from database query's argument list.
 java.lang.String getStringArgument(int parameterIndex)
          Returns the specified argument, as a String, from database query's argument list.
 java.sql.Time getTimeArgument(int parameterIndex)
          Returns the specified argument, as a Time, from database query's argument list.
 java.sql.Timestamp getTimestampArgument(int parameterIndex)
          Returns the specified argument, as a Timestamp, from database query's argument list.
 boolean isNullArgument(int parameterIndex)
          Indicates whether the specified database query argument corresponding to the database query's parameter list is null.
 void setArgument(int parameterIndex, java.lang.Object argument)
          Sets the specified database query argument in the database query's parameter list.
 void setBigDecimalArgument(int parameterIndex, java.math.BigDecimal argument)
          Sets the specified argument as a BigDecimal into the database query's argument list.
 void setBytesArgument(int parameterIndex, byte[] argument)
          Sets the specified argument as a byte array into the database query's argument list.
 void setDateArgument(int parameterIndex, java.sql.Date argument)
          Sets the specified argument as a Date into the database query's argument list.
 void setDoubleArgument(int parameterIndex, double argument)
          Sets the specified argument as a double into the database query's argument list.
 void setExceptionCondition(java.lang.String exceptionCondition)
          Sets the expression that is tested to detect a business exception.
 void setFloatArgument(int parameterIndex, float argument)
          Sets the specified argument as a float into the database query's argument list.
 void setIntegerArgument(int parameterIndex, int argument)
          Sets the specified argument as an integer into the database query's argument list.
 void setLongArgument(int parameterIndex, long argument)
          Sets the specified argument as a long into the database query's argument list.
 void setNullArgument(int parameterIndex)
          Sets the specified argument to null in the database query's argument list.
 void setQuery(java.lang.String query)
          Sets the database query that is used to detect business exceptions in the database.
 void setShortArgument(int parameterIndex, short argument)
          Sets the specified argument as a short into the database query's argument list.
 void setStringArgument(int parameterIndex, java.lang.String argument)
          Sets the specified argument as a String into the database query's argument list.
 void setTimeArgument(int parameterIndex, java.sql.Time argument)
          Sets the specified argument as a Time into the database query's argument list.
 void setTimestampArgument(int parameterIndex, java.sql.Timestamp argument)
          Sets the specified argument as a Timestamp into the database query's argument list.
 
Methods inherited from interface flux.database.DatabaseAction
getBuiltinDatabaseConnection, getDataSource, getDataSourceInitialContextFactory, getDataSourceInitialContextPassword, getDataSourceInitialContextProviderUrl, getDataSourceInitialContextUsername, getDataSourcePassword, getDataSourceUsername, getJdbcDriver, getJdbcPassword, getJdbcUrl, getJdbcUsername, setBuiltinDatabaseConnection, setDataSource, setDataSourceInitialContextFactory, setDataSourceInitialContextPassword, setDataSourceInitialContextProviderUrl, setDataSourceInitialContextUsername, setDataSourcePassword, setDataSourceUsername, setJdbcDriver, setJdbcPassword, setJdbcUrl, setJdbcUsername
 
Methods inherited from interface flux.Action
addFlow, addFlow, addSignalFlow, clone, getFlows, getHiddenVariableNames, getJoinExpression, getName, getPostscript, getPostscriptLanguage, getPrescript, getPrescriptLanguage, getResultInfo, getSignalsToMonitor, getTimeoutBusinessInterval, getTimeoutExpression, getVariableManager, isEndOfRun, isJoinPoint, isSkippable, isStartAction, isStartOfRun, isTransactionBreak, removeFlow, reset, setElseFlow, setEndOfRun, setErrorFlow, setErrorFlowWithoutRollback, setErrorFlowWithRollback, setJoinExpression, setJoinPoint, setName, setPostscript, setPostscriptLanguage, setPrescript, setPrescriptLanguage, setSignalsToMonitor, setSkippable, setStartAction, setStartOfRun, setTimeoutBusinessInterval, setTimeoutExpression, setTimeoutFlow, setTransactionBreak, verify, verifyOnClient
 
Methods inherited from interface flux.runtimedatamap.RuntimeDataMap
getRuntimeDataMap, setRuntimeDataMap
 

Method Detail

getArgument

public java.lang.Object getArgument(int parameterIndex)
                             throws EngineException
Returns the specified database query argument corresponding to the database query's parameter list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

getArgumentCount

public int getArgumentCount()
Returns the number of query arguments in the database query.

Returns:
The number of query arguments in the database query.

getBigDecimalArgument

public java.math.BigDecimal getBigDecimalArgument(int parameterIndex)
Returns the specified argument, as a BigDecimal, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
java.lang.IllegalArgumentException - If the argument is not a BigDecimal.

getBytesArgument

public byte[] getBytesArgument(int parameterIndex)
                        throws EngineException
Returns the specified argument, as an array of bytes, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the argument is not an array of bytes.

getDateArgument

public java.sql.Date getDateArgument(int parameterIndex)
                              throws EngineException
Returns the specified argument, as a Date, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the argument is not a Date.

getDoubleArgument

public java.lang.Double getDoubleArgument(int parameterIndex)
Returns the specified argument, as a Double, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
java.lang.IllegalArgumentException - If the argument is not a Double.

getExceptionCondition

public java.lang.String getExceptionCondition()
Returns the expression that is tested to detect a business exception. The syntax for exception conditions is contained in the Flux User Manual.

Returns:
The expression that is tested to detect a business exception.

getFloatArgument

public java.lang.Float getFloatArgument(int parameterIndex)
                                 throws EngineException
Returns the specified argument, as a Float, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the argument is not a Float.

getIntegerArgument

public java.lang.Integer getIntegerArgument(int parameterIndex)
                                     throws EngineException
Returns the specified argument, as an Integer, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the argument is not an Integer.

getLongArgument

public java.lang.Long getLongArgument(int parameterIndex)
                               throws EngineException
Returns the specified argument, as a Long, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the argument is not an Long.

getQuery

public java.lang.String getQuery()
Returns the database query that is used to detect business exceptions in the database. The exception condition is tested using the results of this database query in order to detect business exceptions.

Returns:
The database query that is used to detect business exceptions in the database.

getShortArgument

public java.lang.Short getShortArgument(int parameterIndex)
                                 throws EngineException
Returns the specified argument, as a Short, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
java.lang.IllegalArgumentException - If the argument is not an Short.
EngineException

getStringArgument

public java.lang.String getStringArgument(int parameterIndex)
                                   throws EngineException
Returns the specified argument, as a String, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the argument is not an String.

getTimeArgument

public java.sql.Time getTimeArgument(int parameterIndex)
                              throws EngineException
Returns the specified argument, as a Time, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the argument is not an Time.

getTimestampArgument

public java.sql.Timestamp getTimestampArgument(int parameterIndex)
                                        throws EngineException
Returns the specified argument, as a Timestamp, from database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
The specified argument from database query's argument list.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the argument is not an Timestamp.

isNullArgument

public boolean isNullArgument(int parameterIndex)
                       throws EngineException
Indicates whether the specified database query argument corresponding to the database query's parameter list is null.

Parameters:
parameterIndex - 0-based parameter index.
Returns:
Whether the specified database query argument corresponding to the database query's parameter list is null.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setArgument

public void setArgument(int parameterIndex,
                        java.lang.Object argument)
                 throws EngineException
Sets the specified database query argument in the database query's parameter list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setBigDecimalArgument

public void setBigDecimalArgument(int parameterIndex,
                                  java.math.BigDecimal argument)
                           throws EngineException
Sets the specified argument as a BigDecimal into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setBytesArgument

public void setBytesArgument(int parameterIndex,
                             byte[] argument)
                      throws EngineException
Sets the specified argument as a byte array into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setDateArgument

public void setDateArgument(int parameterIndex,
                            java.sql.Date argument)
                     throws EngineException
Sets the specified argument as a Date into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setDoubleArgument

public void setDoubleArgument(int parameterIndex,
                              double argument)
                       throws EngineException
Sets the specified argument as a double into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setExceptionCondition

public void setExceptionCondition(java.lang.String exceptionCondition)
Sets the expression that is tested to detect a business exception. The syntax for exception conditions is contained in the Flux End Users Manual.

Parameters:
exceptionCondition - The expression that is tested to detect a business exception.

setFloatArgument

public void setFloatArgument(int parameterIndex,
                             float argument)
                      throws EngineException
Sets the specified argument as a float into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setIntegerArgument

public void setIntegerArgument(int parameterIndex,
                               int argument)
                        throws EngineException
Sets the specified argument as an integer into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setLongArgument

public void setLongArgument(int parameterIndex,
                            long argument)
                     throws EngineException
Sets the specified argument as a long into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setNullArgument

public void setNullArgument(int parameterIndex)
                     throws EngineException
Sets the specified argument to null in the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index
Throws:
EngineException - If a system error occurs.

setQuery

public void setQuery(java.lang.String query)
Sets the database query that is used to detect business exceptions in the database. The exception condition is tested using the results of this database query in order to detect business exceptions.

Parameters:
query - The database query that is used to detect business exceptions in the database.

setShortArgument

public void setShortArgument(int parameterIndex,
                             short argument)
                      throws EngineException
Sets the specified argument as a short into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setStringArgument

public void setStringArgument(int parameterIndex,
                              java.lang.String argument)
                       throws EngineException
Sets the specified argument as a String into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setTimeArgument

public void setTimeArgument(int parameterIndex,
                            java.sql.Time argument)
                     throws EngineException
Sets the specified argument as a Time into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.

setTimestampArgument

public void setTimestampArgument(int parameterIndex,
                                 java.sql.Timestamp argument)
                          throws EngineException
Sets the specified argument as a Timestamp into the database query's argument list.

Parameters:
parameterIndex - 0-based parameter index.
argument - The database query argument.
Throws:
EngineException - If a system error occurs.
java.lang.IllegalArgumentException - If the parameter index meets or exceeds the argument count.


© 2000-2008 Flux Corporation. All rights reserved.