public class SQLRunner extends java.lang.Object implements FixedLoggers
APPLOGGER, CRONTASKLOGGER, CRONTASKMGRLOGGER, CRONTASKMGRSQLLOGGER, DBCONNECTIONLOGGER, DDLOGGER, DMLOGGER, EVENTLOGGER, EXCEPTIONLOGGER, MAILLOGGER, MAXIMOLOGGER, MTLOGGER, NULLMBOPOINTER, SECURITY, SENDFAILEDLOGGER, SERVICELOGGER, SQLLOGGER
appenderPrefix, LOGGERNAME_APP, LOGGERNAME_CRONTASK, LOGGERNAME_CRONTASKMGR, LOGGERNAME_DBCONNECTION, LOGGERNAME_DD, LOGGERNAME_DM, LOGGERNAME_DMPREVIEW, LOGGERNAME_EVENT, LOGGERNAME_EXCEPTION, LOGGERNAME_MAIL, LOGGERNAME_MAXIMO, LOGGERNAME_MT, LOGGERNAME_NULLMBOPOINTER, LOGGERNAME_SECURITY, LOGGERNAME_SENDFAILED, LOGGERNAME_SERVICE, LOGGERNAME_SQL, LOGGERNAME_SQL_CRONTASKMGR, LOGGERNAME_TXN, loggerPrefix
Constructor and Description |
---|
SQLRunner() |
Modifier and Type | Method and Description |
---|---|
static long |
ensureSequenceIsGreaterThanLargestValue(java.lang.String tablename,
java.lang.String fieldName,
UserInfo userInfo)
This process reads the next sequence value for tableName.columnName and compares it to the current max(tableName.sequenceName).
|
static int |
executeSql(java.lang.String sql,
UserInfo userInfo) |
static <T> T |
executeSqlReturnFirstResult(UserInfo userInfo,
java.lang.String sql,
java.lang.Object... args) |
static long |
nextSequenceValue(UserInfo userInfo,
java.lang.String tableName,
java.lang.String fieldName)
Return the next sequence value for a table.column
|
public static int executeSql(java.lang.String sql, UserInfo userInfo) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public static <T> T executeSqlReturnFirstResult(UserInfo userInfo, java.lang.String sql, java.lang.Object... args) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public static long ensureSequenceIsGreaterThanLargestValue(java.lang.String tablename, java.lang.String fieldName, UserInfo userInfo) throws MXException, java.rmi.RemoteException
tablename
- fieldName
- userInfo
- MXException
java.rmi.RemoteException
public static long nextSequenceValue(UserInfo userInfo, java.lang.String tableName, java.lang.String fieldName) throws java.rmi.RemoteException, MXException
userInfo
- tableName
- fieldName
- java.rmi.RemoteException
MXException