From 533b9fd8cb3c04789fbe65ac659576b09832246f Mon Sep 17 00:00:00 2001 From: Nopock Date: Wed, 8 Mar 2023 21:53:41 -0800 Subject: [PATCH] Implemented optional debugging would not 100% recommend not quite sure if it works --- .../org/hyrical/store/DataStoreController.kt | 85 +++++++++++++------ src/main/kotlin/org/hyrical/store/Storable.kt | 2 +- .../store/connection/DatabaseConnection.kt | 2 +- .../connection/flatfile/FlatFileConnection.kt | 2 +- .../store/connection/mongo/MongoConnection.kt | 2 +- .../mongo/details/AbstractMongoDetail.kt | 2 +- .../mongo/details/impl/AuthMongoDetails.kt | 2 +- .../mongo/details/impl/NoAuthMongoDetails.kt | 2 +- .../mongo/details/impl/URIMongoDetails.kt | 2 +- .../store/connection/redis/RedisConnection.kt | 2 +- .../redis/details/AbstractRedisDetail.kt | 2 +- .../redis/details/impl/AuthRedisDetails.kt | 2 +- .../redis/details/impl/NoAuthRedisDetails.kt | 2 +- .../debugging/RepositoryDebuggingHandler.kt | 51 +++++++++++ .../store/repository/AsyncRepository.kt | 2 +- .../store/repository/CoroutineRepository.kt | 2 +- .../store/repository/ReactiveRepository.kt | 2 +- .../hyrical/store/repository/Repository.kt | 2 +- .../impl/flatfile/AsyncFlatFileRepository.kt | 4 +- .../flatfile/CoroutineFlatFileRepository.kt | 2 +- .../impl/flatfile/FlatFileRepository.kt | 2 +- .../flatfile/ReactiveFlatFileRepository.kt | 4 +- .../impl/mongodb/AsyncMongoRepository.kt | 2 +- .../impl/mongodb/CoroutineMongoRepository.kt | 2 +- .../impl/mongodb/MongoRepository.kt | 2 +- .../impl/mongodb/ReactiveMongoRepository.kt | 2 +- .../impl/redis/AsyncRedisRepository.kt | 2 +- .../impl/redis/CoroutineRedisRepository.kt | 2 +- .../impl/redis/ReactiveRedisRepository.kt | 2 +- .../repository/impl/redis/RedisRepository.kt | 2 +- .../hyrical/store/serializers/Serializer.kt | 2 +- .../hyrical/store/serializers/Serializers.kt | 2 +- .../store/serializers/impl/GsonSerializer.kt | 2 +- .../org/hyrical/store/type/StorageType.kt | 2 +- .../store/tests/flatfile/FlatFileTests.kt | 7 +- .../org/hyrical/store/tests/obj/UserTest.kt | 2 +- 36 files changed, 151 insertions(+), 62 deletions(-) create mode 100644 src/main/kotlin/org/hyrical/store/debugging/RepositoryDebuggingHandler.kt diff --git a/src/main/kotlin/org/hyrical/store/DataStoreController.kt b/src/main/kotlin/org/hyrical/store/DataStoreController.kt index 9e59251..e5dc130 100644 --- a/src/main/kotlin/org/hyrical/store/DataStoreController.kt +++ b/src/main/kotlin/org/hyrical/store/DataStoreController.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,11 +26,14 @@ package org.hyrical.store import com.google.common.collect.HashBasedTable import org.hyrical.store.connection.DatabaseConnection +import org.hyrical.store.debugging.RepositoryDebuggingHandler import org.hyrical.store.repository.AsyncRepository import org.hyrical.store.repository.CoroutineRepository import org.hyrical.store.repository.ReactiveRepository import org.hyrical.store.repository.Repository import org.hyrical.store.type.StorageType +import java.lang.reflect.Proxy +import java.util.logging.Logger /** * The object that handles creating new [Repository]'s and @@ -45,7 +48,9 @@ import org.hyrical.store.type.StorageType class DataStoreController( private val type: StorageType, val classType: Class, - val connection: DatabaseConnection<*, *>? + val connection: DatabaseConnection<*, *>, + private val debug: Boolean, + private val logger: Logger? ) { init { @@ -76,56 +81,86 @@ class DataStoreController( * the specified [StorageType] * * @param [type] An objects that implements [Storable] (The type of data to be stored) + * @param [connection] the specified [DatabaseConnection] for the right repository + * @param [debug] If we should log debug statistics (defaulted to false) + * @param [logger] The logger to use for debugging only provide if [debug] is true * * @see [DataStoreController] */ inline fun of( type: StorageType, - connection: DatabaseConnection<*, *>? = null + connection: DatabaseConnection<*, *>, + debug: Boolean = false, + logger: Logger? = null ): DataStoreController { - return DataStoreController(type, T::class.java, connection) + return DataStoreController(type, T::class.java, connection, debug, logger) } @JvmStatic fun of( type: StorageType, t: Class, - connection: DatabaseConnection<*, *>? = null + connection: DatabaseConnection<*, *>, + debug: Boolean = false, + logger: Logger? = null ): DataStoreController { - return DataStoreController(type, t, connection) + return DataStoreController(type, t, connection, debug, logger) } } - // We do this lazy cause maybe they don't use a repo only async or reactive val repository: Repository by lazy { - type.build(this, connection) + val objType = type.build(this, connection) + + if (debug) { + return@lazy Proxy.newProxyInstance( + objType.javaClass.classLoader, + objType.javaClass.interfaces, + RepositoryDebuggingHandler(objType, logger!!) + ) as Repository + } + + return@lazy objType } val asyncRepository: AsyncRepository by lazy { - type.buildAsync(this, connection) + val objType = type.buildAsync(this, connection) + + if (debug) { + return@lazy Proxy.newProxyInstance( + objType.javaClass.classLoader, + objType.javaClass.interfaces, + RepositoryDebuggingHandler(objType, logger!!) + ) as AsyncRepository + } + + return@lazy objType } val reactiveRepository: ReactiveRepository by lazy { - type.buildReactive(this, connection) + val objType = type.buildReactive(this, connection) + + if (debug) { + return@lazy Proxy.newProxyInstance( + objType.javaClass.classLoader, + objType.javaClass.interfaces, + RepositoryDebuggingHandler(objType, logger!!) + ) as ReactiveRepository + } + + return@lazy objType } val coroutineRepository: CoroutineRepository by lazy { - type.buildCoroutine(this, connection) - } + val objType = type.buildCoroutine(this, connection) - var directory: String = "" - - /** - * Sets the directory to be used when persisting data - * with the [StorageType.FLAT_FILE] - * - * @param [directory] The directory to be used. - */ - fun bindFlatFileDirectory(directory: String) { - if (type == StorageType.FLAT_FILE) { - this.directory = directory - } else { - throw UnsupportedOperationException("You attempted to bind a flat file directory to a non flat file DataStoreController!!") + if (debug) { + return@lazy Proxy.newProxyInstance( + objType.javaClass.classLoader, + objType.javaClass.interfaces, + RepositoryDebuggingHandler(objType, logger!!) + ) as CoroutineRepository } + + return@lazy objType } } diff --git a/src/main/kotlin/org/hyrical/store/Storable.kt b/src/main/kotlin/org/hyrical/store/Storable.kt index 26d4e5d..7af542b 100644 --- a/src/main/kotlin/org/hyrical/store/Storable.kt +++ b/src/main/kotlin/org/hyrical/store/Storable.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/DatabaseConnection.kt b/src/main/kotlin/org/hyrical/store/connection/DatabaseConnection.kt index d534e87..2ca0f51 100644 --- a/src/main/kotlin/org/hyrical/store/connection/DatabaseConnection.kt +++ b/src/main/kotlin/org/hyrical/store/connection/DatabaseConnection.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/flatfile/FlatFileConnection.kt b/src/main/kotlin/org/hyrical/store/connection/flatfile/FlatFileConnection.kt index 3844dad..120854e 100644 --- a/src/main/kotlin/org/hyrical/store/connection/flatfile/FlatFileConnection.kt +++ b/src/main/kotlin/org/hyrical/store/connection/flatfile/FlatFileConnection.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/mongo/MongoConnection.kt b/src/main/kotlin/org/hyrical/store/connection/mongo/MongoConnection.kt index 7ec30c9..f691e9e 100644 --- a/src/main/kotlin/org/hyrical/store/connection/mongo/MongoConnection.kt +++ b/src/main/kotlin/org/hyrical/store/connection/mongo/MongoConnection.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/mongo/details/AbstractMongoDetail.kt b/src/main/kotlin/org/hyrical/store/connection/mongo/details/AbstractMongoDetail.kt index 58a1afa..277d3a8 100644 --- a/src/main/kotlin/org/hyrical/store/connection/mongo/details/AbstractMongoDetail.kt +++ b/src/main/kotlin/org/hyrical/store/connection/mongo/details/AbstractMongoDetail.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/AuthMongoDetails.kt b/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/AuthMongoDetails.kt index a5bdaea..57b7113 100644 --- a/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/AuthMongoDetails.kt +++ b/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/AuthMongoDetails.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/NoAuthMongoDetails.kt b/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/NoAuthMongoDetails.kt index a7f0cd1..377dea9 100644 --- a/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/NoAuthMongoDetails.kt +++ b/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/NoAuthMongoDetails.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/URIMongoDetails.kt b/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/URIMongoDetails.kt index 35f64a2..c98570e 100644 --- a/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/URIMongoDetails.kt +++ b/src/main/kotlin/org/hyrical/store/connection/mongo/details/impl/URIMongoDetails.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/redis/RedisConnection.kt b/src/main/kotlin/org/hyrical/store/connection/redis/RedisConnection.kt index 5033dd4..42b301a 100644 --- a/src/main/kotlin/org/hyrical/store/connection/redis/RedisConnection.kt +++ b/src/main/kotlin/org/hyrical/store/connection/redis/RedisConnection.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/redis/details/AbstractRedisDetail.kt b/src/main/kotlin/org/hyrical/store/connection/redis/details/AbstractRedisDetail.kt index d0f0225..2345f53 100644 --- a/src/main/kotlin/org/hyrical/store/connection/redis/details/AbstractRedisDetail.kt +++ b/src/main/kotlin/org/hyrical/store/connection/redis/details/AbstractRedisDetail.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/redis/details/impl/AuthRedisDetails.kt b/src/main/kotlin/org/hyrical/store/connection/redis/details/impl/AuthRedisDetails.kt index 2d0b785..f24ead5 100644 --- a/src/main/kotlin/org/hyrical/store/connection/redis/details/impl/AuthRedisDetails.kt +++ b/src/main/kotlin/org/hyrical/store/connection/redis/details/impl/AuthRedisDetails.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/connection/redis/details/impl/NoAuthRedisDetails.kt b/src/main/kotlin/org/hyrical/store/connection/redis/details/impl/NoAuthRedisDetails.kt index 7f18c10..a7bab56 100644 --- a/src/main/kotlin/org/hyrical/store/connection/redis/details/impl/NoAuthRedisDetails.kt +++ b/src/main/kotlin/org/hyrical/store/connection/redis/details/impl/NoAuthRedisDetails.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/debugging/RepositoryDebuggingHandler.kt b/src/main/kotlin/org/hyrical/store/debugging/RepositoryDebuggingHandler.kt new file mode 100644 index 0000000..8a513a8 --- /dev/null +++ b/src/main/kotlin/org/hyrical/store/debugging/RepositoryDebuggingHandler.kt @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 Nathan + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package org.hyrical.store.debugging + +import java.lang.reflect.InvocationHandler +import java.lang.reflect.Method +import java.util.logging.Logger + +class RepositoryDebuggingHandler(private val target: Any, private val logger: Logger) : InvocationHandler { + + private val methods = mutableMapOf() + + init { + for (method in target.javaClass.declaredMethods) { + methods[method.name] = method + } + } + override fun invoke(proxy: Any?, method: Method?, args: Array?): Any { + method?.let { + val startTime = System.currentTimeMillis() + val result = methods[it.name]?.invoke(target, *(args ?: emptyArray())) + + logger.info("It took ${System.currentTimeMillis() - startTime} ms to execute ${it.name} on the ${target.javaClass.simpleName} class.") + + return result!! + } ?: throw IllegalArgumentException("Method parameter is null.") + } + +} diff --git a/src/main/kotlin/org/hyrical/store/repository/AsyncRepository.kt b/src/main/kotlin/org/hyrical/store/repository/AsyncRepository.kt index 1eafe9b..b98fea6 100644 --- a/src/main/kotlin/org/hyrical/store/repository/AsyncRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/AsyncRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/CoroutineRepository.kt b/src/main/kotlin/org/hyrical/store/repository/CoroutineRepository.kt index 543f317..a81f9c0 100644 --- a/src/main/kotlin/org/hyrical/store/repository/CoroutineRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/CoroutineRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/ReactiveRepository.kt b/src/main/kotlin/org/hyrical/store/repository/ReactiveRepository.kt index 841f706..39c9cc0 100644 --- a/src/main/kotlin/org/hyrical/store/repository/ReactiveRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/ReactiveRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/Repository.kt b/src/main/kotlin/org/hyrical/store/repository/Repository.kt index 743498a..c566269 100644 --- a/src/main/kotlin/org/hyrical/store/repository/Repository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/Repository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/AsyncFlatFileRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/AsyncFlatFileRepository.kt index 7d4efaa..75123c9 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/AsyncFlatFileRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/AsyncFlatFileRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,7 +36,7 @@ import java.util.concurrent.CompletableFuture class AsyncFlatFileRepository(controller: DataStoreController, val connection: FlatFileConnection) : AsyncRepository { - val file: File = File(controller.directory, controller.classType.simpleName + ".json").also { + val file: File = File(connection.directory, controller.classType.simpleName + ".json").also { if (!it.exists()) it.createNewFile() } diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/CoroutineFlatFileRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/CoroutineFlatFileRepository.kt index 2b89a96..906d8cc 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/CoroutineFlatFileRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/CoroutineFlatFileRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/FlatFileRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/FlatFileRepository.kt index f68ce89..3e02707 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/FlatFileRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/FlatFileRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/ReactiveFlatFileRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/ReactiveFlatFileRepository.kt index 558b028..82ff689 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/ReactiveFlatFileRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/flatfile/ReactiveFlatFileRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -37,7 +37,7 @@ import java.io.File class ReactiveFlatFileRepository(controller: DataStoreController, val connection: FlatFileConnection) : ReactiveRepository { - val file: File = File(controller.directory, controller.classType.simpleName + ".json").also { + val file: File = File(connection.directory, controller.classType.simpleName + ".json").also { if (!it.exists()) it.createNewFile() } diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/AsyncMongoRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/AsyncMongoRepository.kt index 2fda750..1a1554f 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/AsyncMongoRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/AsyncMongoRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/CoroutineMongoRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/CoroutineMongoRepository.kt index 5ae830e..e5a4da5 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/CoroutineMongoRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/CoroutineMongoRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/MongoRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/MongoRepository.kt index 267919f..2862ec2 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/MongoRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/MongoRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/ReactiveMongoRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/ReactiveMongoRepository.kt index 0970d32..3161f51 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/ReactiveMongoRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/mongodb/ReactiveMongoRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/redis/AsyncRedisRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/redis/AsyncRedisRepository.kt index 02e0d8d..98f1fa8 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/redis/AsyncRedisRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/redis/AsyncRedisRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/redis/CoroutineRedisRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/redis/CoroutineRedisRepository.kt index 44d515d..c3f08f9 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/redis/CoroutineRedisRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/redis/CoroutineRedisRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/redis/ReactiveRedisRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/redis/ReactiveRedisRepository.kt index 53710fd..3d1bdbc 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/redis/ReactiveRedisRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/redis/ReactiveRedisRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/repository/impl/redis/RedisRepository.kt b/src/main/kotlin/org/hyrical/store/repository/impl/redis/RedisRepository.kt index 7e01f90..25ab3ec 100644 --- a/src/main/kotlin/org/hyrical/store/repository/impl/redis/RedisRepository.kt +++ b/src/main/kotlin/org/hyrical/store/repository/impl/redis/RedisRepository.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/serializers/Serializer.kt b/src/main/kotlin/org/hyrical/store/serializers/Serializer.kt index 78d0bc5..ab51dff 100644 --- a/src/main/kotlin/org/hyrical/store/serializers/Serializer.kt +++ b/src/main/kotlin/org/hyrical/store/serializers/Serializer.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/serializers/Serializers.kt b/src/main/kotlin/org/hyrical/store/serializers/Serializers.kt index 0eaf4ad..8e70fa1 100644 --- a/src/main/kotlin/org/hyrical/store/serializers/Serializers.kt +++ b/src/main/kotlin/org/hyrical/store/serializers/Serializers.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/serializers/impl/GsonSerializer.kt b/src/main/kotlin/org/hyrical/store/serializers/impl/GsonSerializer.kt index 6d661c3..b69ff40 100644 --- a/src/main/kotlin/org/hyrical/store/serializers/impl/GsonSerializer.kt +++ b/src/main/kotlin/org/hyrical/store/serializers/impl/GsonSerializer.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/kotlin/org/hyrical/store/type/StorageType.kt b/src/main/kotlin/org/hyrical/store/type/StorageType.kt index 029becd..e8725d8 100644 --- a/src/main/kotlin/org/hyrical/store/type/StorageType.kt +++ b/src/main/kotlin/org/hyrical/store/type/StorageType.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/kotlin/org/hyrical/store/tests/flatfile/FlatFileTests.kt b/src/test/kotlin/org/hyrical/store/tests/flatfile/FlatFileTests.kt index 873fc80..af57d2a 100644 --- a/src/test/kotlin/org/hyrical/store/tests/flatfile/FlatFileTests.kt +++ b/src/test/kotlin/org/hyrical/store/tests/flatfile/FlatFileTests.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,6 +29,7 @@ import org.hyrical.store.connection.flatfile.FlatFileConnection import org.hyrical.store.tests.obj.UserTest import org.hyrical.store.type.StorageType import org.junit.jupiter.api.Test +import java.util.logging.Logger import kotlin.test.assertEquals class FlatFileTests { @@ -39,7 +40,9 @@ class FlatFileTests { FlatFileConnection( FlatFileTests::class.java.protectionDomain.codeSource.location.toURI().path, "flatfile_tests" - ) + ), + false, + Logger.getLogger("Flat-File-Test") ) } diff --git a/src/test/kotlin/org/hyrical/store/tests/obj/UserTest.kt b/src/test/kotlin/org/hyrical/store/tests/obj/UserTest.kt index b712d07..11d3c5e 100644 --- a/src/test/kotlin/org/hyrical/store/tests/obj/UserTest.kt +++ b/src/test/kotlin/org/hyrical/store/tests/obj/UserTest.kt @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Nathan Weisz + * Copyright (c) 2023 Nathan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal