Minor fixes
This commit is contained in:
parent
ae92d1a407
commit
5197be80f0
@ -14,7 +14,7 @@ public class AccessWhileInitializationException : IllegalStateException, Copyabl
|
|||||||
public val `object`: Any
|
public val `object`: Any
|
||||||
public val member: Any
|
public val member: Any
|
||||||
|
|
||||||
public constructor(scope: Any, `object`: Any, member: Any) : super() {
|
public constructor(scope: Any, `object`: Any, member: Any) : super(formatMessage(scope, `object`, member)) {
|
||||||
this.scope = scope
|
this.scope = scope
|
||||||
this.`object` = `object`
|
this.`object` = `object`
|
||||||
this.member = member
|
this.member = member
|
||||||
@ -32,7 +32,7 @@ public class AccessWhileInitializationException : IllegalStateException, Copyabl
|
|||||||
this.member = member
|
this.member = member
|
||||||
}
|
}
|
||||||
|
|
||||||
public constructor(scope: Any, `object`: Any, member: Any, cause: Throwable) : super(cause) {
|
public constructor(scope: Any, `object`: Any, member: Any, cause: Throwable) : super(formatMessage(scope, `object`, member), cause) {
|
||||||
this.scope = scope
|
this.scope = scope
|
||||||
this.`object` = `object`
|
this.`object` = `object`
|
||||||
this.member = member
|
this.member = member
|
||||||
|
@ -0,0 +1,55 @@
|
|||||||
|
package ru.landgrafhomyak.db.skeleton1.api.errors
|
||||||
|
|
||||||
|
import kotlin.jvm.JvmStatic
|
||||||
|
import kotlinx.coroutines.CopyableThrowable
|
||||||
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||||
|
import ru.landgrafhomyak.db.skeleton1.api.ReflectionApi
|
||||||
|
import ru.landgrafhomyak.db.skeleton1.api.statement.InputParam
|
||||||
|
import ru.landgrafhomyak.db.skeleton1.api.statement._Statement
|
||||||
|
|
||||||
|
@ReflectionApi
|
||||||
|
@OptIn(ExperimentalCoroutinesApi::class)
|
||||||
|
public class EntityDeletedException : IllegalStateException, CopyableThrowable<EntityDeletedException> {
|
||||||
|
public val entity: Any
|
||||||
|
|
||||||
|
public constructor(entity: Any) : super(formatMessage(entity)) {
|
||||||
|
this.entity = entity
|
||||||
|
}
|
||||||
|
|
||||||
|
public constructor(entity: Any, customMessage: String) : super(customMessage) {
|
||||||
|
this.entity = entity
|
||||||
|
}
|
||||||
|
|
||||||
|
public constructor(entity: Any, customMessage: String, cause: Throwable) : super(customMessage, cause) {
|
||||||
|
this.entity = entity
|
||||||
|
}
|
||||||
|
|
||||||
|
public constructor(entity: Any, cause: Throwable) : super(formatMessage(entity), cause) {
|
||||||
|
this.entity = entity
|
||||||
|
}
|
||||||
|
|
||||||
|
public constructor(
|
||||||
|
entity: Any,
|
||||||
|
message: String?,
|
||||||
|
cause: Throwable?,
|
||||||
|
@Suppress("unused", "LocalVariableName") _marker: Unit
|
||||||
|
) : super(message, cause) {
|
||||||
|
this.entity = entity
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun createCopy(): EntityDeletedException? {
|
||||||
|
return EntityDeletedException(
|
||||||
|
entity = this.entity,
|
||||||
|
message = this.message,
|
||||||
|
cause = this.cause,
|
||||||
|
_marker = Unit
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
public companion object {
|
||||||
|
@JvmStatic
|
||||||
|
public fun formatMessage(entity: Any): String =
|
||||||
|
"Attempt to access deleted $entity"
|
||||||
|
}
|
||||||
|
}
|
@ -43,26 +43,6 @@ public interface Module<mUE : Any> {
|
|||||||
@get:JvmName("getMemberSubmodules")
|
@get:JvmName("getMemberSubmodules")
|
||||||
public val memberSubmodules: Collection<Module<*>>
|
public val memberSubmodules: Collection<Module<*>>
|
||||||
|
|
||||||
@ReflectionApi
|
|
||||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
|
||||||
@get:JvmName("getMemberTablesWhileUpgrade")
|
|
||||||
public val memberTablesWhileUpgrade: Collection<Table<*, mUE>>
|
|
||||||
|
|
||||||
@ReflectionApi
|
|
||||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
|
||||||
@get:JvmName("getMemberObjectsWhileUpgrade")
|
|
||||||
public val memberObjectsWhileUpgrade: Collection<ModuleScopedObject<*, mUE>>
|
|
||||||
|
|
||||||
@ReflectionApi
|
|
||||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
|
||||||
@get:JvmName("getMemberSubmodulesWhileUpgrade")
|
|
||||||
public val memberSubmodulesWhileUpgrade: Collection<Module<*>>
|
|
||||||
|
|
||||||
@ReflectionApi
|
|
||||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
|
||||||
@get:JvmName("willBeDeletedAfterUpgrade")
|
|
||||||
public val willBeDeletedAfterUpgrade: Boolean
|
|
||||||
|
|
||||||
public interface Constructor<mUE : Any> {
|
public interface Constructor<mUE : Any> {
|
||||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||||
@get:JvmName("versionKey")
|
@get:JvmName("versionKey")
|
||||||
@ -85,9 +65,9 @@ public interface Module<mUE : Any> {
|
|||||||
|
|
||||||
public interface Template<@Suppress("unused") mUE : Any> {
|
public interface Template<@Suppress("unused") mUE : Any> {
|
||||||
@LowLevelApi
|
@LowLevelApi
|
||||||
public fun getConstructor(): Constructor<*>
|
public fun getConstructor(): Constructor<Any>
|
||||||
|
|
||||||
@LowLevelApi
|
@LowLevelApi
|
||||||
public fun getUpgrade(version: String): Upgrade<*, *>?
|
public fun getUpgrade(version: String): Upgrade<Any, Any>?
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -25,7 +25,7 @@ public interface ModuleConstructorScope<mUE : Any> {
|
|||||||
name: String, metadata: ObjectOperations.ImplementationsProvider<oUE>
|
name: String, metadata: ObjectOperations.ImplementationsProvider<oUE>
|
||||||
): ModuleScopedObject<oUE, mUE>
|
): ModuleScopedObject<oUE, mUE>
|
||||||
|
|
||||||
public fun <mUE : Any> substituteModule(rootNs: Namespace<mUE>, template: Module.Template<mUE>): Module<mUE>
|
public fun <smUE : Any> substituteModule(rootNs: Namespace<mUE>, template: Module.Template<smUE>): Module<smUE>
|
||||||
|
|
||||||
public fun namespace(parent: Namespace<mUE>, name: String): Namespace<mUE>
|
public fun namespace(parent: Namespace<mUE>, name: String): Namespace<mUE>
|
||||||
|
|
||||||
|
@ -20,9 +20,4 @@ public interface ModuleScopedObject<oUE : Any?, mUE : Any> {
|
|||||||
|
|
||||||
@ReflectionApi
|
@ReflectionApi
|
||||||
public val meta: ObjectOperations.ImplementationsProvider<oUE>
|
public val meta: ObjectOperations.ImplementationsProvider<oUE>
|
||||||
|
|
||||||
@ReflectionApi
|
|
||||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
|
||||||
@get:JvmName("willBeDeletedAfterUpgrade")
|
|
||||||
public val willBeDeletedAfterUpgrade: Boolean
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user