public class UtilitiesDatabase
extends java.lang.Object
Constructor and Description |
---|
UtilitiesDatabase() |
Modifier and Type | Method and 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 void |
generateQClasses(java.sql.Connection connection,
java.lang.String packageName,
java.lang.String targetFolder,
java.util.List<DatabaseCustomType> customTypes)
This method is internal and shouldn't be called by user.
|
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) |
@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
java.sql.SQLException
@AnyLogicInternalAPI public static boolean logIfNeeded(Utilities agent, LoggingType loggingType, java.util.function.Supplier<ILogEntry> logEntrySupplier)
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)
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)true
if log entry has been created and processed, false
e.g. if logging settings don't allow logging@AnyLogicInternalAPI public static void generateQClasses(java.sql.Connection connection, java.lang.String packageName, java.lang.String targetFolder, java.util.List<DatabaseCustomType> customTypes) throws java.sql.SQLException
customTypes
- Array of types. Each type is String[4] = {tableName, columnName, type=OPTION_LIST|CODE, typeName}java.sql.SQLException
public static java.lang.String toStringDB(java.lang.Object value)
Copyright © AnyLogic North America, LLC. All Rights Reserved.