Package com.anylogic.engine.database
- java.lang.Object
-
- com.anylogic.engine.database.UtilitiesDatabase
public class UtilitiesDatabase
extends java.lang.Object
UtilitiesDatabase() |
|
Constructor | Description |
---|
static void |
copyDatabaseTable(java.sql.Connection sourceConnection,
java.sql.Connection targetConnection,
java.lang.String sourceTableName,
java.lang.String targetTableName) |
|
static void |
copyDatabaseTable(java.sql.Connection sourceConnection,
java.sql.Connection targetConnection,
java.lang.String sourceTableName,
java.lang.String targetTableName,
boolean clearTargetTable,
boolean autoCommit) |
|
static void |
copyDatabaseTables(ProgressConsumer monitor,
java.sql.Connection sourceConnection,
java.sql.Connection targetConnection,
java.util.List<java.lang.String> sourceTableNames,
java.util.List<java.lang.String> targetTableNames,
boolean clearTargetTable,
boolean autoCommit) |
|
static void |
exportTables(ProgressConsumer monitor,
java.sql.Connection sourceDatabase,
java.sql.Connection targetDatabase,
java.util.Collection<java.lang.String> sqlStatements,
java.util.List<java.lang.String> sourceNames) |
|
static java.lang.String |
getIdentifierQuoteString(java.sql.Connection connection) |
|
static boolean |
logIfNeeded(Utilities agent,
LoggingType loggingType,
boolean staticEntry,
java.util.function.Supplier<ILogEntry> logEntrySupplier) |
Logs information to database
|
static boolean |
logIfNeeded(Utilities agent,
LoggingType loggingType,
java.util.function.Supplier<ILogEntry> logEntrySupplier) |
Logs information to database
|
static java.lang.String |
toStringDB(java.lang.Object value) |
|
static java.lang.String |
trimTableName(java.lang.String s) |
|
Modifier and Type | Method | Description |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public UtilitiesDatabase()
@AnyLogicInternalAPI public static java.lang.String getIdentifierQuoteString(java.sql.Connection connection)
@AnyLogicInternalAPI public static void exportTables(ProgressConsumer monitor, java.sql.Connection sourceDatabase, java.sql.Connection targetDatabase, java.util.Collection<java.lang.String> sqlStatements, java.util.List<java.lang.String> sourceNames)
@AnyLogicInternalAPI public static java.lang.String trimTableName(java.lang.String s)
@AnyLogicInternalAPI public static void copyDatabaseTables(ProgressConsumer monitor, java.sql.Connection sourceConnection, java.sql.Connection targetConnection, java.util.List<java.lang.String> sourceTableNames, java.util.List<java.lang.String> targetTableNames, boolean clearTargetTable, boolean autoCommit)
@AnyLogicInternalAPI public static void copyDatabaseTable(java.sql.Connection sourceConnection, java.sql.Connection targetConnection, java.lang.String sourceTableName, java.lang.String targetTableName)
@AnyLogicInternalAPI public static void copyDatabaseTable(java.sql.Connection sourceConnection, java.sql.Connection targetConnection, java.lang.String sourceTableName, java.lang.String targetTableName, boolean clearTargetTable, boolean autoCommit) throws java.sql.SQLException
- Throws:
java.sql.SQLException
@AnyLogicInternalAPI public static boolean logIfNeeded(Utilities agent, LoggingType loggingType, java.util.function.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, java.util.function.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 java.lang.String toStringDB(java.lang.Object value)
-
How can we improve this article?
-