Package com.anylogic.engine.database
- java.lang.Object
- com.anylogic.engine.database.UtilitiesDatabase
public class UtilitiesDatabase extends Object
Modifier and Type | Method | Description |
---|---|---|
static void | copyDatabaseTable | |
static void | copyDatabaseTable | |
static void | copyDatabaseTables | |
static void | exportTables | |
static String | getIdentifierQuoteString | |
static boolean | logIfNeeded |
Logs information to database
|
static boolean | logIfNeeded |
Logs information to database
|
static String | toStringDB | |
static String | trimTableName |
@AnyLogicInternalAPI public static String getIdentifierQuoteString(Connection connection)
@AnyLogicInternalAPI public static void exportTables(ProgressConsumer monitor, Connection sourceDatabase, Connection targetDatabase, Collection<String> sqlStatements, List<String> sourceNames)
@AnyLogicInternalAPI public static String trimTableName(String s)
@AnyLogicInternalAPI public static void copyDatabaseTables(ProgressConsumer monitor, Connection sourceConnection, Connection targetConnection, List<String> sourceTableNames, List<String> targetTableNames, boolean clearTargetTable, boolean autoCommit)
@AnyLogicInternalAPI public static void copyDatabaseTable(Connection sourceConnection, Connection targetConnection, String sourceTableName, String targetTableName)
@AnyLogicInternalAPI public static void copyDatabaseTable(Connection sourceConnection, Connection targetConnection, String sourceTableName, String targetTableName, boolean clearTargetTable, boolean autoCommit) throws SQLException
- Throws:
SQLException
@AnyLogicInternalAPI public static boolean logIfNeeded(Utilities agent, LoggingType loggingType, Supplier<ILogEntry> logEntrySupplier)
Logs information to database
- Returns:
true
if log entry has been created and processed,false
e.g. if logging settings don't allow logging
@AnyLogicInternalAPI public static boolean logIfNeeded(Utilities agent, LoggingType loggingType, boolean staticEntry, Supplier<ILogEntry> logEntrySupplier)
Logs information to database
- Parameters:
loggingType
- type of loggingstaticEntry
-true
if the log entry doesn't depend on a particular object instance (some structural entry, e.g. Agent type name)- Returns:
true
if log entry has been created and processed,false
e.g. if logging settings don't allow logging
public static String toStringDB(Object value)