forked from trueog/Staff-OG-Legacy
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af4b58360e | ||
|
|
2a0a539ebd
|
||
|
|
cd8d7ae893
|
||
|
|
923c3110a8 | ||
|
|
b77a9c5e1a | ||
|
|
e3feea4ce5 | ||
|
|
47ff07100c | ||
|
|
b5a15f362a | ||
|
|
47cfaf7496 | ||
|
|
17c1ff8d7b | ||
|
|
2e7f580a33 | ||
|
|
7afe680e40 | ||
|
|
946adb7f83 | ||
|
|
793ee7b24f | ||
|
|
748b5fd8b8 | ||
|
|
0cd5f83311 | ||
|
|
4d311c4b0d | ||
|
|
0f8beda54e | ||
|
|
938eda05e1 |
No files matched your search
@@ -0,0 +1 @@
|
||||
.gitea/CODEOWNERS linguist-detectable=false
|
||||
@@ -0,0 +1,3 @@
|
||||
# Pull requests request review from the eligible staff team(s).
|
||||
# One approval from either an Admin or Developer satisfies branch protection.
|
||||
* @trueog/Admins @trueog/Developers
|
||||
@@ -0,0 +1,3 @@
|
||||
[submodule "libs/Utilities-OG"]
|
||||
path = libs/Utilities-OG
|
||||
url = https://git.trueog.net/trueog/Utilities-OG
|
||||
@@ -1,5 +1,5 @@
|
||||
# Staff-OG
|
||||
Punishment system for TrueOG.
|
||||
Punishment system for [TrueOG Network](https://trueog.net).
|
||||
|
||||
## Commands and Permissions
|
||||
- /perm[ban/mute] <player> <reason> - staffog.command.perm[ban/mute]
|
||||
@@ -12,4 +12,4 @@ Punishment system for TrueOG.
|
||||
- staffog.panelaccess - allows a user to register for the web panel.
|
||||
- staffog.isstaff - user counts towards the staff counter on the panel.
|
||||
- staffog.paneladmin - user is given admin access, this only applicable during panel registration.
|
||||
- staffog.seebroadcast - allows a user to see non-public staff broadcasts (i.e. unban and unmute notifications).
|
||||
- staffog.seebroadcast - allows a user to see non-public staff broadcasts (i.e. unban and unmute notifications).
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Fetch all submodule content.
|
||||
git submodule update --force --recursive --init
|
||||
+126
-87
@@ -1,62 +1,75 @@
|
||||
/* This is free and unencumbered software released into the public domain */
|
||||
|
||||
/* ------------------------------ Plugins ------------------------------ */
|
||||
plugins {
|
||||
id("com.gradleup.shadow") version "8.3.5" // Import shadow API.
|
||||
java // Tell gradle this is a java project.
|
||||
eclipse // Import eclipse plugin for IDE integration.
|
||||
kotlin("jvm") version "2.0.21" // Import kotlin jvm plugin for kotlin/java integration.
|
||||
id("java") // Import Java plugin.
|
||||
id("java-library") // Import Java Library plugin.
|
||||
id("com.diffplug.spotless") version "8.1.0" // Import Spotless plugin.
|
||||
id("com.gradleup.shadow") version "8.3.9" // Import Shadow plugin.
|
||||
id("checkstyle") // Import Checkstyle plugin.
|
||||
eclipse // Import Eclipse plugin.
|
||||
kotlin("jvm") version "2.1.21" // Import Kotlin JVM plugin.
|
||||
id("io.freefair.lombok") version "8.13.1" // Automatic lombok support.
|
||||
}
|
||||
|
||||
extra["kotlinAttribute"] = Attribute.of("kotlin-tag", Boolean::class.javaObjectType)
|
||||
|
||||
val kotlinAttribute: Attribute<Boolean> by rootProject.extra
|
||||
|
||||
/* --------------------------- JDK / Kotlin ---------------------------- */
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17 // Declare java version.
|
||||
sourceCompatibility = JavaVersion.VERSION_17 // Compile with JDK 17 compatibility.
|
||||
toolchain { // Select Java toolchain.
|
||||
languageVersion.set(JavaLanguageVersion.of(17)) // Use JDK 17.
|
||||
vendor.set(JvmVendorSpec.GRAAL_VM) // Use GraalVM CE.
|
||||
}
|
||||
}
|
||||
|
||||
group = "uk.hotten.staffog" // Declare bundle identifier.
|
||||
version = "1.0-beta" // Declare plugin version (will be in .jar).
|
||||
kotlin { jvmToolchain(17) }
|
||||
|
||||
/* ----------------------------- Metadata ------------------------------ */
|
||||
group = "net.trueog.staff-og" // Declare bundle identifier.
|
||||
|
||||
version = "1.0" // Declare plugin version (will be in .jar).
|
||||
|
||||
val apiVersion = "1.19" // Declare minecraft server target version.
|
||||
|
||||
/* ----------------------------- Resources ----------------------------- */
|
||||
tasks.named<ProcessResources>("processResources") {
|
||||
val props = mapOf(
|
||||
"version" to version,
|
||||
"apiVersion" to apiVersion
|
||||
)
|
||||
val props = mapOf("version" to version, "apiVersion" to apiVersion)
|
||||
inputs.properties(props) // Indicates to rerun if version changes.
|
||||
|
||||
filesMatching("plugin.yml") {
|
||||
expand(props)
|
||||
}
|
||||
filesMatching("plugin.yml") { expand(props) }
|
||||
from("LICENSE") { into("/") } // Bundle licenses into jarfiles.
|
||||
}
|
||||
|
||||
/* ---------------------------- Repos ---------------------------------- */
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
url = uri("https://repo.purpurmc.org/snapshots")
|
||||
}
|
||||
maven {
|
||||
url = uri("https://repo.purpurmc.org/snapshots")
|
||||
}
|
||||
maven {
|
||||
url = uri("https://jitpack.io")
|
||||
}
|
||||
mavenCentral() // Import the Maven Central Maven Repository.
|
||||
gradlePluginPortal() // Import the Gradle Plugin Portal Maven Repository.
|
||||
maven { url = uri("https://repo.purpurmc.org/snapshots") } // Import the PurpurMC Maven Repository.
|
||||
maven { url = uri("https://jitpack.io") } // Import the Jitpack Maven Repository.
|
||||
}
|
||||
|
||||
/* ---------------------- Java project deps ---------------------------- */
|
||||
dependencies {
|
||||
compileOnly("com.google.code.gson:gson:2.10.1")
|
||||
compileOnly("commons-io:commons-io:2.11.0")
|
||||
compileOnly("org.apache.commons:commons-pool2:2.11.1")
|
||||
compileOnly("jakarta.xml.bind:jakarta.xml.bind-api:4.0.0")
|
||||
compileOnly("mysql:mysql-connector-java:8.0.32")
|
||||
compileOnly("org.purpurmc.purpur:purpur-api:1.19.4-R0.1-SNAPSHOT")
|
||||
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
|
||||
// implementations will be shaded.
|
||||
implementation("org.jooq:jooq:3.18.4")
|
||||
implementation("org.reactivestreams:reactive-streams:1.0.4")
|
||||
implementation("org.mariadb.jdbc:mariadb-java-client:3.1.3") // JDBC
|
||||
implementation("io.r2dbc:r2dbc-spi:1.0.0.RELEASE") // R2DBC SPI
|
||||
implementation("org.mariadb:r2dbc-mariadb:1.3.0") // R2DBC driver
|
||||
compileOnly("com.google.code.gson:gson:2.10.1") // Import google gson API.
|
||||
compileOnly("commons-io:commons-io:2.11.0") // Import google commons API.
|
||||
compileOnly("org.apache.commons:commons-pool2:2.11.1") // Import apache commons API.
|
||||
compileOnly("jakarta.xml.bind:jakarta.xml.bind-api:4.0.0") // Import jakarta xml bind API.
|
||||
compileOnly("mysql:mysql-connector-java:8.0.32") // Import mysql connector API.
|
||||
compileOnly("org.purpurmc.purpur:purpur-api:1.19.4-R0.1-SNAPSHOT") // Declare Purpur API version to be packaged.
|
||||
compileOnly("net.luckperms:api:5.5") // Import LuckPerms API.
|
||||
compileOnlyApi(project(":libs:Utilities-OG")) // Import TrueOG Network Utilities-OG Java API (from source).
|
||||
implementation("org.jooq:jooq:3.18.4") // Import jooq API.
|
||||
implementation("org.reactivestreams:reactive-streams:1.0.4") // Import reactive streams API.
|
||||
implementation("org.mariadb.jdbc:mariadb-java-client:3.1.3") // Import JDBC API.
|
||||
implementation("io.r2dbc:r2dbc-spi:1.0.0.RELEASE") // Import R2DBC Interface.
|
||||
implementation("org.mariadb:r2dbc-mariadb:1.3.0") // Import R2DBC driver.
|
||||
}
|
||||
|
||||
// Utility functions
|
||||
/* ---------------------- Utility functions ---------------------------- */
|
||||
|
||||
// Update the plugin.yml version.
|
||||
fun revertPluginYmlVersion() {
|
||||
val yaml = file("src/main/resources/plugin.yml")
|
||||
val lines = yaml.readLines().toMutableList()
|
||||
@@ -65,46 +78,45 @@ fun revertPluginYmlVersion() {
|
||||
}
|
||||
|
||||
// Add the name of the current git branch to the build.
|
||||
fun currentGitBranch(): String = try {
|
||||
val proc = ProcessBuilder(
|
||||
"git",
|
||||
"-C", rootProject.projectDir.absolutePath,
|
||||
"rev-parse", "--abbrev-ref", "HEAD"
|
||||
)
|
||||
.redirectErrorStream(true)
|
||||
.start()
|
||||
fun currentGitBranch(): String =
|
||||
try {
|
||||
val proc =
|
||||
ProcessBuilder("git", "-C", rootProject.projectDir.absolutePath, "rev-parse", "--abbrev-ref", "HEAD")
|
||||
.redirectErrorStream(true)
|
||||
.start()
|
||||
|
||||
val out = proc.inputStream.bufferedReader().readText().trim()
|
||||
proc.waitFor()
|
||||
val out = proc.inputStream.bufferedReader().readText().trim()
|
||||
proc.waitFor()
|
||||
|
||||
// If Git failed or gave us garbage, fall back.
|
||||
val branch = if (proc.exitValue() != 0 || out.startsWith("fatal")) "ogsuite" else out
|
||||
// If Git failed or gave us garbage, fall back.
|
||||
val branch = if (proc.exitValue() != 0 || out.startsWith("fatal")) "ogsuite" else out
|
||||
|
||||
// Keep the classifier file-system & URI safe
|
||||
branch
|
||||
.lowercase()
|
||||
.replace(Regex("[^a-z0-9._-]"), "_")
|
||||
.ifBlank { "ogsuite" }
|
||||
} catch (_: Exception) {
|
||||
"ogsuite"
|
||||
}
|
||||
// Keep the classifier file-system & URI safe
|
||||
branch.lowercase().replace(Regex("[^a-z0-9._-]"), "_").ifBlank { "ogsuite" }
|
||||
} catch (_: Exception) {
|
||||
"ogsuite"
|
||||
}
|
||||
|
||||
// Update plugin.yml before compilation
|
||||
val updatePluginYmlVersion = tasks.register("updatePluginYmlVersion") {
|
||||
doLast {
|
||||
val yaml = file("src/main/resources/plugin.yml")
|
||||
val lines = yaml.readLines().toMutableList()
|
||||
lines[2] = "version: $version-${currentGitBranch()}"
|
||||
yaml.writeText(lines.joinToString("\n"))
|
||||
val updatePluginYmlVersion =
|
||||
tasks.register("updatePluginYmlVersion") {
|
||||
doLast {
|
||||
val yaml = file("src/main/resources/plugin.yml")
|
||||
val lines = yaml.readLines().toMutableList()
|
||||
lines[2] = "version: $version-${currentGitBranch()}"
|
||||
yaml.writeText(lines.joinToString("\n"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure reproducible builds.
|
||||
tasks.withType<AbstractArchiveTask>().configureEach {
|
||||
apply(from = "eclipse.gradle.kts") // Import eclipse classpath support script.
|
||||
|
||||
/* ---------------------- Reproducible jars ---------------------------- */
|
||||
tasks.withType<AbstractArchiveTask>().configureEach { // Ensure reproducible .jars
|
||||
isPreserveFileTimestamps = false
|
||||
isReproducibleFileOrder = true
|
||||
}
|
||||
|
||||
/* ----------------------------- Shadow -------------------------------- */
|
||||
tasks.shadowJar {
|
||||
archiveClassifier.set(currentGitBranch())
|
||||
from("LICENSE") { into("/") }
|
||||
@@ -123,32 +135,59 @@ tasks.shadowJar {
|
||||
doLast { revertPluginYmlVersion() }
|
||||
}
|
||||
|
||||
tasks.named("compileJava") {
|
||||
dependsOn(updatePluginYmlVersion)
|
||||
}
|
||||
tasks.named("compileJava") { dependsOn(updatePluginYmlVersion) }
|
||||
|
||||
tasks.build {
|
||||
dependsOn(tasks.spotlessApply)
|
||||
dependsOn(tasks.shadowJar)
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
archiveClassifier.set("part")
|
||||
}
|
||||
tasks.jar { archiveClassifier.set("part") } // Applies to root jarfile only.
|
||||
|
||||
tasks.build { dependsOn(tasks.spotlessApply, tasks.shadowJar) } // Build depends on spotless and shadow.
|
||||
|
||||
/* --------------------------- Javac opts ------------------------------- */
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.compilerArgs.add("-parameters")
|
||||
options.compilerArgs.add("-Xlint:deprecation") // Triggers deprecation warning messages.
|
||||
options.encoding = "UTF-8"
|
||||
options.isFork = true
|
||||
options.compilerArgs.add("-parameters") // Enable reflection for java code.
|
||||
options.isFork = true // Run javac in its own process.
|
||||
options.compilerArgs.add("-Xlint:deprecation") // Trigger deprecation warning messages.
|
||||
options.encoding = "UTF-8" // Use UTF-8 file encoding.
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
vendor = JvmVendorSpec.GRAAL_VM
|
||||
/* ----------------------------- Auto Formatting ------------------------ */
|
||||
spotless {
|
||||
java {
|
||||
eclipse().configFile("config/formatter/eclipse-java-formatter.xml") // Eclipse java formatting.
|
||||
leadingTabsToSpaces() // Convert leftover leading tabs to spaces.
|
||||
removeUnusedImports() // Remove imports that aren't being called.
|
||||
}
|
||||
kotlinGradle {
|
||||
ktfmt().kotlinlangStyle().configure { it.setMaxWidth(120) } // JetBrains Kotlin formatting.
|
||||
target("build.gradle.kts", "settings.gradle.kts") // Gradle files to format.
|
||||
}
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
toolVersion = "10.18.1" // Declare checkstyle version to use.
|
||||
configFile = file("config/checkstyle/checkstyle.xml") // Point checkstyle to config file.
|
||||
isIgnoreFailures = true // Don't fail the build if checkstyle does not pass.
|
||||
isShowViolations = true // Show the violations in any IDE with the checkstyle plugin.
|
||||
}
|
||||
|
||||
tasks.named("compileJava") {
|
||||
dependsOn("spotlessApply") // Run spotless before compiling with the JDK.
|
||||
}
|
||||
|
||||
tasks.named("spotlessCheck") {
|
||||
dependsOn("spotlessApply") // Run spotless before checking if spotless ran.
|
||||
}
|
||||
|
||||
/* ------------------------------ Eclipse SHIM ------------------------- */
|
||||
|
||||
// This can't be put in eclipse.gradle.kts because Gradle is weird.
|
||||
subprojects {
|
||||
apply(plugin = "java-library")
|
||||
apply(plugin = "eclipse")
|
||||
eclipse.project.name = "${project.name}-${rootProject.name}"
|
||||
tasks.withType<Jar>().configureEach { archiveBaseName.set("${project.name}-${rootProject.name}") }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||
<module name="Checker">
|
||||
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="true"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<module name="FinalLocalVariable"/>
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="Indentation">
|
||||
<property name="severity" value="ignore"/>
|
||||
</module>
|
||||
</module>
|
||||
|
||||
<module name="RegexpSingleline">
|
||||
<property name="format" value="\borg\.junit\.jupiter\.api\.Assertions\.fail\s*\(\s*"Not yet implemented"\s*\)\s*;"/>
|
||||
<property name="message" value="Remove placeholder fail() and implement the test."/>
|
||||
<property name="ignoreCase" value="true"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="RegexpSingleline">
|
||||
<property name="format" value="(?<!\w)fail\s*\(\s*"Not yet implemented"\s*\)\s*;"/>
|
||||
<property name="message" value="Remove placeholder fail() and implement the test."/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,404 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles version="23">
|
||||
<profile kind="CodeFormatterProfile" name="TrueOG Network Formatting" version="23">
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_record_components" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_annotations" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case_after_arrow" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow" value="20"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line_on_wrap"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
@@ -0,0 +1,151 @@
|
||||
/* This is free and unencumbered software released into the public domain */
|
||||
|
||||
import org.gradle.plugins.ide.eclipse.model.EclipseModel
|
||||
import java.nio.file.Files
|
||||
import javax.xml.parsers.DocumentBuilderFactory
|
||||
import javax.xml.transform.OutputKeys
|
||||
import javax.xml.transform.TransformerFactory
|
||||
import javax.xml.transform.dom.DOMSource
|
||||
import javax.xml.transform.stream.StreamResult
|
||||
|
||||
val kotlinAttribute: Attribute<Boolean> by rootProject.extra
|
||||
|
||||
val kotlinPluginProjects = configurations
|
||||
.getByName("compileClasspath")
|
||||
.allDependencies
|
||||
.filterIsInstance<ProjectDependency>()
|
||||
.filter { it -> it.attributes.getAttribute(kotlinAttribute) != null }
|
||||
.map { it.path }
|
||||
kotlinPluginProjects.forEach { evaluationDependsOn(it) }
|
||||
|
||||
val ideLibs: Configuration by
|
||||
configurations.creating {
|
||||
isCanBeResolved = true
|
||||
isCanBeConsumed = false
|
||||
}
|
||||
|
||||
configure<EclipseModel> {
|
||||
project {
|
||||
name = "Staff-OG-Plugin"
|
||||
}
|
||||
classpath {
|
||||
plusConfigurations.add(ideLibs)
|
||||
}
|
||||
}
|
||||
|
||||
val ideLibDir = layout.buildDirectory.dir("ide-libs")
|
||||
val hashRegex = Regex("-[0-9a-fA-F]{10}(?=\\.jar$)") // Black magic.
|
||||
|
||||
val copyTasks = mutableListOf<TaskProvider<Copy>>()
|
||||
|
||||
kotlinPluginProjects.forEach { path ->
|
||||
val sub = project(path)
|
||||
val shadowJarProv = sub.tasks.named("shadowJar")
|
||||
val copyTask =
|
||||
tasks.register<Copy>("ideCopy${sub.name.replaceFirstChar(Char::titlecase)}") {
|
||||
dependsOn(shadowJarProv)
|
||||
from(shadowJarProv)
|
||||
into(ideLibDir)
|
||||
rename { it.replace(hashRegex, "") } // Remove git commit hash from jarfile.
|
||||
}
|
||||
copyTasks += copyTask
|
||||
}
|
||||
|
||||
/* Ensure the jars exist before .classpath is generated */
|
||||
tasks.named("eclipseClasspath").configure { dependsOn(copyTasks) }
|
||||
|
||||
/* Supply those jars to the ideLibs configuration (after evaluation) */
|
||||
afterEvaluate { dependencies { add("ideLibs", fileTree(ideLibDir) { include("*.jar") }) } }
|
||||
|
||||
val injectIdeLibs =
|
||||
tasks.register("injectIdeLibs") {
|
||||
dependsOn("eclipse") // run after all eclipse files are generated
|
||||
doLast {
|
||||
val cpFile = file(".classpath")
|
||||
if (!cpFile.exists()) return@doLast
|
||||
|
||||
val jars = fileTree(ideLibDir.get()) { include("*.jar") }.files.sortedBy { it.name }
|
||||
if (jars.isEmpty()) return@doLast
|
||||
|
||||
// Parse DOM
|
||||
val dbf = DocumentBuilderFactory.newInstance()
|
||||
val doc = dbf.newDocumentBuilder().parse(cpFile)
|
||||
val root = doc.documentElement
|
||||
|
||||
// Helper to see if an entry already exists
|
||||
fun exists(path: String): Boolean =
|
||||
root.getElementsByTagName("classpathentry").let { list ->
|
||||
(0 until list.length).any { i ->
|
||||
val n = list.item(i)
|
||||
val kind = n.attributes?.getNamedItem("kind")?.nodeValue
|
||||
val p = n.attributes?.getNamedItem("path")?.nodeValue
|
||||
kind == "lib" && p == path
|
||||
}
|
||||
}
|
||||
|
||||
// Remove any entry that points to ide-libs dir (folder or jars) to avoid dupes
|
||||
val toRemove = mutableListOf<org.w3c.dom.Node>()
|
||||
val list = root.getElementsByTagName("classpathentry")
|
||||
val dirPath = ideLibDir.get().asFile.absolutePath
|
||||
for (i in 0 until list.length) {
|
||||
val n = list.item(i)
|
||||
val kind = n.attributes?.getNamedItem("kind")?.nodeValue
|
||||
val p = n.attributes?.getNamedItem("path")?.nodeValue ?: ""
|
||||
if (kind == "lib" && (p == dirPath || p.startsWith("$dirPath/"))) {
|
||||
toRemove += n
|
||||
}
|
||||
}
|
||||
toRemove.forEach { root.removeChild(it) }
|
||||
|
||||
// Append our jar entries LAST
|
||||
jars.forEach { f ->
|
||||
val abs = f.absolutePath
|
||||
if (!exists(abs)) {
|
||||
val entry = doc.createElement("classpathentry")
|
||||
entry.setAttribute("kind", "lib")
|
||||
entry.setAttribute("path", abs)
|
||||
root.appendChild(entry)
|
||||
}
|
||||
}
|
||||
|
||||
// Write back pretty
|
||||
val tf =
|
||||
TransformerFactory.newInstance().newTransformer().apply {
|
||||
setOutputProperty(OutputKeys.INDENT, "yes")
|
||||
setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "1")
|
||||
setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no")
|
||||
setOutputProperty(OutputKeys.ENCODING, "UTF-8")
|
||||
}
|
||||
Files.newBufferedWriter(cpFile.toPath()).use { w -> tf.transform(DOMSource(doc), StreamResult(w)) }
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("eclipse").configure { finalizedBy(injectIdeLibs) }
|
||||
|
||||
val eclipseModel = extensions.getByType<EclipseModel>()
|
||||
|
||||
fun Project.addResolvableEclipseConfigs() {
|
||||
val jarAttr =
|
||||
objects.named(org.gradle.api.attributes.LibraryElements::class, org.gradle.api.attributes.LibraryElements.JAR)
|
||||
val apiAttr = objects.named(org.gradle.api.attributes.Usage::class, org.gradle.api.attributes.Usage.JAVA_API)
|
||||
|
||||
val compileOnlyRes =
|
||||
configurations.create("eclipseCompileOnly") {
|
||||
extendsFrom(configurations.getByName("compileOnly"))
|
||||
isCanBeResolved = true
|
||||
isCanBeConsumed = false
|
||||
attributes.attribute(org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE, apiAttr)
|
||||
attributes.attribute(org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, jarAttr)
|
||||
}
|
||||
val compileOnlyApiRes =
|
||||
configurations.create("eclipseCompileOnlyApi") {
|
||||
extendsFrom(configurations.getByName("compileOnlyApi"))
|
||||
isCanBeResolved = true
|
||||
isCanBeConsumed = false
|
||||
attributes.attribute(org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE, apiAttr)
|
||||
attributes.attribute(org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, jarAttr)
|
||||
}
|
||||
eclipseModel.classpath.plusConfigurations.addAll(listOf(compileOnlyRes, compileOnlyApiRes))
|
||||
}
|
||||
|
||||
addResolvableEclipseConfigs()
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -84,7 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -112,7 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -203,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
@@ -211,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
Vendored
+14
-12
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
@@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
Submodule
+1
Submodule libs/Utilities-OG added at 8b5c86cc9c.
@@ -1,2 +0,0 @@
|
||||
rootProject.name = 'Staff-OG'
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
rootProject.name = "Staff-OG"
|
||||
|
||||
ProcessBuilder("sh", "bootstrap.sh").directory(rootDir).inheritIO().start().let {
|
||||
if (it.waitFor() != 0) throw GradleException("bootstrap.sh failed")
|
||||
}
|
||||
|
||||
file("libs")
|
||||
.listFiles()
|
||||
?.filter { it.isDirectory && !it.name.startsWith(".") }
|
||||
?.forEach { dir ->
|
||||
include(":libs:${dir.name}")
|
||||
project(":libs:${dir.name}").projectDir = dir
|
||||
}
|
||||
@@ -1,10 +1,20 @@
|
||||
package uk.hotten.staffog;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import lombok.Getter;
|
||||
import net.milkbowl.vault.permission.Permission;
|
||||
import net.luckperms.api.LuckPerms;
|
||||
import net.luckperms.api.context.MutableContextSet;
|
||||
import net.luckperms.api.model.user.User;
|
||||
import net.luckperms.api.platform.PlayerAdapter;
|
||||
import net.luckperms.api.query.QueryOptions;
|
||||
import net.trueog.utilitiesog.UtilitiesOG;
|
||||
import uk.hotten.staffog.commands.ChatReportCommand;
|
||||
import uk.hotten.staffog.commands.KickCommand;
|
||||
import uk.hotten.staffog.commands.LinkPanelCommand;
|
||||
@@ -19,83 +29,194 @@ import uk.hotten.staffog.utils.Console;
|
||||
|
||||
public class StaffOGPlugin extends JavaPlugin {
|
||||
|
||||
// Declare variable to hold class for passing.
|
||||
private static StaffOGPlugin plugin;
|
||||
// Declare variable to hold class for passing.
|
||||
private static StaffOGPlugin plugin;
|
||||
|
||||
@Getter private static Permission vaultPerms;
|
||||
@Getter
|
||||
private static LuckPerms luckPerms;
|
||||
|
||||
@Getter private static String reportWebAddress;
|
||||
@Getter private static String appealWebAddress;
|
||||
private static PlayerAdapter<Player> luckPermsPlayerAdapter;
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
@Getter
|
||||
private static String reportWebAddress;
|
||||
|
||||
Console.info("Setting up Staff-OG...");
|
||||
@Getter
|
||||
private static String appealWebAddress;
|
||||
|
||||
// Assign the plugin variable to the main class instance.
|
||||
plugin = this;
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
||||
// Tell JOOQ to STFU
|
||||
System.setProperty("org.jooq.no-tips", "true");
|
||||
Console.info("Setting up Staff-OG...");
|
||||
|
||||
this.saveDefaultConfig();
|
||||
// Assign the plugin variable to the main class instance.
|
||||
plugin = this;
|
||||
|
||||
if (! setupVaultPerms()) {
|
||||
// Tell JOOQ to STFU
|
||||
System.setProperty("org.jooq.no-tips", "true");
|
||||
|
||||
Console.error("Vault not found. Plugin will be disabled.");
|
||||
getServer().getPluginManager().disablePlugin(this);
|
||||
this.saveDefaultConfig();
|
||||
|
||||
}
|
||||
if (!setupLuckPerms()) {
|
||||
|
||||
reportWebAddress = this.getConfig().getString("reportWebAddress");
|
||||
appealWebAddress = this.getConfig().getString("appealWebAddress");
|
||||
Console.error("LuckPerms not found. Plugin will be disabled.");
|
||||
getServer().getPluginManager().disablePlugin(this);
|
||||
return;
|
||||
|
||||
DatabaseManager databaseManager = new DatabaseManager(this);
|
||||
new PunishManager(this);
|
||||
new SecurityManager(this);
|
||||
new TaskManager(this);
|
||||
}
|
||||
|
||||
getCommand("linkpanel").setExecutor(new LinkPanelCommand());
|
||||
getCommand("chatreport").setExecutor(new ChatReportCommand());
|
||||
reportWebAddress = this.getConfig().getString("reportWebAddress");
|
||||
appealWebAddress = this.getConfig().getString("appealWebAddress");
|
||||
|
||||
getCommand("permban").setExecutor(new PermPunishCommand());
|
||||
getCommand("tempban").setExecutor(new TempPunishCommand());
|
||||
getCommand("unban").setExecutor(new UnpunishCommand());
|
||||
getCommand("permmute").setExecutor(new PermPunishCommand());
|
||||
getCommand("tempmute").setExecutor(new TempPunishCommand());
|
||||
getCommand("unmute").setExecutor(new UnpunishCommand());
|
||||
getCommand("kick").setExecutor(new KickCommand());
|
||||
DatabaseManager databaseManager = new DatabaseManager(this);
|
||||
new PunishManager(this);
|
||||
new SecurityManager(this);
|
||||
new TaskManager(this);
|
||||
|
||||
databaseManager.setStatEntry("server_status", "online");
|
||||
getCommand("linkpanel").setExecutor(new LinkPanelCommand());
|
||||
getCommand("chatreport").setExecutor(new ChatReportCommand());
|
||||
|
||||
Console.info("Staff-OG is ready!");
|
||||
getCommand("permban").setExecutor(new PermPunishCommand());
|
||||
getCommand("tempban").setExecutor(new TempPunishCommand());
|
||||
getCommand("unban").setExecutor(new UnpunishCommand());
|
||||
getCommand("permmute").setExecutor(new PermPunishCommand());
|
||||
getCommand("tempmute").setExecutor(new TempPunishCommand());
|
||||
getCommand("unmute").setExecutor(new UnpunishCommand());
|
||||
getCommand("kick").setExecutor(new KickCommand());
|
||||
|
||||
}
|
||||
databaseManager.setStatEntry("server_status", "online");
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
Console.info("Staff-OG is ready!");
|
||||
|
||||
DatabaseManager.getInstance().setStatEntry("server_status", "offline");
|
||||
DatabaseManager.getInstance().setStatEntry("player_count", "0");
|
||||
DatabaseManager.getInstance().setStatEntry("staff_count", "0");
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
private boolean setupVaultPerms() {
|
||||
if (DatabaseManager.getInstance() == null) {
|
||||
|
||||
RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
|
||||
vaultPerms = rsp.getProvider();
|
||||
return;
|
||||
|
||||
return vaultPerms != null;
|
||||
}
|
||||
|
||||
}
|
||||
DatabaseManager.getInstance().setStatEntry("server_status", "offline");
|
||||
DatabaseManager.getInstance().setStatEntry("player_count", "0");
|
||||
DatabaseManager.getInstance().setStatEntry("staff_count", "0");
|
||||
|
||||
// Class constructor.
|
||||
public static StaffOGPlugin getPlugin() {
|
||||
}
|
||||
|
||||
// Pass instance of main to other classes.
|
||||
return plugin;
|
||||
private boolean setupLuckPerms() {
|
||||
|
||||
}
|
||||
RegisteredServiceProvider<LuckPerms> rsp = getServer().getServicesManager().getRegistration(LuckPerms.class);
|
||||
if (rsp == null) {
|
||||
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
luckPerms = rsp.getProvider();
|
||||
if (luckPerms == null) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
luckPermsPlayerAdapter = luckPerms.getPlayerAdapter(Player.class);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public static boolean hasPermission(Player player, String permission) {
|
||||
|
||||
return luckPermsPlayerAdapter.getPermissionData(player).checkPermission(permission).asBoolean();
|
||||
|
||||
}
|
||||
|
||||
public static boolean hasPermission(UUID uuid, String username, String worldName, String permission) {
|
||||
|
||||
if (Bukkit.isPrimaryThread()) {
|
||||
|
||||
Console.error("Offline LuckPerms permission checks must not run on the main server thread.");
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
boolean wasLoaded = luckPerms.getUserManager().isLoaded(uuid);
|
||||
User user;
|
||||
try {
|
||||
|
||||
user = luckPerms.getUserManager().loadUser(uuid, username).get();
|
||||
|
||||
} catch (InterruptedException error) {
|
||||
|
||||
Thread.currentThread().interrupt();
|
||||
Console.error("Interrupted while loading LuckPerms user for permission check.");
|
||||
return false;
|
||||
|
||||
} catch (ExecutionException error) {
|
||||
|
||||
Console.error("Failed to load LuckPerms user for permission check.");
|
||||
error.printStackTrace();
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
QueryOptions queryOptions = withWorldContext(luckPerms.getContextManager().getStaticQueryOptions(),
|
||||
worldName);
|
||||
return user.getCachedData().getPermissionData(queryOptions).checkPermission(permission).asBoolean();
|
||||
|
||||
} finally {
|
||||
|
||||
if (!wasLoaded) {
|
||||
|
||||
luckPerms.getUserManager().cleanupUser(user);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static QueryOptions withWorldContext(QueryOptions queryOptions, String worldName) {
|
||||
|
||||
MutableContextSet contexts = queryOptions.context().mutableCopy();
|
||||
contexts.removeAll("world");
|
||||
contexts.add("world", worldName);
|
||||
|
||||
return queryOptions.toBuilder().context(contexts).build();
|
||||
|
||||
}
|
||||
|
||||
// Class constructor.
|
||||
public static StaffOGPlugin getPlugin() {
|
||||
|
||||
// Pass instance of main to other classes.
|
||||
return plugin;
|
||||
|
||||
}
|
||||
|
||||
public static String prependPrefix(String message) {
|
||||
|
||||
return "" + "&7" + "[" + "&e" + "Staff-OG" + "&7" + "] " + "&r" + message;
|
||||
|
||||
}
|
||||
|
||||
public static String formatNotification(String prefix, String message) {
|
||||
|
||||
return "" + "&c" + StringUtils.upperCase(prefix) + " | " + "&B" + "Notification " + "&8" + "> " + "&r"
|
||||
+ message;
|
||||
|
||||
}
|
||||
|
||||
public static void staffBroadcast(String message) {
|
||||
|
||||
Bukkit.getServer().getOnlinePlayers().stream().filter(p -> p.hasPermission("staffog.seebroadcast"))
|
||||
.forEach(p -> UtilitiesOG.trueogMessage(p, message));
|
||||
|
||||
UtilitiesOG.logToConsole(prependPrefix(""), message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,74 +9,78 @@ import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.trueog.utilitiesog.UtilitiesOG;
|
||||
import uk.hotten.staffog.StaffOGPlugin;
|
||||
import uk.hotten.staffog.punish.PunishManager;
|
||||
import uk.hotten.staffog.utils.Message;
|
||||
|
||||
public class ChatReportCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
|
||||
if (! (sender instanceof Player player)) {
|
||||
if (!(sender instanceof Player player)) {
|
||||
|
||||
sender.sendMessage("ERROR: Only players can run this command!");
|
||||
return true;
|
||||
sender.sendMessage("ERROR: Only players can run this command!");
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (args == null || args.length < 2) {
|
||||
if (args == null || args.length < 2) {
|
||||
|
||||
Message.staffOGMessage(player, "&6Correct Usage: &e/chatreport <player> <reason>");
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage(player, "&6Correct Usage: &e/chatreport <player> <reason>");
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
PunishManager pm = PunishManager.getInstance();
|
||||
if (! pm.isIncludedInCurrentChatReport(args[0])) {
|
||||
final PunishManager pm = PunishManager.getInstance();
|
||||
if (!pm.isIncludedInCurrentChatReport(args[0])) {
|
||||
|
||||
Message.staffOGMessage(player, ("&c" + args[0] + " has not used chat in the past two minutes."));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage(player, ("&c" + args[0] + " has not used chat in the past two minutes."));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
UUID reported = pm.getUUIDFromChatReport(args[0]);
|
||||
final UUID reported = pm.getUUIDFromChatReport(args[0]);
|
||||
|
||||
ArrayList<String> preReason = new ArrayList<>(Arrays.asList(args));
|
||||
preReason.remove(0);
|
||||
String reason = String.join(" ", preReason);
|
||||
final ArrayList<String> preReason = new ArrayList<>(Arrays.asList(args));
|
||||
preReason.remove(0);
|
||||
final String reason = String.join(" ", preReason);
|
||||
|
||||
String chatReportId = pm.exportChatReport(player.getUniqueId(), reported);
|
||||
if (chatReportId == null) {
|
||||
final String chatReportId = pm.exportChatReport(player.getUniqueId(), reported);
|
||||
if (chatReportId == null) {
|
||||
|
||||
Message.staffOGMessage(player, "&c Failed to generate chat report. Please try again.");
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage(player, "&c Failed to generate chat report. Please try again.");
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String staffReportId = pm.createReportFromCR(player.getUniqueId(), reported, Integer.parseInt(chatReportId), reason);
|
||||
if (staffReportId == null) {
|
||||
final String staffReportId = pm.createReportFromCR(player.getUniqueId(), reported,
|
||||
Integer.parseInt(chatReportId), reason);
|
||||
if (staffReportId == null) {
|
||||
|
||||
Message.staffOGMessage(player, ("&cFailed to create a report to staff, however a chat log was successfully exported with ID " +
|
||||
"&f" + "#" + chatReportId + "&c" + ". Please create a manual report quoting this Chat Report ID on " +
|
||||
"&f" + StaffOGPlugin.getReportWebAddress()));
|
||||
UtilitiesOG.trueogMessage(player,
|
||||
("&cFailed to create a report to staff, however a chat log was successfully exported with ID "
|
||||
+ "&f" + "#" + chatReportId + "&c"
|
||||
+ ". Please create a manual report quoting this Chat Report ID on " + "&f"
|
||||
+ StaffOGPlugin.getReportWebAddress()));
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
Message.staffOGMessage(player, ("&a Thanks for your report! Your report reference is " +
|
||||
"&f" + "#" + staffReportId + "&a" + ". Your chat report ID is " +
|
||||
"&f" + "#" + chatReportId + "&a" + " and has been included in your report."));
|
||||
UtilitiesOG.trueogMessage(player,
|
||||
("&a Thanks for your report! Your report reference is " + "&f" + "#" + staffReportId + "&a"
|
||||
+ ". Your chat report ID is " + "&f" + "#" + chatReportId + "&a"
|
||||
+ " and has been included in your report."));
|
||||
|
||||
Message.staffOGMessage(player, ("&2" + "You can check the status of your report at " +
|
||||
"&f" + StaffOGPlugin.getReportWebAddress()));
|
||||
UtilitiesOG.trueogMessage(player, ("&2" + "You can check the status of your report at " + "&f"
|
||||
+ StaffOGPlugin.getReportWebAddress()));
|
||||
|
||||
Message.staffBroadcast(Message.formatNotification("REPORT", "New Mutable Offences report #" + staffReportId + " by " + player.getName() + " against " + args[0]));
|
||||
UtilitiesOG.trueogMessage(player, StaffOGPlugin.formatNotification("REPORT", "New Mutable Offences report #"
|
||||
+ staffReportId + " by " + player.getName() + " against " + args[0]));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,52 +9,67 @@ import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.trueog.utilitiesog.UtilitiesOG;
|
||||
import uk.hotten.staffog.StaffOGPlugin;
|
||||
import uk.hotten.staffog.punish.PunishManager;
|
||||
import uk.hotten.staffog.punish.data.KickPunishEntry;
|
||||
import uk.hotten.staffog.utils.Message;
|
||||
|
||||
public class KickCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
|
||||
if (args == null || args.length < 1) {
|
||||
if (args == null || args.length < 1) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, "&6Correct Usage: &e/kick <player> [reason]");
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage((Player) sender, "&6Correct Usage: &e/kick <player> [reason]");
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Player toKick = Bukkit.getServer().getPlayer(args[0]);
|
||||
if (toKick == null) {
|
||||
final Player toKick = Bukkit.getServer().getPlayer(args[0]);
|
||||
if (toKick == null) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&c" + args[0] + " is not online!"));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&c" + args[0] + " is not online!"));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
KickPunishEntry entry = new KickPunishEntry();
|
||||
entry.setUuid(toKick.getUniqueId());
|
||||
entry.setName(toKick.getName());
|
||||
entry.setPlayer(toKick);
|
||||
entry.setByUuid((sender instanceof Player) ? ((Player) sender).getUniqueId().toString() : "NCP");
|
||||
entry.setByName((sender instanceof Player) ? ((Player) sender).getName() : "NCP");
|
||||
entry.setTime(System.currentTimeMillis());
|
||||
final KickPunishEntry entry = new KickPunishEntry();
|
||||
entry.setUuid(toKick.getUniqueId());
|
||||
entry.setName(toKick.getName());
|
||||
entry.setPlayer(toKick);
|
||||
entry.setByUuid((sender instanceof Player) ? ((Player) sender).getUniqueId().toString() : "NCP");
|
||||
entry.setByName((sender instanceof Player) ? ((Player) sender).getName() : "NCP");
|
||||
entry.setTime(System.currentTimeMillis());
|
||||
|
||||
if (args.length >= 2) {
|
||||
ArrayList<String> preReason = new ArrayList<>(Arrays.asList(args));
|
||||
preReason.remove(0);
|
||||
String reason = String.join(" ", preReason);
|
||||
entry.setReason(reason);
|
||||
}
|
||||
else {
|
||||
entry.setReason("No reason specified");
|
||||
}
|
||||
if (args.length >= 2) {
|
||||
|
||||
PunishManager.getInstance().newKickPunishment(entry);
|
||||
Message.staffOGMessage((Player) sender, ("&7" + "You have kicked " + entry.getName() + "."));
|
||||
return true;
|
||||
final ArrayList<String> preReason = new ArrayList<>(Arrays.asList(args));
|
||||
preReason.remove(0);
|
||||
final String reason = String.join(" ", preReason);
|
||||
entry.setReason(reason);
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
entry.setReason("No reason specified");
|
||||
|
||||
}
|
||||
|
||||
PunishManager.getInstance().newKickPunishment(entry);
|
||||
if (sender instanceof Player player) {
|
||||
|
||||
UtilitiesOG.trueogMessage(player,
|
||||
"&7You have kicked &e" + entry.getName() + " &7for &e" + entry.getReason() + "&7.");
|
||||
|
||||
} else {
|
||||
|
||||
UtilitiesOG.logToConsole(StaffOGPlugin.prependPrefix(" "),
|
||||
"&7You have kicked &e" + entry.getName() + " &7for &e" + entry.getReason() + "&7.");
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,58 +5,60 @@ import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.trueog.utilitiesog.UtilitiesOG;
|
||||
import uk.hotten.staffog.StaffOGPlugin;
|
||||
import uk.hotten.staffog.security.SecurityManager;
|
||||
import uk.hotten.staffog.security.data.StaffIPInfo;
|
||||
import uk.hotten.staffog.utils.Message;
|
||||
|
||||
public class LinkPanelCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if (! (sender instanceof Player player)) {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
|
||||
sender.sendMessage("ERROR: Only players can run this command!");
|
||||
return true;
|
||||
if (!(sender instanceof Player player)) {
|
||||
|
||||
}
|
||||
sender.sendMessage("ERROR: Only players can run this command!");
|
||||
return true;
|
||||
|
||||
SecurityManager sm = SecurityManager.getInstance();
|
||||
}
|
||||
|
||||
if (! sm.getStaffIPInfos().containsKey(player.getUniqueId())) {
|
||||
final SecurityManager sm = SecurityManager.getInstance();
|
||||
if (!sm.getStaffIPInfos().containsKey(player.getUniqueId())) {
|
||||
|
||||
Message.staffOGMessage(player, "&cRequired data is missing, please re-log.");
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage(player, "&cRequired data is missing, please re-log.");
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
StaffIPInfo ipInfo = sm.getStaffIPInfos().get(player.getUniqueId());
|
||||
if (ipInfo.isPanelVerified()) {
|
||||
final StaffIPInfo ipInfo = sm.getStaffIPInfos().get(player.getUniqueId());
|
||||
if (ipInfo.isPanelVerified()) {
|
||||
|
||||
Message.staffOGMessage(player, ("&6Your IP has already been verified on the panel."));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage(player, ("&6Your IP has already been verified on the panel."));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String doesHaveCode = sm.doesPlayerHaveLinkCode(player.getUniqueId());
|
||||
if (doesHaveCode != null) {
|
||||
final String doesHaveCode = sm.doesPlayerHaveLinkCode(player.getUniqueId());
|
||||
if (doesHaveCode != null) {
|
||||
|
||||
Message.staffOGMessage(player, ("&6Your activation code is &e" + doesHaveCode));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage(player, ("&6Your activation code is &e" + doesHaveCode));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String code = sm.createLinkCode(player.getUniqueId(), StaffOGPlugin.getVaultPerms().has(player, "staffog.paneladmin"));
|
||||
if (code == null) {
|
||||
final String code = sm.createLinkCode(player.getUniqueId(),
|
||||
StaffOGPlugin.hasPermission(player, "staffog.paneladmin"));
|
||||
if (code == null) {
|
||||
|
||||
Message.staffOGMessage(player, ("&cERROR: Failed to create activation code. Please contact an administrator."));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage(player,
|
||||
("&cERROR: Failed to create activation code. Please contact an administrator."));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Message.staffOGMessage(player, ("&6Your activation code is: &e" + code));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage(player, ("&6Your activation code is: &e" + code));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -11,85 +12,87 @@ import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.trueog.utilitiesog.UtilitiesOG;
|
||||
import uk.hotten.staffog.punish.PunishManager;
|
||||
import uk.hotten.staffog.punish.data.PunishEntry;
|
||||
import uk.hotten.staffog.punish.data.PunishType;
|
||||
import uk.hotten.staffog.utils.Message;
|
||||
import uk.hotten.staffog.utils.TimeUtils;
|
||||
|
||||
public class PermPunishCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
|
||||
if (args == null || args.length < 2) {
|
||||
if (args == null || args.length < 2) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&6Correct Usage: &e/" + label + " <player> <reason>"));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&6Correct Usage: &e/" + label + " <player> <reason>"));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
PunishType commandType;
|
||||
if (label.toLowerCase().contains("permban")) {
|
||||
final PunishType commandType;
|
||||
if (StringUtils.contains(StringUtils.lowerCase(label), "permban")) {
|
||||
|
||||
commandType = PunishType.BAN;
|
||||
commandType = PunishType.BAN;
|
||||
|
||||
}
|
||||
else if (label.toLowerCase().contains("permmute")) {
|
||||
} else if (StringUtils.contains(StringUtils.lowerCase(label), "permmute")) {
|
||||
|
||||
commandType = PunishType.MUTE;
|
||||
commandType = PunishType.MUTE;
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&cERROR: Unsupported type for command."));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&cERROR: Unsupported type for command."));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
UUID uuid = PunishManager.getInstance().getUUIDFromName(args[0]);
|
||||
if (uuid == null) {
|
||||
final UUID uuid = PunishManager.getInstance().getUUIDFromName(args[0]);
|
||||
if (uuid == null) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&c" + args[0] + " has never joined the server!"));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&c" + args[0] + " has never joined the server!"));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
PunishEntry isPunished = PunishManager.getInstance().checkActivePunishment(commandType, uuid);
|
||||
if (isPunished != null) {
|
||||
final PunishEntry isPunished = PunishManager.getInstance().checkActivePunishment(commandType, uuid);
|
||||
if (isPunished != null) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&c" + args[0] + " is already " + commandType.getBroadcastMessage() + " for " + TimeUtils.formatMillisecondTime(isPunished.calculateRemaining())) + ".");
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage((Player) sender,
|
||||
("&c" + args[0] + " is already " + commandType.getBroadcastMessage() + " for "
|
||||
+ TimeUtils.formatMillisecondTime(isPunished.calculateRemaining())) + ".");
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
OfflinePlayer player = Bukkit.getServer().getOfflinePlayer(uuid);
|
||||
PunishEntry entry = new PunishEntry(commandType);
|
||||
final OfflinePlayer player = Bukkit.getServer().getOfflinePlayer(uuid);
|
||||
final PunishEntry entry = new PunishEntry(commandType);
|
||||
|
||||
entry.setUuid(uuid);
|
||||
entry.setName(player.getName());
|
||||
if (player.isOnline()) {
|
||||
entry.setUuid(uuid);
|
||||
entry.setName(player.getName());
|
||||
if (player.isOnline()) {
|
||||
|
||||
entry.setPlayer(player.getPlayer());
|
||||
entry.setPlayer(player.getPlayer());
|
||||
|
||||
}
|
||||
entry.setByUuid((sender instanceof Player) ? ((Player) sender).getUniqueId().toString() : "NCP");
|
||||
entry.setByName((sender instanceof Player) ? ((Player) sender).getName() : "NCP");
|
||||
entry.setTime(System.currentTimeMillis());
|
||||
entry.setUntil(-1);
|
||||
entry.setActive(true);
|
||||
}
|
||||
|
||||
ArrayList<String> preReason = new ArrayList<>(Arrays.asList(args));
|
||||
preReason.remove(0);
|
||||
entry.setByUuid((sender instanceof Player) ? ((Player) sender).getUniqueId().toString() : "NCP");
|
||||
entry.setByName((sender instanceof Player) ? ((Player) sender).getName() : "NCP");
|
||||
entry.setTime(System.currentTimeMillis());
|
||||
entry.setUntil(-1);
|
||||
entry.setActive(true);
|
||||
|
||||
String reason = String.join(" ", preReason);
|
||||
entry.setReason(reason);
|
||||
final ArrayList<String> preReason = new ArrayList<>(Arrays.asList(args));
|
||||
preReason.remove(0);
|
||||
|
||||
PunishManager.getInstance().newPunishment(entry);
|
||||
final String reason = String.join(" ", preReason);
|
||||
entry.setReason(reason);
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&7You have " + commandType.getBroadcastMessage() + " " + entry.getName() + " for permanent."));
|
||||
return true;
|
||||
PunishManager.getInstance().newPunishment(entry);
|
||||
|
||||
}
|
||||
UtilitiesOG.trueogMessage((Player) sender,
|
||||
("&7You have " + commandType.getBroadcastMessage() + " " + entry.getName() + " for permanent."));
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,10 +2,11 @@ package uk.hotten.staffog.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.lang.time.DateUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -13,131 +14,124 @@ import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.trueog.utilitiesog.UtilitiesOG;
|
||||
import uk.hotten.staffog.punish.PunishManager;
|
||||
import uk.hotten.staffog.punish.data.PunishEntry;
|
||||
import uk.hotten.staffog.punish.data.PunishType;
|
||||
import uk.hotten.staffog.utils.Message;
|
||||
import uk.hotten.staffog.utils.TimeUtils;
|
||||
|
||||
public class TempPunishCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
|
||||
if (args == null || args.length < 4) {
|
||||
if (args == null || args.length < 4) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&6Correct Usage: &e/" + label + " <player> <unit> <amount> <reason>"));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage((Player) sender,
|
||||
("&6Correct Usage: &e/" + label + " <player> <unit> <amount> <reason>"));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
int amount;
|
||||
try {
|
||||
final int amount;
|
||||
try {
|
||||
|
||||
amount = Integer.parseInt(args[2]);
|
||||
amount = Integer.parseInt(args[2]);
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
} catch (Exception error) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&cERROR: The amount of units must be a number!"));
|
||||
return true;
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&cERROR: The amount of units must be a number!"));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Date currentTime = new Date(System.currentTimeMillis());
|
||||
long untilTime;
|
||||
switch (args[1].toLowerCase()) {
|
||||
case "d": {
|
||||
untilTime = DateUtils.addDays(currentTime, amount).getTime();
|
||||
break;
|
||||
}
|
||||
|
||||
case "w": {
|
||||
untilTime = DateUtils.addWeeks(currentTime, amount).getTime();
|
||||
break;
|
||||
}
|
||||
|
||||
case "m": {
|
||||
untilTime = DateUtils.addMonths(currentTime, amount).getTime();
|
||||
break;
|
||||
}
|
||||
|
||||
case "y": {
|
||||
untilTime = DateUtils.addYears(currentTime, amount).getTime();
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&cERROR: Invalid time unit. &6Please supply: &e(d)ay, (w)eek, (m)onth or (y)ear&6."));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
final Date currentTime = new Date(System.currentTimeMillis());
|
||||
final Calendar until = Calendar.getInstance();
|
||||
until.setTime(currentTime);
|
||||
final long untilTime;
|
||||
switch (StringUtils.lowerCase(args[1])) {
|
||||
|
||||
PunishType commandType;
|
||||
if (label.toLowerCase().contains("tempban")) {
|
||||
case "d" -> until.add(Calendar.DAY_OF_MONTH, amount);
|
||||
case "w" -> until.add(Calendar.WEEK_OF_YEAR, amount);
|
||||
case "m" -> until.add(Calendar.MONTH, amount);
|
||||
case "y" -> until.add(Calendar.YEAR, amount);
|
||||
default -> {
|
||||
|
||||
commandType = PunishType.BAN;
|
||||
UtilitiesOG.trueogMessage((Player) sender,
|
||||
("&cERROR: Invalid time unit. &6Please supply: &e(d)ay, (w)eek, (m)onth or (y)ear&6."));
|
||||
return true;
|
||||
|
||||
}
|
||||
else if (label.toLowerCase().contains("tempmute")) {
|
||||
}
|
||||
|
||||
commandType = PunishType.MUTE;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
untilTime = until.getTimeInMillis();
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&cERROR: Unsupported type for command."));
|
||||
return true;
|
||||
final PunishType commandType;
|
||||
if (StringUtils.contains(StringUtils.lowerCase(label), "tempban")) {
|
||||
|
||||
}
|
||||
commandType = PunishType.BAN;
|
||||
|
||||
UUID uuid = PunishManager.getInstance().getUUIDFromName(args[0]);
|
||||
if (uuid == null) {
|
||||
} else if (StringUtils.contains(StringUtils.lowerCase(label), "tempmute")) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&c" + args[0] + " has never joined the server!"));
|
||||
return true;
|
||||
commandType = PunishType.MUTE;
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
PunishEntry isPunished = PunishManager.getInstance().checkActivePunishment(commandType, uuid);
|
||||
if (isPunished != null) {
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&cERROR: Unsupported type for command."));
|
||||
return true;
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&c" + args[0] + " is already " + commandType.getBroadcastMessage() + " for " + TimeUtils.formatMillisecondTime(isPunished.calculateRemaining())) + ".");
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
final UUID uuid = PunishManager.getInstance().getUUIDFromName(args[0]);
|
||||
if (uuid == null) {
|
||||
|
||||
OfflinePlayer player = Bukkit.getServer().getOfflinePlayer(uuid);
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&c" + args[0] + " has never joined the server!"));
|
||||
return true;
|
||||
|
||||
PunishEntry entry = new PunishEntry(commandType);
|
||||
}
|
||||
|
||||
entry.setUuid(uuid);
|
||||
entry.setName(player.getName());
|
||||
if (player.isOnline()) {
|
||||
final PunishEntry isPunished = PunishManager.getInstance().checkActivePunishment(commandType, uuid);
|
||||
if (isPunished != null) {
|
||||
|
||||
entry.setPlayer(player.getPlayer());
|
||||
UtilitiesOG.trueogMessage((Player) sender,
|
||||
("&c" + args[0] + " is already " + commandType.getBroadcastMessage() + " for "
|
||||
+ TimeUtils.formatMillisecondTime(isPunished.calculateRemaining())) + ".");
|
||||
return true;
|
||||
|
||||
}
|
||||
entry.setByUuid((sender instanceof Player) ? ((Player) sender).getUniqueId().toString() : "NCP");
|
||||
entry.setByName((sender instanceof Player) ? ((Player) sender).getName() : "NCP");
|
||||
entry.setTime(currentTime.getTime());
|
||||
entry.setUntil(untilTime);
|
||||
entry.setActive(true);
|
||||
}
|
||||
|
||||
ArrayList<String> preReason = new ArrayList<>(Arrays.asList(args));
|
||||
preReason.remove(0);
|
||||
preReason.remove(0);
|
||||
preReason.remove(0);
|
||||
String reason = String.join(" ", preReason);
|
||||
entry.setReason(reason);
|
||||
final OfflinePlayer player = Bukkit.getServer().getOfflinePlayer(uuid);
|
||||
|
||||
PunishManager.getInstance().newPunishment(entry);
|
||||
final PunishEntry entry = new PunishEntry(commandType);
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&7" + "You have " + commandType.getBroadcastMessage() + " " + entry.getName() + " for " + TimeUtils.formatMillisecondTime(entry.calculateDuration()) + "."));
|
||||
return true;
|
||||
entry.setUuid(uuid);
|
||||
entry.setName(player.getName());
|
||||
if (player.isOnline()) {
|
||||
|
||||
}
|
||||
entry.setPlayer(player.getPlayer());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
entry.setByUuid((sender instanceof Player) ? ((Player) sender).getUniqueId().toString() : "NCP");
|
||||
entry.setByName((sender instanceof Player) ? ((Player) sender).getName() : "NCP");
|
||||
entry.setTime(currentTime.getTime());
|
||||
entry.setUntil(untilTime);
|
||||
entry.setActive(true);
|
||||
|
||||
final ArrayList<String> preReason = new ArrayList<>(Arrays.asList(args));
|
||||
preReason.remove(0);
|
||||
preReason.remove(0);
|
||||
preReason.remove(0);
|
||||
final String reason = String.join(" ", preReason);
|
||||
entry.setReason(reason);
|
||||
|
||||
PunishManager.getInstance().newPunishment(entry);
|
||||
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&7" + "You have " + commandType.getBroadcastMessage() + " "
|
||||
+ entry.getName() + " for " + TimeUtils.formatMillisecondTime(entry.calculateDuration()) + "."));
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,75 +4,76 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.trueog.utilitiesog.UtilitiesOG;
|
||||
import uk.hotten.staffog.punish.PunishManager;
|
||||
import uk.hotten.staffog.punish.data.PunishEntry;
|
||||
import uk.hotten.staffog.punish.data.PunishType;
|
||||
import uk.hotten.staffog.utils.Message;
|
||||
|
||||
public class UnpunishCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
|
||||
if (args == null || args.length < 2) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&6Correct Usage: &e/" + label + " <player> <reason>"));
|
||||
return true;
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
|
||||
PunishType commandType;
|
||||
if (label.toLowerCase().contains("unban")) {
|
||||
|
||||
commandType = PunishType.BAN;
|
||||
|
||||
}
|
||||
else if (label.toLowerCase().contains("unmute")) {
|
||||
|
||||
commandType = PunishType.MUTE;
|
||||
if (args == null || args.length < 2) {
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&cERROR: Unsupported type for command."));
|
||||
return true;
|
||||
|
||||
}
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&6Correct Usage: &e/" + label + " <player> <reason>"));
|
||||
return true;
|
||||
|
||||
UUID uuid = PunishManager.getInstance().getUUIDFromName(args[0]);
|
||||
if (uuid == null) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&e" + args[0] + " has never joined the server!"));
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
PunishEntry entry = PunishManager.getInstance().checkActivePunishment(commandType, uuid);
|
||||
if (entry == null) {
|
||||
|
||||
Message.staffOGMessage((Player) sender, ("&c" + args[0] + " is not currently " + commandType.getBroadcastMessage() + "."));
|
||||
return true;
|
||||
|
||||
}
|
||||
final PunishType commandType;
|
||||
if (StringUtils.contains(StringUtils.lowerCase(label), "unban")) {
|
||||
|
||||
entry.setRemovedUuid((sender instanceof Player) ? ((Player) sender).getUniqueId().toString() : "Console");
|
||||
entry.setRemovedName((sender instanceof Player) ? ((Player) sender).getName() : "Console");
|
||||
commandType = PunishType.BAN;
|
||||
|
||||
ArrayList<String> preReason = new ArrayList<>(Arrays.asList(args));
|
||||
preReason.remove(0);
|
||||
String reason = String.join(" ", preReason);
|
||||
entry.setRemovedReason(reason);
|
||||
} else if (StringUtils.contains(StringUtils.lowerCase(label), "unmute")) {
|
||||
|
||||
PunishManager.getInstance().removePunishment(entry);
|
||||
Message.staffOGMessage((Player) sender, ("&7You have un" + commandType.getBroadcastMessage() + " " + entry.getName() + "."));
|
||||
commandType = PunishType.MUTE;
|
||||
|
||||
return true;
|
||||
} else {
|
||||
|
||||
}
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&cERROR: Unsupported type for command."));
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
final UUID uuid = PunishManager.getInstance().getUUIDFromName(args[0]);
|
||||
if (uuid == null) {
|
||||
|
||||
UtilitiesOG.trueogMessage((Player) sender, ("&e" + args[0] + " has never joined the server!"));
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
final PunishEntry entry = PunishManager.getInstance().checkActivePunishment(commandType, uuid);
|
||||
if (entry == null) {
|
||||
|
||||
UtilitiesOG.trueogMessage((Player) sender,
|
||||
("&c" + args[0] + " is not currently " + commandType.getBroadcastMessage() + "."));
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
entry.setRemovedUuid((sender instanceof Player) ? ((Player) sender).getUniqueId().toString() : "Console");
|
||||
entry.setRemovedName((sender instanceof Player) ? ((Player) sender).getName() : "Console");
|
||||
|
||||
final ArrayList<String> preReason = new ArrayList<>(Arrays.asList(args));
|
||||
preReason.remove(0);
|
||||
final String reason = String.join(" ", preReason);
|
||||
entry.setRemovedReason(reason);
|
||||
|
||||
PunishManager.getInstance().removePunishment(entry);
|
||||
UtilitiesOG.trueogMessage((Player) sender,
|
||||
("&7You have un" + commandType.getBroadcastMessage() + " " + entry.getName() + "."));
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,41 +10,41 @@ import uk.hotten.staffog.StaffOGPlugin;
|
||||
|
||||
public class DataEventListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onJoin(PlayerJoinEvent event) {
|
||||
@EventHandler
|
||||
public void onJoin(PlayerJoinEvent event) {
|
||||
|
||||
updatePlayerCounts();
|
||||
updatePlayerCounts();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onQuit(PlayerQuitEvent event) {
|
||||
@EventHandler
|
||||
public void onQuit(PlayerQuitEvent event) {
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskLater(DatabaseManager.getPlugin(), this::updatePlayerCounts, 10);
|
||||
Bukkit.getServer().getScheduler().runTaskLater(DatabaseManager.getPlugin(), this::updatePlayerCounts, 10);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void updatePlayerCounts() {
|
||||
private void updatePlayerCounts() {
|
||||
|
||||
DatabaseManager dbm = DatabaseManager.getInstance();
|
||||
DatabaseManager dbm = DatabaseManager.getInstance();
|
||||
|
||||
// All players
|
||||
dbm.setStatEntry("player_count", String.valueOf(Bukkit.getServer().getOnlinePlayers().size()));
|
||||
// All players
|
||||
dbm.setStatEntry("player_count", String.valueOf(Bukkit.getServer().getOnlinePlayers().size()));
|
||||
|
||||
// Staff
|
||||
int amount = 0;
|
||||
for (Player p : Bukkit.getServer().getOnlinePlayers()) {
|
||||
// Staff
|
||||
int amount = 0;
|
||||
for (Player p : Bukkit.getServer().getOnlinePlayers()) {
|
||||
|
||||
if (StaffOGPlugin.getVaultPerms().has(p, "staffog.isstaff")) {
|
||||
if (StaffOGPlugin.hasPermission(p, "staffog.isstaff")) {
|
||||
|
||||
amount++;
|
||||
amount++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
dbm.setStatEntry("staff_count", String.valueOf(amount));
|
||||
dbm.setStatEntry("staff_count", String.valueOf(amount));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,7 +2,6 @@ package uk.hotten.staffog.data.jooq;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.jooq.Constants;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.impl.CatalogImpl;
|
||||
@@ -13,36 +12,40 @@ import org.jooq.impl.CatalogImpl;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class DefaultCatalog extends CatalogImpl {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>DEFAULT_CATALOG</code>
|
||||
*/
|
||||
public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog();
|
||||
/**
|
||||
* The reference instance of <code>DEFAULT_CATALOG</code>
|
||||
*/
|
||||
public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog();
|
||||
|
||||
/**
|
||||
* The schema <code>staffog</code>.
|
||||
*/
|
||||
public final Staffog STAFFOG = Staffog.STAFFOG;
|
||||
/**
|
||||
* The schema <code>staffog</code>.
|
||||
*/
|
||||
public final Staffog STAFFOG = Staffog.STAFFOG;
|
||||
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
private DefaultCatalog() {
|
||||
super("");
|
||||
}
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
private DefaultCatalog() {
|
||||
|
||||
@Override
|
||||
public final List<Schema> getSchemas() {
|
||||
return Arrays.asList(Staffog.STAFFOG);
|
||||
}
|
||||
super("");
|
||||
|
||||
/**
|
||||
* A reference to the 3.18 minor release of the code generator. If this
|
||||
* doesn't compile, it's because the runtime library uses an older minor
|
||||
* release, namely: 3.18. You can turn off the generation of this reference
|
||||
* by specifying /configuration/generator/generate/jooqVersionReference
|
||||
*/
|
||||
private static final String REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_18;
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public final List<Schema> getSchemas() {
|
||||
|
||||
return Arrays.asList(Staffog.STAFFOG);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A reference to the 3.18 minor release of the code generator. If this doesn't
|
||||
* compile, it's because the runtime library uses an older minor release,
|
||||
* namely: 3.18. You can turn off the generation of this reference by specifying
|
||||
* /configuration/generator/generate/jooqVersionReference
|
||||
*/
|
||||
private static final String REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_18;
|
||||
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.Internal;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogAppeal;
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogAudit;
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogBan;
|
||||
@@ -32,28 +31,53 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogWebRecord;
|
||||
|
||||
/**
|
||||
* A class modeling foreign key relationships and constraints of tables in
|
||||
* Staff-OG.
|
||||
* This class was generated by jOOQ.
|
||||
* Staff-OG. This class was generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Keys {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// UNIQUE and PRIMARY KEY definitions
|
||||
// -------------------------------------------------------------------------
|
||||
// -------------------------------------------------------------------------
|
||||
// UNIQUE and PRIMARY KEY definitions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public static final UniqueKey<StaffogAppealRecord> KEY_STAFFOG_APPEAL_PRIMARY = Internal.createUniqueKey(StaffogAppeal.STAFFOG_APPEAL, DSL.name("KEY_staffog_appeal_PRIMARY"), new TableField[] { StaffogAppeal.STAFFOG_APPEAL.ID }, true);
|
||||
public static final UniqueKey<StaffogAuditRecord> KEY_STAFFOG_AUDIT_PRIMARY = Internal.createUniqueKey(StaffogAudit.STAFFOG_AUDIT, DSL.name("KEY_staffog_audit_PRIMARY"), new TableField[] { StaffogAudit.STAFFOG_AUDIT.ID }, true);
|
||||
public static final UniqueKey<StaffogBanRecord> KEY_STAFFOG_BAN_PRIMARY = Internal.createUniqueKey(StaffogBan.STAFFOG_BAN, DSL.name("KEY_staffog_ban_PRIMARY"), new TableField[] { StaffogBan.STAFFOG_BAN.ID }, true);
|
||||
public static final UniqueKey<StaffogChatreportRecord> KEY_STAFFOG_CHATREPORT_PRIMARY = Internal.createUniqueKey(StaffogChatreport.STAFFOG_CHATREPORT, DSL.name("KEY_staffog_chatreport_PRIMARY"), new TableField[] { StaffogChatreport.STAFFOG_CHATREPORT.ID }, true);
|
||||
public static final UniqueKey<StaffogHistoryRecord> KEY_STAFFOG_HISTORY_PRIMARY = Internal.createUniqueKey(StaffogHistory.STAFFOG_HISTORY, DSL.name("KEY_staffog_history_PRIMARY"), new TableField[] { StaffogHistory.STAFFOG_HISTORY.ID }, true);
|
||||
public static final UniqueKey<StaffogKickRecord> KEY_STAFFOG_KICK_PRIMARY = Internal.createUniqueKey(StaffogKick.STAFFOG_KICK, DSL.name("KEY_staffog_kick_PRIMARY"), new TableField[] { StaffogKick.STAFFOG_KICK.ID }, true);
|
||||
public static final UniqueKey<StaffogLinkcodeRecord> KEY_STAFFOG_LINKCODE_UUID = Internal.createUniqueKey(StaffogLinkcode.STAFFOG_LINKCODE, DSL.name("KEY_staffog_linkcode_uuid"), new TableField[] { StaffogLinkcode.STAFFOG_LINKCODE.UUID }, true);
|
||||
public static final UniqueKey<StaffogMuteRecord> KEY_STAFFOG_MUTE_PRIMARY = Internal.createUniqueKey(StaffogMute.STAFFOG_MUTE, DSL.name("KEY_staffog_mute_PRIMARY"), new TableField[] { StaffogMute.STAFFOG_MUTE.ID }, true);
|
||||
public static final UniqueKey<StaffogReportRecord> KEY_STAFFOG_REPORT_PRIMARY = Internal.createUniqueKey(StaffogReport.STAFFOG_REPORT, DSL.name("KEY_staffog_report_PRIMARY"), new TableField[] { StaffogReport.STAFFOG_REPORT.ID }, true);
|
||||
public static final UniqueKey<StaffogStaffipRecord> KEY_STAFFOG_STAFFIP_PRIMARY = Internal.createUniqueKey(StaffogStaffip.STAFFOG_STAFFIP, DSL.name("KEY_staffog_staffip_PRIMARY"), new TableField[] { StaffogStaffip.STAFFOG_STAFFIP.ID }, true);
|
||||
public static final UniqueKey<StaffogTaskRecord> KEY_STAFFOG_TASK_PRIMARY = Internal.createUniqueKey(StaffogTask.STAFFOG_TASK, DSL.name("KEY_staffog_task_PRIMARY"), new TableField[] { StaffogTask.STAFFOG_TASK.ID }, true);
|
||||
public static final UniqueKey<StaffogWebRecord> KEY_STAFFOG_WEB_PRIMARY = Internal.createUniqueKey(StaffogWeb.STAFFOG_WEB, DSL.name("KEY_staffog_web_PRIMARY"), new TableField[] { StaffogWeb.STAFFOG_WEB.ID }, true);
|
||||
public static final UniqueKey<StaffogWebRecord> KEY_STAFFOG_WEB_USERNAME = Internal.createUniqueKey(StaffogWeb.STAFFOG_WEB, DSL.name("KEY_staffog_web_username"), new TableField[] { StaffogWeb.STAFFOG_WEB.USERNAME, StaffogWeb.STAFFOG_WEB.UUID }, true);
|
||||
public static final UniqueKey<StaffogAppealRecord> KEY_STAFFOG_APPEAL_PRIMARY = Internal
|
||||
.createUniqueKey(StaffogAppeal.STAFFOG_APPEAL, DSL.name("KEY_staffog_appeal_PRIMARY"), new TableField[]
|
||||
{ StaffogAppeal.STAFFOG_APPEAL.ID }, true);
|
||||
public static final UniqueKey<StaffogAuditRecord> KEY_STAFFOG_AUDIT_PRIMARY = Internal
|
||||
.createUniqueKey(StaffogAudit.STAFFOG_AUDIT, DSL.name("KEY_staffog_audit_PRIMARY"), new TableField[]
|
||||
{ StaffogAudit.STAFFOG_AUDIT.ID }, true);
|
||||
public static final UniqueKey<StaffogBanRecord> KEY_STAFFOG_BAN_PRIMARY = Internal
|
||||
.createUniqueKey(StaffogBan.STAFFOG_BAN, DSL.name("KEY_staffog_ban_PRIMARY"), new TableField[]
|
||||
{ StaffogBan.STAFFOG_BAN.ID }, true);
|
||||
public static final UniqueKey<StaffogChatreportRecord> KEY_STAFFOG_CHATREPORT_PRIMARY = Internal.createUniqueKey(
|
||||
StaffogChatreport.STAFFOG_CHATREPORT, DSL.name("KEY_staffog_chatreport_PRIMARY"), new TableField[]
|
||||
{ StaffogChatreport.STAFFOG_CHATREPORT.ID }, true);
|
||||
public static final UniqueKey<StaffogHistoryRecord> KEY_STAFFOG_HISTORY_PRIMARY = Internal
|
||||
.createUniqueKey(StaffogHistory.STAFFOG_HISTORY, DSL.name("KEY_staffog_history_PRIMARY"), new TableField[]
|
||||
{ StaffogHistory.STAFFOG_HISTORY.ID }, true);
|
||||
public static final UniqueKey<StaffogKickRecord> KEY_STAFFOG_KICK_PRIMARY = Internal
|
||||
.createUniqueKey(StaffogKick.STAFFOG_KICK, DSL.name("KEY_staffog_kick_PRIMARY"), new TableField[]
|
||||
{ StaffogKick.STAFFOG_KICK.ID }, true);
|
||||
public static final UniqueKey<StaffogLinkcodeRecord> KEY_STAFFOG_LINKCODE_UUID = Internal
|
||||
.createUniqueKey(StaffogLinkcode.STAFFOG_LINKCODE, DSL.name("KEY_staffog_linkcode_uuid"), new TableField[]
|
||||
{ StaffogLinkcode.STAFFOG_LINKCODE.UUID }, true);
|
||||
public static final UniqueKey<StaffogMuteRecord> KEY_STAFFOG_MUTE_PRIMARY = Internal
|
||||
.createUniqueKey(StaffogMute.STAFFOG_MUTE, DSL.name("KEY_staffog_mute_PRIMARY"), new TableField[]
|
||||
{ StaffogMute.STAFFOG_MUTE.ID }, true);
|
||||
public static final UniqueKey<StaffogReportRecord> KEY_STAFFOG_REPORT_PRIMARY = Internal
|
||||
.createUniqueKey(StaffogReport.STAFFOG_REPORT, DSL.name("KEY_staffog_report_PRIMARY"), new TableField[]
|
||||
{ StaffogReport.STAFFOG_REPORT.ID }, true);
|
||||
public static final UniqueKey<StaffogStaffipRecord> KEY_STAFFOG_STAFFIP_PRIMARY = Internal
|
||||
.createUniqueKey(StaffogStaffip.STAFFOG_STAFFIP, DSL.name("KEY_staffog_staffip_PRIMARY"), new TableField[]
|
||||
{ StaffogStaffip.STAFFOG_STAFFIP.ID }, true);
|
||||
public static final UniqueKey<StaffogTaskRecord> KEY_STAFFOG_TASK_PRIMARY = Internal
|
||||
.createUniqueKey(StaffogTask.STAFFOG_TASK, DSL.name("KEY_staffog_task_PRIMARY"), new TableField[]
|
||||
{ StaffogTask.STAFFOG_TASK.ID }, true);
|
||||
public static final UniqueKey<StaffogWebRecord> KEY_STAFFOG_WEB_PRIMARY = Internal
|
||||
.createUniqueKey(StaffogWeb.STAFFOG_WEB, DSL.name("KEY_staffog_web_PRIMARY"), new TableField[]
|
||||
{ StaffogWeb.STAFFOG_WEB.ID }, true);
|
||||
public static final UniqueKey<StaffogWebRecord> KEY_STAFFOG_WEB_USERNAME = Internal
|
||||
.createUniqueKey(StaffogWeb.STAFFOG_WEB, DSL.name("KEY_staffog_web_username"), new TableField[]
|
||||
{ StaffogWeb.STAFFOG_WEB.USERNAME, StaffogWeb.STAFFOG_WEB.UUID }, true);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,9 @@ package uk.hotten.staffog.data.jooq;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.jooq.Catalog;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.impl.SchemaImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogAppeal;
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogAudit;
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogBan;
|
||||
@@ -27,108 +25,103 @@ import uk.hotten.staffog.data.jooq.tables.StaffogWeb;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Staffog extends SchemaImpl {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog</code>
|
||||
*/
|
||||
public static final Staffog STAFFOG = new Staffog();
|
||||
/**
|
||||
* The reference instance of <code>staffog</code>
|
||||
*/
|
||||
public static final Staffog STAFFOG = new Staffog();
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_appeal</code>.
|
||||
*/
|
||||
public final StaffogAppeal STAFFOG_APPEAL = StaffogAppeal.STAFFOG_APPEAL;
|
||||
/**
|
||||
* The table <code>staffog.staffog_appeal</code>.
|
||||
*/
|
||||
public final StaffogAppeal STAFFOG_APPEAL = StaffogAppeal.STAFFOG_APPEAL;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_audit</code>.
|
||||
*/
|
||||
public final StaffogAudit STAFFOG_AUDIT = StaffogAudit.STAFFOG_AUDIT;
|
||||
/**
|
||||
* The table <code>staffog.staffog_audit</code>.
|
||||
*/
|
||||
public final StaffogAudit STAFFOG_AUDIT = StaffogAudit.STAFFOG_AUDIT;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_ban</code>.
|
||||
*/
|
||||
public final StaffogBan STAFFOG_BAN = StaffogBan.STAFFOG_BAN;
|
||||
/**
|
||||
* The table <code>staffog.staffog_ban</code>.
|
||||
*/
|
||||
public final StaffogBan STAFFOG_BAN = StaffogBan.STAFFOG_BAN;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_chatreport</code>.
|
||||
*/
|
||||
public final StaffogChatreport STAFFOG_CHATREPORT = StaffogChatreport.STAFFOG_CHATREPORT;
|
||||
/**
|
||||
* The table <code>staffog.staffog_chatreport</code>.
|
||||
*/
|
||||
public final StaffogChatreport STAFFOG_CHATREPORT = StaffogChatreport.STAFFOG_CHATREPORT;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_history</code>.
|
||||
*/
|
||||
public final StaffogHistory STAFFOG_HISTORY = StaffogHistory.STAFFOG_HISTORY;
|
||||
/**
|
||||
* The table <code>staffog.staffog_history</code>.
|
||||
*/
|
||||
public final StaffogHistory STAFFOG_HISTORY = StaffogHistory.STAFFOG_HISTORY;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_kick</code>.
|
||||
*/
|
||||
public final StaffogKick STAFFOG_KICK = StaffogKick.STAFFOG_KICK;
|
||||
/**
|
||||
* The table <code>staffog.staffog_kick</code>.
|
||||
*/
|
||||
public final StaffogKick STAFFOG_KICK = StaffogKick.STAFFOG_KICK;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_linkcode</code>.
|
||||
*/
|
||||
public final StaffogLinkcode STAFFOG_LINKCODE = StaffogLinkcode.STAFFOG_LINKCODE;
|
||||
/**
|
||||
* The table <code>staffog.staffog_linkcode</code>.
|
||||
*/
|
||||
public final StaffogLinkcode STAFFOG_LINKCODE = StaffogLinkcode.STAFFOG_LINKCODE;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_mute</code>.
|
||||
*/
|
||||
public final StaffogMute STAFFOG_MUTE = StaffogMute.STAFFOG_MUTE;
|
||||
/**
|
||||
* The table <code>staffog.staffog_mute</code>.
|
||||
*/
|
||||
public final StaffogMute STAFFOG_MUTE = StaffogMute.STAFFOG_MUTE;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_report</code>.
|
||||
*/
|
||||
public final StaffogReport STAFFOG_REPORT = StaffogReport.STAFFOG_REPORT;
|
||||
/**
|
||||
* The table <code>staffog.staffog_report</code>.
|
||||
*/
|
||||
public final StaffogReport STAFFOG_REPORT = StaffogReport.STAFFOG_REPORT;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_staffip</code>.
|
||||
*/
|
||||
public final StaffogStaffip STAFFOG_STAFFIP = StaffogStaffip.STAFFOG_STAFFIP;
|
||||
/**
|
||||
* The table <code>staffog.staffog_staffip</code>.
|
||||
*/
|
||||
public final StaffogStaffip STAFFOG_STAFFIP = StaffogStaffip.STAFFOG_STAFFIP;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_stat</code>.
|
||||
*/
|
||||
public final StaffogStat STAFFOG_STAT = StaffogStat.STAFFOG_STAT;
|
||||
/**
|
||||
* The table <code>staffog.staffog_stat</code>.
|
||||
*/
|
||||
public final StaffogStat STAFFOG_STAT = StaffogStat.STAFFOG_STAT;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_task</code>.
|
||||
*/
|
||||
public final StaffogTask STAFFOG_TASK = StaffogTask.STAFFOG_TASK;
|
||||
/**
|
||||
* The table <code>staffog.staffog_task</code>.
|
||||
*/
|
||||
public final StaffogTask STAFFOG_TASK = StaffogTask.STAFFOG_TASK;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_web</code>.
|
||||
*/
|
||||
public final StaffogWeb STAFFOG_WEB = StaffogWeb.STAFFOG_WEB;
|
||||
/**
|
||||
* The table <code>staffog.staffog_web</code>.
|
||||
*/
|
||||
public final StaffogWeb STAFFOG_WEB = StaffogWeb.STAFFOG_WEB;
|
||||
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
private Staffog() {
|
||||
super("staffog", null);
|
||||
}
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
private Staffog() {
|
||||
|
||||
super("staffog", null);
|
||||
|
||||
@Override
|
||||
public Catalog getCatalog() {
|
||||
return DefaultCatalog.DEFAULT_CATALOG;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<Table<?>> getTables() {
|
||||
return Arrays.asList(
|
||||
StaffogAppeal.STAFFOG_APPEAL,
|
||||
StaffogAudit.STAFFOG_AUDIT,
|
||||
StaffogBan.STAFFOG_BAN,
|
||||
StaffogChatreport.STAFFOG_CHATREPORT,
|
||||
StaffogHistory.STAFFOG_HISTORY,
|
||||
StaffogKick.STAFFOG_KICK,
|
||||
StaffogLinkcode.STAFFOG_LINKCODE,
|
||||
StaffogMute.STAFFOG_MUTE,
|
||||
StaffogReport.STAFFOG_REPORT,
|
||||
StaffogStaffip.STAFFOG_STAFFIP,
|
||||
StaffogStat.STAFFOG_STAT,
|
||||
StaffogTask.STAFFOG_TASK,
|
||||
StaffogWeb.STAFFOG_WEB
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public Catalog getCatalog() {
|
||||
|
||||
}
|
||||
return DefaultCatalog.DEFAULT_CATALOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<Table<?>> getTables() {
|
||||
|
||||
return Arrays.asList(StaffogAppeal.STAFFOG_APPEAL, StaffogAudit.STAFFOG_AUDIT, StaffogBan.STAFFOG_BAN,
|
||||
StaffogChatreport.STAFFOG_CHATREPORT, StaffogHistory.STAFFOG_HISTORY, StaffogKick.STAFFOG_KICK,
|
||||
StaffogLinkcode.STAFFOG_LINKCODE, StaffogMute.STAFFOG_MUTE, StaffogReport.STAFFOG_REPORT,
|
||||
StaffogStaffip.STAFFOG_STAFFIP, StaffogStat.STAFFOG_STAT, StaffogTask.STAFFOG_TASK,
|
||||
StaffogWeb.STAFFOG_WEB);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,69 +20,69 @@ import uk.hotten.staffog.data.jooq.tables.StaffogWeb;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Tables {
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_appeal</code>.
|
||||
*/
|
||||
public static final StaffogAppeal STAFFOG_APPEAL = StaffogAppeal.STAFFOG_APPEAL;
|
||||
/**
|
||||
* The table <code>staffog.staffog_appeal</code>.
|
||||
*/
|
||||
public static final StaffogAppeal STAFFOG_APPEAL = StaffogAppeal.STAFFOG_APPEAL;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_audit</code>.
|
||||
*/
|
||||
public static final StaffogAudit STAFFOG_AUDIT = StaffogAudit.STAFFOG_AUDIT;
|
||||
/**
|
||||
* The table <code>staffog.staffog_audit</code>.
|
||||
*/
|
||||
public static final StaffogAudit STAFFOG_AUDIT = StaffogAudit.STAFFOG_AUDIT;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_ban</code>.
|
||||
*/
|
||||
public static final StaffogBan STAFFOG_BAN = StaffogBan.STAFFOG_BAN;
|
||||
/**
|
||||
* The table <code>staffog.staffog_ban</code>.
|
||||
*/
|
||||
public static final StaffogBan STAFFOG_BAN = StaffogBan.STAFFOG_BAN;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_chatreport</code>.
|
||||
*/
|
||||
public static final StaffogChatreport STAFFOG_CHATREPORT = StaffogChatreport.STAFFOG_CHATREPORT;
|
||||
/**
|
||||
* The table <code>staffog.staffog_chatreport</code>.
|
||||
*/
|
||||
public static final StaffogChatreport STAFFOG_CHATREPORT = StaffogChatreport.STAFFOG_CHATREPORT;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_history</code>.
|
||||
*/
|
||||
public static final StaffogHistory STAFFOG_HISTORY = StaffogHistory.STAFFOG_HISTORY;
|
||||
/**
|
||||
* The table <code>staffog.staffog_history</code>.
|
||||
*/
|
||||
public static final StaffogHistory STAFFOG_HISTORY = StaffogHistory.STAFFOG_HISTORY;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_kick</code>.
|
||||
*/
|
||||
public static final StaffogKick STAFFOG_KICK = StaffogKick.STAFFOG_KICK;
|
||||
/**
|
||||
* The table <code>staffog.staffog_kick</code>.
|
||||
*/
|
||||
public static final StaffogKick STAFFOG_KICK = StaffogKick.STAFFOG_KICK;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_linkcode</code>.
|
||||
*/
|
||||
public static final StaffogLinkcode STAFFOG_LINKCODE = StaffogLinkcode.STAFFOG_LINKCODE;
|
||||
/**
|
||||
* The table <code>staffog.staffog_linkcode</code>.
|
||||
*/
|
||||
public static final StaffogLinkcode STAFFOG_LINKCODE = StaffogLinkcode.STAFFOG_LINKCODE;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_mute</code>.
|
||||
*/
|
||||
public static final StaffogMute STAFFOG_MUTE = StaffogMute.STAFFOG_MUTE;
|
||||
/**
|
||||
* The table <code>staffog.staffog_mute</code>.
|
||||
*/
|
||||
public static final StaffogMute STAFFOG_MUTE = StaffogMute.STAFFOG_MUTE;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_report</code>.
|
||||
*/
|
||||
public static final StaffogReport STAFFOG_REPORT = StaffogReport.STAFFOG_REPORT;
|
||||
/**
|
||||
* The table <code>staffog.staffog_report</code>.
|
||||
*/
|
||||
public static final StaffogReport STAFFOG_REPORT = StaffogReport.STAFFOG_REPORT;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_staffip</code>.
|
||||
*/
|
||||
public static final StaffogStaffip STAFFOG_STAFFIP = StaffogStaffip.STAFFOG_STAFFIP;
|
||||
/**
|
||||
* The table <code>staffog.staffog_staffip</code>.
|
||||
*/
|
||||
public static final StaffogStaffip STAFFOG_STAFFIP = StaffogStaffip.STAFFOG_STAFFIP;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_stat</code>.
|
||||
*/
|
||||
public static final StaffogStat STAFFOG_STAT = StaffogStat.STAFFOG_STAT;
|
||||
/**
|
||||
* The table <code>staffog.staffog_stat</code>.
|
||||
*/
|
||||
public static final StaffogStat STAFFOG_STAT = StaffogStat.STAFFOG_STAT;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_task</code>.
|
||||
*/
|
||||
public static final StaffogTask STAFFOG_TASK = StaffogTask.STAFFOG_TASK;
|
||||
/**
|
||||
* The table <code>staffog.staffog_task</code>.
|
||||
*/
|
||||
public static final StaffogTask STAFFOG_TASK = StaffogTask.STAFFOG_TASK;
|
||||
|
||||
/**
|
||||
* The table <code>staffog.staffog_web</code>.
|
||||
*/
|
||||
public static final StaffogWeb STAFFOG_WEB = StaffogWeb.STAFFOG_WEB;
|
||||
/**
|
||||
* The table <code>staffog.staffog_web</code>.
|
||||
*/
|
||||
public static final StaffogWeb STAFFOG_WEB = StaffogWeb.STAFFOG_WEB;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function12;
|
||||
@@ -19,7 +18,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogAppealRecord;
|
||||
@@ -30,190 +28,243 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogAppealRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogAppeal extends TableImpl<StaffogAppealRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_appeal</code>
|
||||
*/
|
||||
public static final StaffogAppeal STAFFOG_APPEAL = new StaffogAppeal();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_appeal</code>
|
||||
*/
|
||||
public static final StaffogAppeal STAFFOG_APPEAL = new StaffogAppeal();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogAppealRecord> getRecordType() {
|
||||
return StaffogAppealRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogAppealRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
return StaffogAppealRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> UUID = createField(DSL.name("uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Long> TIME = createField(DSL.name("time"), SQLDataType.BIGINT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Integer> ID = createField(DSL.name("id"),
|
||||
SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.type</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> TYPE = createField(DSL.name("type"), SQLDataType.VARCHAR(128).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> UUID = createField(DSL.name("uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.pid</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Integer> PID = createField(DSL.name("pid"), SQLDataType.INTEGER.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Long> TIME = createField(DSL.name("time"),
|
||||
SQLDataType.BIGINT.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> REASON = createField(DSL.name("reason"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.type</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> TYPE = createField(DSL.name("type"),
|
||||
SQLDataType.VARCHAR(128).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.evidence</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> EVIDENCE = createField(DSL.name("evidence"), SQLDataType.VARCHAR(2048).nullable(false).defaultValue(DSL.inline("[]", SQLDataType.VARCHAR)), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.pid</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Integer> PID = createField(DSL.name("pid"),
|
||||
SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.open</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Boolean> OPEN = createField(DSL.name("open"), SQLDataType.BIT.nullable(false).defaultValue(DSL.inline("b'1'", SQLDataType.BIT)), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> REASON = createField(DSL.name("reason"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.assigned</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> ASSIGNED = createField(DSL.name("assigned"), SQLDataType.VARCHAR(36), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.evidence</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> EVIDENCE = createField(DSL.name("evidence"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false).defaultValue(DSL.inline("[]", SQLDataType.VARCHAR)), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.verdict</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Boolean> VERDICT = createField(DSL.name("verdict"), SQLDataType.BIT, this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.open</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Boolean> OPEN = createField(DSL.name("open"),
|
||||
SQLDataType.BIT.nullable(false).defaultValue(DSL.inline("b'1'", SQLDataType.BIT)), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.verdict_time</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Long> VERDICT_TIME = createField(DSL.name("verdict_time"), SQLDataType.BIGINT, this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.assigned</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> ASSIGNED = createField(DSL.name("assigned"),
|
||||
SQLDataType.VARCHAR(36), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.comment</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> COMMENT = createField(DSL.name("comment"), SQLDataType.VARCHAR(2048), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.verdict</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Boolean> VERDICT = createField(DSL.name("verdict"), SQLDataType.BIT,
|
||||
this, "");
|
||||
|
||||
private StaffogAppeal(Name alias, Table<StaffogAppealRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.verdict_time</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, Long> VERDICT_TIME = createField(DSL.name("verdict_time"),
|
||||
SQLDataType.BIGINT, this, "");
|
||||
|
||||
private StaffogAppeal(Name alias, Table<StaffogAppealRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_appeal.comment</code>.
|
||||
*/
|
||||
public final TableField<StaffogAppealRecord, String> COMMENT = createField(DSL.name("comment"),
|
||||
SQLDataType.VARCHAR(2048), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_appeal</code> table reference
|
||||
*/
|
||||
public StaffogAppeal(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_APPEAL);
|
||||
}
|
||||
private StaffogAppeal(Name alias, Table<StaffogAppealRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_appeal</code> table reference
|
||||
*/
|
||||
public StaffogAppeal(Name alias) {
|
||||
this(alias, STAFFOG_APPEAL);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_appeal</code> table reference
|
||||
*/
|
||||
public StaffogAppeal() {
|
||||
this(DSL.name("staffog_appeal"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogAppeal(Table<O> child, ForeignKey<O, StaffogAppealRecord> key) {
|
||||
super(child, key, STAFFOG_APPEAL);
|
||||
}
|
||||
private StaffogAppeal(Name alias, Table<StaffogAppealRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public Identity<StaffogAppealRecord, Integer> getIdentity() {
|
||||
return (Identity<StaffogAppealRecord, Integer>) super.getIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogAppealRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_APPEAL_PRIMARY;
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_appeal</code> table reference
|
||||
*/
|
||||
public StaffogAppeal(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogAppeal as(String alias) {
|
||||
return new StaffogAppeal(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_APPEAL);
|
||||
|
||||
@Override
|
||||
public StaffogAppeal as(Name alias) {
|
||||
return new StaffogAppeal(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAppeal as(Table<?> alias) {
|
||||
return new StaffogAppeal(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_appeal</code> table reference
|
||||
*/
|
||||
public StaffogAppeal(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAppeal rename(String name) {
|
||||
return new StaffogAppeal(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_APPEAL);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAppeal rename(Name name) {
|
||||
return new StaffogAppeal(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAppeal rename(Table<?> name) {
|
||||
return new StaffogAppeal(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_appeal</code> table reference
|
||||
*/
|
||||
public StaffogAppeal() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row12 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_appeal"), null);
|
||||
|
||||
@Override
|
||||
public Row12<Integer, String, Long, String, Integer, String, String, Boolean, String, Boolean, Long, String> fieldsRow() {
|
||||
return (Row12) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function12<? super Integer, ? super String, ? super Long, ? super String, ? super Integer, ? super String, ? super String, ? super Boolean, ? super String, ? super Boolean, ? super Long, ? super String, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogAppeal(Table<O> child, ForeignKey<O, StaffogAppealRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function12<? super Integer, ? super String, ? super Long, ? super String, ? super Integer, ? super String, ? super String, ? super Boolean, ? super String, ? super Boolean, ? super Long, ? super String, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_APPEAL);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<StaffogAppealRecord, Integer> getIdentity() {
|
||||
|
||||
return (Identity<StaffogAppealRecord, Integer>) super.getIdentity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogAppealRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_APPEAL_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAppeal as(String alias) {
|
||||
|
||||
return new StaffogAppeal(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAppeal as(Name alias) {
|
||||
|
||||
return new StaffogAppeal(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAppeal as(Table<?> alias) {
|
||||
|
||||
return new StaffogAppeal(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAppeal rename(String name) {
|
||||
|
||||
return new StaffogAppeal(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAppeal rename(Name name) {
|
||||
|
||||
return new StaffogAppeal(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAppeal rename(Table<?> name) {
|
||||
|
||||
return new StaffogAppeal(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row12 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row12<Integer, String, Long, String, Integer, String, String, Boolean, String, Boolean, Long, String> fieldsRow() {
|
||||
|
||||
return (Row12) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(
|
||||
Function12<? super Integer, ? super String, ? super Long, ? super String, ? super Integer, ? super String, ? super String, ? super Boolean, ? super String, ? super Boolean, ? super Long, ? super String, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function12<? super Integer, ? super String, ? super Long, ? super String, ? super Integer, ? super String, ? super String, ? super Boolean, ? super String, ? super Boolean, ? super Long, ? super String, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function4;
|
||||
@@ -19,7 +18,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogAuditRecord;
|
||||
@@ -30,150 +28,195 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogAuditRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogAudit extends TableImpl<StaffogAuditRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_audit</code>
|
||||
*/
|
||||
public static final StaffogAudit STAFFOG_AUDIT = new StaffogAudit();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_audit</code>
|
||||
*/
|
||||
public static final StaffogAudit STAFFOG_AUDIT = new StaffogAudit();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogAuditRecord> getRecordType() {
|
||||
return StaffogAuditRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogAuditRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_audit.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogAuditRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
return StaffogAuditRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_audit.type</code>.
|
||||
*/
|
||||
public final TableField<StaffogAuditRecord, String> TYPE = createField(DSL.name("type"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_audit.data</code>.
|
||||
*/
|
||||
public final TableField<StaffogAuditRecord, String> DATA = createField(DSL.name("data"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_audit.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogAuditRecord, Integer> ID = createField(DSL.name("id"),
|
||||
SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_audit.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogAuditRecord, Long> TIME = createField(DSL.name("time"), SQLDataType.BIGINT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_audit.type</code>.
|
||||
*/
|
||||
public final TableField<StaffogAuditRecord, String> TYPE = createField(DSL.name("type"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
private StaffogAudit(Name alias, Table<StaffogAuditRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_audit.data</code>.
|
||||
*/
|
||||
public final TableField<StaffogAuditRecord, String> DATA = createField(DSL.name("data"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
private StaffogAudit(Name alias, Table<StaffogAuditRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_audit.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogAuditRecord, Long> TIME = createField(DSL.name("time"),
|
||||
SQLDataType.BIGINT.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_audit</code> table reference
|
||||
*/
|
||||
public StaffogAudit(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_AUDIT);
|
||||
}
|
||||
private StaffogAudit(Name alias, Table<StaffogAuditRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_audit</code> table reference
|
||||
*/
|
||||
public StaffogAudit(Name alias) {
|
||||
this(alias, STAFFOG_AUDIT);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_audit</code> table reference
|
||||
*/
|
||||
public StaffogAudit() {
|
||||
this(DSL.name("staffog_audit"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogAudit(Table<O> child, ForeignKey<O, StaffogAuditRecord> key) {
|
||||
super(child, key, STAFFOG_AUDIT);
|
||||
}
|
||||
private StaffogAudit(Name alias, Table<StaffogAuditRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public Identity<StaffogAuditRecord, Integer> getIdentity() {
|
||||
return (Identity<StaffogAuditRecord, Integer>) super.getIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogAuditRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_AUDIT_PRIMARY;
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_audit</code> table reference
|
||||
*/
|
||||
public StaffogAudit(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogAudit as(String alias) {
|
||||
return new StaffogAudit(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_AUDIT);
|
||||
|
||||
@Override
|
||||
public StaffogAudit as(Name alias) {
|
||||
return new StaffogAudit(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAudit as(Table<?> alias) {
|
||||
return new StaffogAudit(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_audit</code> table reference
|
||||
*/
|
||||
public StaffogAudit(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAudit rename(String name) {
|
||||
return new StaffogAudit(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_AUDIT);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAudit rename(Name name) {
|
||||
return new StaffogAudit(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAudit rename(Table<?> name) {
|
||||
return new StaffogAudit(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_audit</code> table reference
|
||||
*/
|
||||
public StaffogAudit() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row4 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_audit"), null);
|
||||
|
||||
@Override
|
||||
public Row4<Integer, String, String, Long> fieldsRow() {
|
||||
return (Row4) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function4<? super Integer, ? super String, ? super String, ? super Long, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogAudit(Table<O> child, ForeignKey<O, StaffogAuditRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function4<? super Integer, ? super String, ? super String, ? super Long, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_AUDIT);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<StaffogAuditRecord, Integer> getIdentity() {
|
||||
|
||||
return (Identity<StaffogAuditRecord, Integer>) super.getIdentity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogAuditRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_AUDIT_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAudit as(String alias) {
|
||||
|
||||
return new StaffogAudit(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAudit as(Name alias) {
|
||||
|
||||
return new StaffogAudit(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAudit as(Table<?> alias) {
|
||||
|
||||
return new StaffogAudit(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAudit rename(String name) {
|
||||
|
||||
return new StaffogAudit(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAudit rename(Name name) {
|
||||
|
||||
return new StaffogAudit(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogAudit rename(Table<?> name) {
|
||||
|
||||
return new StaffogAudit(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row4 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row4<Integer, String, String, Long> fieldsRow() {
|
||||
|
||||
return (Row4) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(
|
||||
Function4<? super Integer, ? super String, ? super String, ? super Long, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function4<? super Integer, ? super String, ? super String, ? super Long, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function12;
|
||||
@@ -19,7 +18,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogBanRecord;
|
||||
@@ -30,190 +28,243 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogBanRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogBan extends TableImpl<StaffogBanRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_ban</code>
|
||||
*/
|
||||
public static final StaffogBan STAFFOG_BAN = new StaffogBan();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_ban</code>
|
||||
*/
|
||||
public static final StaffogBan STAFFOG_BAN = new StaffogBan();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogBanRecord> getRecordType() {
|
||||
return StaffogBanRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogBanRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, Long> ID = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
return StaffogBanRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> UUID = createField(DSL.name("uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> REASON = createField(DSL.name("reason"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, Long> ID = createField(DSL.name("id"),
|
||||
SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.by_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> BY_UUID = createField(DSL.name("by_uuid"), SQLDataType.VARCHAR(36), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> UUID = createField(DSL.name("uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.by_name</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> BY_NAME = createField(DSL.name("by_name"), SQLDataType.VARCHAR(128), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> REASON = createField(DSL.name("reason"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.removed_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> REMOVED_UUID = createField(DSL.name("removed_uuid"), SQLDataType.VARCHAR(36), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.by_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> BY_UUID = createField(DSL.name("by_uuid"),
|
||||
SQLDataType.VARCHAR(36), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.removed_name</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> REMOVED_NAME = createField(DSL.name("removed_name"), SQLDataType.VARCHAR(128), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.by_name</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> BY_NAME = createField(DSL.name("by_name"),
|
||||
SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.removed_reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> REMOVED_REASON = createField(DSL.name("removed_reason"), SQLDataType.VARCHAR(2048), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.removed_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> REMOVED_UUID = createField(DSL.name("removed_uuid"),
|
||||
SQLDataType.VARCHAR(36), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.removed_time</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, Long> REMOVED_TIME = createField(DSL.name("removed_time"), SQLDataType.BIGINT, this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.removed_name</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> REMOVED_NAME = createField(DSL.name("removed_name"),
|
||||
SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, Long> TIME = createField(DSL.name("time"), SQLDataType.BIGINT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.removed_reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, String> REMOVED_REASON = createField(DSL.name("removed_reason"),
|
||||
SQLDataType.VARCHAR(2048), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.until</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, Long> UNTIL = createField(DSL.name("until"), SQLDataType.BIGINT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.removed_time</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, Long> REMOVED_TIME = createField(DSL.name("removed_time"),
|
||||
SQLDataType.BIGINT, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.active</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, Boolean> ACTIVE = createField(DSL.name("active"), SQLDataType.BIT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, Long> TIME = createField(DSL.name("time"),
|
||||
SQLDataType.BIGINT.nullable(false), this, "");
|
||||
|
||||
private StaffogBan(Name alias, Table<StaffogBanRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.until</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, Long> UNTIL = createField(DSL.name("until"),
|
||||
SQLDataType.BIGINT.nullable(false), this, "");
|
||||
|
||||
private StaffogBan(Name alias, Table<StaffogBanRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_ban.active</code>.
|
||||
*/
|
||||
public final TableField<StaffogBanRecord, Boolean> ACTIVE = createField(DSL.name("active"),
|
||||
SQLDataType.BIT.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_ban</code> table reference
|
||||
*/
|
||||
public StaffogBan(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_BAN);
|
||||
}
|
||||
private StaffogBan(Name alias, Table<StaffogBanRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_ban</code> table reference
|
||||
*/
|
||||
public StaffogBan(Name alias) {
|
||||
this(alias, STAFFOG_BAN);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_ban</code> table reference
|
||||
*/
|
||||
public StaffogBan() {
|
||||
this(DSL.name("staffog_ban"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogBan(Table<O> child, ForeignKey<O, StaffogBanRecord> key) {
|
||||
super(child, key, STAFFOG_BAN);
|
||||
}
|
||||
private StaffogBan(Name alias, Table<StaffogBanRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public Identity<StaffogBanRecord, Long> getIdentity() {
|
||||
return (Identity<StaffogBanRecord, Long>) super.getIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogBanRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_BAN_PRIMARY;
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_ban</code> table reference
|
||||
*/
|
||||
public StaffogBan(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogBan as(String alias) {
|
||||
return new StaffogBan(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_BAN);
|
||||
|
||||
@Override
|
||||
public StaffogBan as(Name alias) {
|
||||
return new StaffogBan(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogBan as(Table<?> alias) {
|
||||
return new StaffogBan(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_ban</code> table reference
|
||||
*/
|
||||
public StaffogBan(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogBan rename(String name) {
|
||||
return new StaffogBan(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_BAN);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogBan rename(Name name) {
|
||||
return new StaffogBan(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogBan rename(Table<?> name) {
|
||||
return new StaffogBan(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_ban</code> table reference
|
||||
*/
|
||||
public StaffogBan() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row12 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_ban"), null);
|
||||
|
||||
@Override
|
||||
public Row12<Long, String, String, String, String, String, String, String, Long, Long, Long, Boolean> fieldsRow() {
|
||||
return (Row12) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function12<? super Long, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super Long, ? super Long, ? super Long, ? super Boolean, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogBan(Table<O> child, ForeignKey<O, StaffogBanRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function12<? super Long, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super Long, ? super Long, ? super Long, ? super Boolean, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_BAN);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<StaffogBanRecord, Long> getIdentity() {
|
||||
|
||||
return (Identity<StaffogBanRecord, Long>) super.getIdentity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogBanRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_BAN_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogBan as(String alias) {
|
||||
|
||||
return new StaffogBan(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogBan as(Name alias) {
|
||||
|
||||
return new StaffogBan(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogBan as(Table<?> alias) {
|
||||
|
||||
return new StaffogBan(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogBan rename(String name) {
|
||||
|
||||
return new StaffogBan(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogBan rename(Name name) {
|
||||
|
||||
return new StaffogBan(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogBan rename(Table<?> name) {
|
||||
|
||||
return new StaffogBan(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row12 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row12<Long, String, String, String, String, String, String, String, Long, Long, Long, Boolean> fieldsRow() {
|
||||
|
||||
return (Row12) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(
|
||||
Function12<? super Long, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super Long, ? super Long, ? super Long, ? super Boolean, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function12<? super Long, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super Long, ? super Long, ? super Long, ? super Boolean, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function5;
|
||||
@@ -19,7 +18,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogChatreportRecord;
|
||||
@@ -30,155 +28,201 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogChatreportRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogChatreport extends TableImpl<StaffogChatreportRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_chatreport</code>
|
||||
*/
|
||||
public static final StaffogChatreport STAFFOG_CHATREPORT = new StaffogChatreport();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_chatreport</code>
|
||||
*/
|
||||
public static final StaffogChatreport STAFFOG_CHATREPORT = new StaffogChatreport();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogChatreportRecord> getRecordType() {
|
||||
return StaffogChatreportRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogChatreportRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_chatreport.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogChatreportRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
return StaffogChatreportRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_chatreport.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogChatreportRecord, String> UUID = createField(DSL.name("uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_chatreport.by_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogChatreportRecord, String> BY_UUID = createField(DSL.name("by_uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_chatreport.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogChatreportRecord, Integer> ID = createField(DSL.name("id"),
|
||||
SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_chatreport.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogChatreportRecord, Long> TIME = createField(DSL.name("time"), SQLDataType.BIGINT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_chatreport.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogChatreportRecord, String> UUID = createField(DSL.name("uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_chatreport.messages</code>.
|
||||
*/
|
||||
public final TableField<StaffogChatreportRecord, String> MESSAGES = createField(DSL.name("messages"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_chatreport.by_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogChatreportRecord, String> BY_UUID = createField(DSL.name("by_uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
private StaffogChatreport(Name alias, Table<StaffogChatreportRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_chatreport.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogChatreportRecord, Long> TIME = createField(DSL.name("time"),
|
||||
SQLDataType.BIGINT.nullable(false), this, "");
|
||||
|
||||
private StaffogChatreport(Name alias, Table<StaffogChatreportRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_chatreport.messages</code>.
|
||||
*/
|
||||
public final TableField<StaffogChatreportRecord, String> MESSAGES = createField(DSL.name("messages"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_chatreport</code> table reference
|
||||
*/
|
||||
public StaffogChatreport(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_CHATREPORT);
|
||||
}
|
||||
private StaffogChatreport(Name alias, Table<StaffogChatreportRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_chatreport</code> table reference
|
||||
*/
|
||||
public StaffogChatreport(Name alias) {
|
||||
this(alias, STAFFOG_CHATREPORT);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_chatreport</code> table reference
|
||||
*/
|
||||
public StaffogChatreport() {
|
||||
this(DSL.name("staffog_chatreport"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogChatreport(Table<O> child, ForeignKey<O, StaffogChatreportRecord> key) {
|
||||
super(child, key, STAFFOG_CHATREPORT);
|
||||
}
|
||||
private StaffogChatreport(Name alias, Table<StaffogChatreportRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public Identity<StaffogChatreportRecord, Integer> getIdentity() {
|
||||
return (Identity<StaffogChatreportRecord, Integer>) super.getIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogChatreportRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_CHATREPORT_PRIMARY;
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_chatreport</code> table reference
|
||||
*/
|
||||
public StaffogChatreport(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogChatreport as(String alias) {
|
||||
return new StaffogChatreport(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_CHATREPORT);
|
||||
|
||||
@Override
|
||||
public StaffogChatreport as(Name alias) {
|
||||
return new StaffogChatreport(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreport as(Table<?> alias) {
|
||||
return new StaffogChatreport(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_chatreport</code> table reference
|
||||
*/
|
||||
public StaffogChatreport(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogChatreport rename(String name) {
|
||||
return new StaffogChatreport(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_CHATREPORT);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogChatreport rename(Name name) {
|
||||
return new StaffogChatreport(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogChatreport rename(Table<?> name) {
|
||||
return new StaffogChatreport(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_chatreport</code> table reference
|
||||
*/
|
||||
public StaffogChatreport() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row5 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_chatreport"), null);
|
||||
|
||||
@Override
|
||||
public Row5<Integer, String, String, Long, String> fieldsRow() {
|
||||
return (Row5) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function5<? super Integer, ? super String, ? super String, ? super Long, ? super String, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogChatreport(Table<O> child, ForeignKey<O, StaffogChatreportRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function5<? super Integer, ? super String, ? super String, ? super Long, ? super String, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_CHATREPORT);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<StaffogChatreportRecord, Integer> getIdentity() {
|
||||
|
||||
return (Identity<StaffogChatreportRecord, Integer>) super.getIdentity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogChatreportRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_CHATREPORT_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreport as(String alias) {
|
||||
|
||||
return new StaffogChatreport(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreport as(Name alias) {
|
||||
|
||||
return new StaffogChatreport(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreport as(Table<?> alias) {
|
||||
|
||||
return new StaffogChatreport(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogChatreport rename(String name) {
|
||||
|
||||
return new StaffogChatreport(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogChatreport rename(Name name) {
|
||||
|
||||
return new StaffogChatreport(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogChatreport rename(Table<?> name) {
|
||||
|
||||
return new StaffogChatreport(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row5 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row5<Integer, String, String, Long, String> fieldsRow() {
|
||||
|
||||
return (Row5) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(
|
||||
Function5<? super Integer, ? super String, ? super String, ? super Long, ? super String, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function5<? super Integer, ? super String, ? super String, ? super Long, ? super String, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function4;
|
||||
@@ -20,7 +19,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogHistoryRecord;
|
||||
@@ -31,150 +29,197 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogHistoryRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogHistory extends TableImpl<StaffogHistoryRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_history</code>
|
||||
*/
|
||||
public static final StaffogHistory STAFFOG_HISTORY = new StaffogHistory();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_history</code>
|
||||
*/
|
||||
public static final StaffogHistory STAFFOG_HISTORY = new StaffogHistory();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogHistoryRecord> getRecordType() {
|
||||
return StaffogHistoryRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogHistoryRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_history.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogHistoryRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
return StaffogHistoryRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_history.date</code>.
|
||||
*/
|
||||
public final TableField<StaffogHistoryRecord, LocalDateTime> DATE = createField(DSL.name("date"), SQLDataType.LOCALDATETIME(0).nullable(false).defaultValue(DSL.field(DSL.raw("CURRENT_TIMESTAMP"), SQLDataType.LOCALDATETIME)), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_history.name</code>.
|
||||
*/
|
||||
public final TableField<StaffogHistoryRecord, String> NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(16).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_history.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogHistoryRecord, Integer> ID = createField(DSL.name("id"),
|
||||
SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_history.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogHistoryRecord, String> UUID = createField(DSL.name("uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_history.date</code>.
|
||||
*/
|
||||
public final TableField<StaffogHistoryRecord, LocalDateTime> DATE = createField(DSL.name("date"),
|
||||
SQLDataType.LOCALDATETIME(0).nullable(false)
|
||||
.defaultValue(DSL.field(DSL.raw("CURRENT_TIMESTAMP"), SQLDataType.LOCALDATETIME)),
|
||||
this, "");
|
||||
|
||||
private StaffogHistory(Name alias, Table<StaffogHistoryRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_history.name</code>.
|
||||
*/
|
||||
public final TableField<StaffogHistoryRecord, String> NAME = createField(DSL.name("name"),
|
||||
SQLDataType.VARCHAR(16).nullable(false), this, "");
|
||||
|
||||
private StaffogHistory(Name alias, Table<StaffogHistoryRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_history.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogHistoryRecord, String> UUID = createField(DSL.name("uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_history</code> table reference
|
||||
*/
|
||||
public StaffogHistory(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_HISTORY);
|
||||
}
|
||||
private StaffogHistory(Name alias, Table<StaffogHistoryRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_history</code> table reference
|
||||
*/
|
||||
public StaffogHistory(Name alias) {
|
||||
this(alias, STAFFOG_HISTORY);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_history</code> table reference
|
||||
*/
|
||||
public StaffogHistory() {
|
||||
this(DSL.name("staffog_history"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogHistory(Table<O> child, ForeignKey<O, StaffogHistoryRecord> key) {
|
||||
super(child, key, STAFFOG_HISTORY);
|
||||
}
|
||||
private StaffogHistory(Name alias, Table<StaffogHistoryRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public Identity<StaffogHistoryRecord, Integer> getIdentity() {
|
||||
return (Identity<StaffogHistoryRecord, Integer>) super.getIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogHistoryRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_HISTORY_PRIMARY;
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_history</code> table reference
|
||||
*/
|
||||
public StaffogHistory(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogHistory as(String alias) {
|
||||
return new StaffogHistory(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_HISTORY);
|
||||
|
||||
@Override
|
||||
public StaffogHistory as(Name alias) {
|
||||
return new StaffogHistory(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogHistory as(Table<?> alias) {
|
||||
return new StaffogHistory(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_history</code> table reference
|
||||
*/
|
||||
public StaffogHistory(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogHistory rename(String name) {
|
||||
return new StaffogHistory(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_HISTORY);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogHistory rename(Name name) {
|
||||
return new StaffogHistory(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogHistory rename(Table<?> name) {
|
||||
return new StaffogHistory(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_history</code> table reference
|
||||
*/
|
||||
public StaffogHistory() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row4 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_history"), null);
|
||||
|
||||
@Override
|
||||
public Row4<Integer, LocalDateTime, String, String> fieldsRow() {
|
||||
return (Row4) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function4<? super Integer, ? super LocalDateTime, ? super String, ? super String, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogHistory(Table<O> child, ForeignKey<O, StaffogHistoryRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function4<? super Integer, ? super LocalDateTime, ? super String, ? super String, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_HISTORY);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<StaffogHistoryRecord, Integer> getIdentity() {
|
||||
|
||||
return (Identity<StaffogHistoryRecord, Integer>) super.getIdentity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogHistoryRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_HISTORY_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogHistory as(String alias) {
|
||||
|
||||
return new StaffogHistory(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogHistory as(Name alias) {
|
||||
|
||||
return new StaffogHistory(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogHistory as(Table<?> alias) {
|
||||
|
||||
return new StaffogHistory(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogHistory rename(String name) {
|
||||
|
||||
return new StaffogHistory(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogHistory rename(Name name) {
|
||||
|
||||
return new StaffogHistory(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogHistory rename(Table<?> name) {
|
||||
|
||||
return new StaffogHistory(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row4 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row4<Integer, LocalDateTime, String, String> fieldsRow() {
|
||||
|
||||
return (Row4) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(
|
||||
Function4<? super Integer, ? super LocalDateTime, ? super String, ? super String, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function4<? super Integer, ? super LocalDateTime, ? super String, ? super String, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function6;
|
||||
@@ -19,7 +18,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogKickRecord;
|
||||
@@ -30,160 +28,207 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogKickRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogKick extends TableImpl<StaffogKickRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_kick</code>
|
||||
*/
|
||||
public static final StaffogKick STAFFOG_KICK = new StaffogKick();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_kick</code>
|
||||
*/
|
||||
public static final StaffogKick STAFFOG_KICK = new StaffogKick();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogKickRecord> getRecordType() {
|
||||
return StaffogKickRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogKickRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, Long> ID = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
return StaffogKickRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, String> UUID = createField(DSL.name("uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, String> REASON = createField(DSL.name("reason"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, Long> ID = createField(DSL.name("id"),
|
||||
SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.by_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, String> BY_UUID = createField(DSL.name("by_uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, String> UUID = createField(DSL.name("uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.by_name</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, String> BY_NAME = createField(DSL.name("by_name"), SQLDataType.VARCHAR(128).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, String> REASON = createField(DSL.name("reason"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, Long> TIME = createField(DSL.name("time"), SQLDataType.BIGINT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.by_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, String> BY_UUID = createField(DSL.name("by_uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
private StaffogKick(Name alias, Table<StaffogKickRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.by_name</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, String> BY_NAME = createField(DSL.name("by_name"),
|
||||
SQLDataType.VARCHAR(128).nullable(false), this, "");
|
||||
|
||||
private StaffogKick(Name alias, Table<StaffogKickRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_kick.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogKickRecord, Long> TIME = createField(DSL.name("time"),
|
||||
SQLDataType.BIGINT.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_kick</code> table reference
|
||||
*/
|
||||
public StaffogKick(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_KICK);
|
||||
}
|
||||
private StaffogKick(Name alias, Table<StaffogKickRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_kick</code> table reference
|
||||
*/
|
||||
public StaffogKick(Name alias) {
|
||||
this(alias, STAFFOG_KICK);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_kick</code> table reference
|
||||
*/
|
||||
public StaffogKick() {
|
||||
this(DSL.name("staffog_kick"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogKick(Table<O> child, ForeignKey<O, StaffogKickRecord> key) {
|
||||
super(child, key, STAFFOG_KICK);
|
||||
}
|
||||
private StaffogKick(Name alias, Table<StaffogKickRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public Identity<StaffogKickRecord, Long> getIdentity() {
|
||||
return (Identity<StaffogKickRecord, Long>) super.getIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogKickRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_KICK_PRIMARY;
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_kick</code> table reference
|
||||
*/
|
||||
public StaffogKick(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogKick as(String alias) {
|
||||
return new StaffogKick(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_KICK);
|
||||
|
||||
@Override
|
||||
public StaffogKick as(Name alias) {
|
||||
return new StaffogKick(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKick as(Table<?> alias) {
|
||||
return new StaffogKick(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_kick</code> table reference
|
||||
*/
|
||||
public StaffogKick(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogKick rename(String name) {
|
||||
return new StaffogKick(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_KICK);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogKick rename(Name name) {
|
||||
return new StaffogKick(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogKick rename(Table<?> name) {
|
||||
return new StaffogKick(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_kick</code> table reference
|
||||
*/
|
||||
public StaffogKick() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row6 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_kick"), null);
|
||||
|
||||
@Override
|
||||
public Row6<Long, String, String, String, String, Long> fieldsRow() {
|
||||
return (Row6) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function6<? super Long, ? super String, ? super String, ? super String, ? super String, ? super Long, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogKick(Table<O> child, ForeignKey<O, StaffogKickRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function6<? super Long, ? super String, ? super String, ? super String, ? super String, ? super Long, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_KICK);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<StaffogKickRecord, Long> getIdentity() {
|
||||
|
||||
return (Identity<StaffogKickRecord, Long>) super.getIdentity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogKickRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_KICK_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKick as(String alias) {
|
||||
|
||||
return new StaffogKick(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKick as(Name alias) {
|
||||
|
||||
return new StaffogKick(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKick as(Table<?> alias) {
|
||||
|
||||
return new StaffogKick(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogKick rename(String name) {
|
||||
|
||||
return new StaffogKick(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogKick rename(Name name) {
|
||||
|
||||
return new StaffogKick(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogKick rename(Table<?> name) {
|
||||
|
||||
return new StaffogKick(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row6 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row6<Long, String, String, String, String, Long> fieldsRow() {
|
||||
|
||||
return (Row6) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(
|
||||
Function6<? super Long, ? super String, ? super String, ? super String, ? super String, ? super Long, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function6<? super Long, ? super String, ? super String, ? super String, ? super String, ? super Long, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package uk.hotten.staffog.data.jooq.tables;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function3;
|
||||
@@ -20,7 +19,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogLinkcodeRecord;
|
||||
@@ -31,140 +29,180 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogLinkcodeRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogLinkcode extends TableImpl<StaffogLinkcodeRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_linkcode</code>
|
||||
*/
|
||||
public static final StaffogLinkcode STAFFOG_LINKCODE = new StaffogLinkcode();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_linkcode</code>
|
||||
*/
|
||||
public static final StaffogLinkcode STAFFOG_LINKCODE = new StaffogLinkcode();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogLinkcodeRecord> getRecordType() {
|
||||
return StaffogLinkcodeRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogLinkcodeRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_linkcode.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogLinkcodeRecord, String> UUID = createField(DSL.name("uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
return StaffogLinkcodeRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_linkcode.code</code>.
|
||||
*/
|
||||
public final TableField<StaffogLinkcodeRecord, String> CODE = createField(DSL.name("code"), SQLDataType.VARCHAR(5).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_linkcode.admin</code>.
|
||||
*/
|
||||
public final TableField<StaffogLinkcodeRecord, Boolean> ADMIN = createField(DSL.name("admin"), SQLDataType.BIT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_linkcode.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogLinkcodeRecord, String> UUID = createField(DSL.name("uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
private StaffogLinkcode(Name alias, Table<StaffogLinkcodeRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_linkcode.code</code>.
|
||||
*/
|
||||
public final TableField<StaffogLinkcodeRecord, String> CODE = createField(DSL.name("code"),
|
||||
SQLDataType.VARCHAR(5).nullable(false), this, "");
|
||||
|
||||
private StaffogLinkcode(Name alias, Table<StaffogLinkcodeRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_linkcode.admin</code>.
|
||||
*/
|
||||
public final TableField<StaffogLinkcodeRecord, Boolean> ADMIN = createField(DSL.name("admin"),
|
||||
SQLDataType.BIT.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_linkcode</code> table reference
|
||||
*/
|
||||
public StaffogLinkcode(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_LINKCODE);
|
||||
}
|
||||
private StaffogLinkcode(Name alias, Table<StaffogLinkcodeRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_linkcode</code> table reference
|
||||
*/
|
||||
public StaffogLinkcode(Name alias) {
|
||||
this(alias, STAFFOG_LINKCODE);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_linkcode</code> table reference
|
||||
*/
|
||||
public StaffogLinkcode() {
|
||||
this(DSL.name("staffog_linkcode"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogLinkcode(Table<O> child, ForeignKey<O, StaffogLinkcodeRecord> key) {
|
||||
super(child, key, STAFFOG_LINKCODE);
|
||||
}
|
||||
private StaffogLinkcode(Name alias, Table<StaffogLinkcodeRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public List<UniqueKey<StaffogLinkcodeRecord>> getUniqueKeys() {
|
||||
return Arrays.asList(Keys.KEY_STAFFOG_LINKCODE_UUID);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogLinkcode as(String alias) {
|
||||
return new StaffogLinkcode(DSL.name(alias), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_linkcode</code> table reference
|
||||
*/
|
||||
public StaffogLinkcode(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogLinkcode as(Name alias) {
|
||||
return new StaffogLinkcode(alias, this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_LINKCODE);
|
||||
|
||||
@Override
|
||||
public StaffogLinkcode as(Table<?> alias) {
|
||||
return new StaffogLinkcode(alias.getQualifiedName(), this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogLinkcode rename(String name) {
|
||||
return new StaffogLinkcode(DSL.name(name), null);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_linkcode</code> table reference
|
||||
*/
|
||||
public StaffogLinkcode(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogLinkcode rename(Name name) {
|
||||
return new StaffogLinkcode(name, null);
|
||||
}
|
||||
this(alias, STAFFOG_LINKCODE);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogLinkcode rename(Table<?> name) {
|
||||
return new StaffogLinkcode(name.getQualifiedName(), null);
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row3 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
/**
|
||||
* Create a <code>staffog.staffog_linkcode</code> table reference
|
||||
*/
|
||||
public StaffogLinkcode() {
|
||||
|
||||
@Override
|
||||
public Row3<String, String, Boolean> fieldsRow() {
|
||||
return (Row3) super.fieldsRow();
|
||||
}
|
||||
this(DSL.name("staffog_linkcode"), null);
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function3<? super String, ? super String, ? super Boolean, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function3<? super String, ? super String, ? super Boolean, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogLinkcode(Table<O> child, ForeignKey<O, StaffogLinkcodeRecord> key) {
|
||||
|
||||
}
|
||||
super(child, key, STAFFOG_LINKCODE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UniqueKey<StaffogLinkcodeRecord>> getUniqueKeys() {
|
||||
|
||||
return Arrays.asList(Keys.KEY_STAFFOG_LINKCODE_UUID);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogLinkcode as(String alias) {
|
||||
|
||||
return new StaffogLinkcode(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogLinkcode as(Name alias) {
|
||||
|
||||
return new StaffogLinkcode(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogLinkcode as(Table<?> alias) {
|
||||
|
||||
return new StaffogLinkcode(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogLinkcode rename(String name) {
|
||||
|
||||
return new StaffogLinkcode(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogLinkcode rename(Name name) {
|
||||
|
||||
return new StaffogLinkcode(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogLinkcode rename(Table<?> name) {
|
||||
|
||||
return new StaffogLinkcode(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row3 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row3<String, String, Boolean> fieldsRow() {
|
||||
|
||||
return (Row3) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function3<? super String, ? super String, ? super Boolean, ? extends U> from) {
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function3<? super String, ? super String, ? super Boolean, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function12;
|
||||
@@ -19,7 +18,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogMuteRecord;
|
||||
@@ -30,190 +28,243 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogMuteRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogMute extends TableImpl<StaffogMuteRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_mute</code>
|
||||
*/
|
||||
public static final StaffogMute STAFFOG_MUTE = new StaffogMute();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_mute</code>
|
||||
*/
|
||||
public static final StaffogMute STAFFOG_MUTE = new StaffogMute();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogMuteRecord> getRecordType() {
|
||||
return StaffogMuteRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogMuteRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, Long> ID = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
return StaffogMuteRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> UUID = createField(DSL.name("uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> REASON = createField(DSL.name("reason"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, Long> ID = createField(DSL.name("id"),
|
||||
SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.by_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> BY_UUID = createField(DSL.name("by_uuid"), SQLDataType.VARCHAR(36), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> UUID = createField(DSL.name("uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.by_name</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> BY_NAME = createField(DSL.name("by_name"), SQLDataType.VARCHAR(128), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> REASON = createField(DSL.name("reason"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.removed_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> REMOVED_UUID = createField(DSL.name("removed_uuid"), SQLDataType.VARCHAR(36), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.by_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> BY_UUID = createField(DSL.name("by_uuid"),
|
||||
SQLDataType.VARCHAR(36), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.removed_name</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> REMOVED_NAME = createField(DSL.name("removed_name"), SQLDataType.VARCHAR(128), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.by_name</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> BY_NAME = createField(DSL.name("by_name"),
|
||||
SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.removed_reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> REMOVED_REASON = createField(DSL.name("removed_reason"), SQLDataType.VARCHAR(2048), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.removed_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> REMOVED_UUID = createField(DSL.name("removed_uuid"),
|
||||
SQLDataType.VARCHAR(36), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.removed_time</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, Long> REMOVED_TIME = createField(DSL.name("removed_time"), SQLDataType.BIGINT, this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.removed_name</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> REMOVED_NAME = createField(DSL.name("removed_name"),
|
||||
SQLDataType.VARCHAR(128), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, Long> TIME = createField(DSL.name("time"), SQLDataType.BIGINT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.removed_reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, String> REMOVED_REASON = createField(DSL.name("removed_reason"),
|
||||
SQLDataType.VARCHAR(2048), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.until</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, Long> UNTIL = createField(DSL.name("until"), SQLDataType.BIGINT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.removed_time</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, Long> REMOVED_TIME = createField(DSL.name("removed_time"),
|
||||
SQLDataType.BIGINT, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.active</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, Boolean> ACTIVE = createField(DSL.name("active"), SQLDataType.BIT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, Long> TIME = createField(DSL.name("time"),
|
||||
SQLDataType.BIGINT.nullable(false), this, "");
|
||||
|
||||
private StaffogMute(Name alias, Table<StaffogMuteRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.until</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, Long> UNTIL = createField(DSL.name("until"),
|
||||
SQLDataType.BIGINT.nullable(false), this, "");
|
||||
|
||||
private StaffogMute(Name alias, Table<StaffogMuteRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_mute.active</code>.
|
||||
*/
|
||||
public final TableField<StaffogMuteRecord, Boolean> ACTIVE = createField(DSL.name("active"),
|
||||
SQLDataType.BIT.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_mute</code> table reference
|
||||
*/
|
||||
public StaffogMute(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_MUTE);
|
||||
}
|
||||
private StaffogMute(Name alias, Table<StaffogMuteRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_mute</code> table reference
|
||||
*/
|
||||
public StaffogMute(Name alias) {
|
||||
this(alias, STAFFOG_MUTE);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_mute</code> table reference
|
||||
*/
|
||||
public StaffogMute() {
|
||||
this(DSL.name("staffog_mute"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogMute(Table<O> child, ForeignKey<O, StaffogMuteRecord> key) {
|
||||
super(child, key, STAFFOG_MUTE);
|
||||
}
|
||||
private StaffogMute(Name alias, Table<StaffogMuteRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public Identity<StaffogMuteRecord, Long> getIdentity() {
|
||||
return (Identity<StaffogMuteRecord, Long>) super.getIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogMuteRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_MUTE_PRIMARY;
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_mute</code> table reference
|
||||
*/
|
||||
public StaffogMute(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogMute as(String alias) {
|
||||
return new StaffogMute(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_MUTE);
|
||||
|
||||
@Override
|
||||
public StaffogMute as(Name alias) {
|
||||
return new StaffogMute(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogMute as(Table<?> alias) {
|
||||
return new StaffogMute(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_mute</code> table reference
|
||||
*/
|
||||
public StaffogMute(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogMute rename(String name) {
|
||||
return new StaffogMute(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_MUTE);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogMute rename(Name name) {
|
||||
return new StaffogMute(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogMute rename(Table<?> name) {
|
||||
return new StaffogMute(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_mute</code> table reference
|
||||
*/
|
||||
public StaffogMute() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row12 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_mute"), null);
|
||||
|
||||
@Override
|
||||
public Row12<Long, String, String, String, String, String, String, String, Long, Long, Long, Boolean> fieldsRow() {
|
||||
return (Row12) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function12<? super Long, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super Long, ? super Long, ? super Long, ? super Boolean, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogMute(Table<O> child, ForeignKey<O, StaffogMuteRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function12<? super Long, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super Long, ? super Long, ? super Long, ? super Boolean, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_MUTE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<StaffogMuteRecord, Long> getIdentity() {
|
||||
|
||||
return (Identity<StaffogMuteRecord, Long>) super.getIdentity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogMuteRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_MUTE_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogMute as(String alias) {
|
||||
|
||||
return new StaffogMute(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogMute as(Name alias) {
|
||||
|
||||
return new StaffogMute(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogMute as(Table<?> alias) {
|
||||
|
||||
return new StaffogMute(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogMute rename(String name) {
|
||||
|
||||
return new StaffogMute(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogMute rename(Name name) {
|
||||
|
||||
return new StaffogMute(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogMute rename(Table<?> name) {
|
||||
|
||||
return new StaffogMute(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row12 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row12<Long, String, String, String, String, String, String, String, Long, Long, Long, Boolean> fieldsRow() {
|
||||
|
||||
return (Row12) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(
|
||||
Function12<? super Long, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super Long, ? super Long, ? super Long, ? super Boolean, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function12<? super Long, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super String, ? super Long, ? super Long, ? super Long, ? super Boolean, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function13;
|
||||
@@ -19,7 +18,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogReportRecord;
|
||||
@@ -30,195 +28,249 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogReportRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogReport extends TableImpl<StaffogReportRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_report</code>
|
||||
*/
|
||||
public static final StaffogReport STAFFOG_REPORT = new StaffogReport();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_report</code>
|
||||
*/
|
||||
public static final StaffogReport STAFFOG_REPORT = new StaffogReport();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogReportRecord> getRecordType() {
|
||||
return StaffogReportRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogReportRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
return StaffogReportRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> UUID = createField(DSL.name("uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.by_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> BY_UUID = createField(DSL.name("by_uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Integer> ID = createField(DSL.name("id"),
|
||||
SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Long> TIME = createField(DSL.name("time"), SQLDataType.BIGINT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> UUID = createField(DSL.name("uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.type</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> TYPE = createField(DSL.name("type"), SQLDataType.VARCHAR(128).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.by_uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> BY_UUID = createField(DSL.name("by_uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> REASON = createField(DSL.name("reason"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.time</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Long> TIME = createField(DSL.name("time"),
|
||||
SQLDataType.BIGINT.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.evidence</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> EVIDENCE = createField(DSL.name("evidence"), SQLDataType.VARCHAR(2048).defaultValue(DSL.inline("[]", SQLDataType.VARCHAR)), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.type</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> TYPE = createField(DSL.name("type"),
|
||||
SQLDataType.VARCHAR(128).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.crid</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Integer> CRID = createField(DSL.name("crid"), SQLDataType.INTEGER, this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.reason</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> REASON = createField(DSL.name("reason"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.open</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Boolean> OPEN = createField(DSL.name("open"), SQLDataType.BIT.nullable(false).defaultValue(DSL.inline("b'1'", SQLDataType.BIT)), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.evidence</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> EVIDENCE = createField(DSL.name("evidence"),
|
||||
SQLDataType.VARCHAR(2048).defaultValue(DSL.inline("[]", SQLDataType.VARCHAR)), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.assigned</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> ASSIGNED = createField(DSL.name("assigned"), SQLDataType.VARCHAR(36), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.crid</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Integer> CRID = createField(DSL.name("crid"), SQLDataType.INTEGER,
|
||||
this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.verdict</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Boolean> VERDICT = createField(DSL.name("verdict"), SQLDataType.BIT, this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.open</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Boolean> OPEN = createField(DSL.name("open"),
|
||||
SQLDataType.BIT.nullable(false).defaultValue(DSL.inline("b'1'", SQLDataType.BIT)), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.verdict_time</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Long> VERDICT_TIME = createField(DSL.name("verdict_time"), SQLDataType.BIGINT, this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.assigned</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> ASSIGNED = createField(DSL.name("assigned"),
|
||||
SQLDataType.VARCHAR(36), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.comment</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> COMMENT = createField(DSL.name("comment"), SQLDataType.VARCHAR(2048), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.verdict</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Boolean> VERDICT = createField(DSL.name("verdict"), SQLDataType.BIT,
|
||||
this, "");
|
||||
|
||||
private StaffogReport(Name alias, Table<StaffogReportRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.verdict_time</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, Long> VERDICT_TIME = createField(DSL.name("verdict_time"),
|
||||
SQLDataType.BIGINT, this, "");
|
||||
|
||||
private StaffogReport(Name alias, Table<StaffogReportRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_report.comment</code>.
|
||||
*/
|
||||
public final TableField<StaffogReportRecord, String> COMMENT = createField(DSL.name("comment"),
|
||||
SQLDataType.VARCHAR(2048), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_report</code> table reference
|
||||
*/
|
||||
public StaffogReport(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_REPORT);
|
||||
}
|
||||
private StaffogReport(Name alias, Table<StaffogReportRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_report</code> table reference
|
||||
*/
|
||||
public StaffogReport(Name alias) {
|
||||
this(alias, STAFFOG_REPORT);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_report</code> table reference
|
||||
*/
|
||||
public StaffogReport() {
|
||||
this(DSL.name("staffog_report"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogReport(Table<O> child, ForeignKey<O, StaffogReportRecord> key) {
|
||||
super(child, key, STAFFOG_REPORT);
|
||||
}
|
||||
private StaffogReport(Name alias, Table<StaffogReportRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public Identity<StaffogReportRecord, Integer> getIdentity() {
|
||||
return (Identity<StaffogReportRecord, Integer>) super.getIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogReportRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_REPORT_PRIMARY;
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_report</code> table reference
|
||||
*/
|
||||
public StaffogReport(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogReport as(String alias) {
|
||||
return new StaffogReport(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_REPORT);
|
||||
|
||||
@Override
|
||||
public StaffogReport as(Name alias) {
|
||||
return new StaffogReport(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogReport as(Table<?> alias) {
|
||||
return new StaffogReport(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_report</code> table reference
|
||||
*/
|
||||
public StaffogReport(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogReport rename(String name) {
|
||||
return new StaffogReport(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_REPORT);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogReport rename(Name name) {
|
||||
return new StaffogReport(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogReport rename(Table<?> name) {
|
||||
return new StaffogReport(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_report</code> table reference
|
||||
*/
|
||||
public StaffogReport() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row13 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_report"), null);
|
||||
|
||||
@Override
|
||||
public Row13<Integer, String, String, Long, String, String, String, Integer, Boolean, String, Boolean, Long, String> fieldsRow() {
|
||||
return (Row13) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function13<? super Integer, ? super String, ? super String, ? super Long, ? super String, ? super String, ? super String, ? super Integer, ? super Boolean, ? super String, ? super Boolean, ? super Long, ? super String, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogReport(Table<O> child, ForeignKey<O, StaffogReportRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function13<? super Integer, ? super String, ? super String, ? super Long, ? super String, ? super String, ? super String, ? super Integer, ? super Boolean, ? super String, ? super Boolean, ? super Long, ? super String, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_REPORT);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<StaffogReportRecord, Integer> getIdentity() {
|
||||
|
||||
return (Identity<StaffogReportRecord, Integer>) super.getIdentity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogReportRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_REPORT_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogReport as(String alias) {
|
||||
|
||||
return new StaffogReport(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogReport as(Name alias) {
|
||||
|
||||
return new StaffogReport(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogReport as(Table<?> alias) {
|
||||
|
||||
return new StaffogReport(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogReport rename(String name) {
|
||||
|
||||
return new StaffogReport(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogReport rename(Name name) {
|
||||
|
||||
return new StaffogReport(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogReport rename(Table<?> name) {
|
||||
|
||||
return new StaffogReport(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row13 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row13<Integer, String, String, Long, String, String, String, Integer, Boolean, String, Boolean, Long, String> fieldsRow() {
|
||||
|
||||
return (Row13) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(
|
||||
Function13<? super Integer, ? super String, ? super String, ? super Long, ? super String, ? super String, ? super String, ? super Integer, ? super Boolean, ? super String, ? super Boolean, ? super Long, ? super String, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function13<? super Integer, ? super String, ? super String, ? super Long, ? super String, ? super String, ? super String, ? super Integer, ? super Boolean, ? super String, ? super Boolean, ? super Long, ? super String, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function7;
|
||||
@@ -19,7 +18,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogStaffipRecord;
|
||||
@@ -30,165 +28,213 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogStaffipRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogStaffip extends TableImpl<StaffogStaffipRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_staffip</code>
|
||||
*/
|
||||
public static final StaffogStaffip STAFFOG_STAFFIP = new StaffogStaffip();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_staffip</code>
|
||||
*/
|
||||
public static final StaffogStaffip STAFFOG_STAFFIP = new StaffogStaffip();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogStaffipRecord> getRecordType() {
|
||||
return StaffogStaffipRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogStaffipRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
return StaffogStaffipRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.ip</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, String> IP = createField(DSL.name("ip"), SQLDataType.VARCHAR(15).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, String> UUID = createField(DSL.name("uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, Integer> ID = createField(DSL.name("id"),
|
||||
SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.initial</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, Boolean> INITIAL = createField(DSL.name("initial"), SQLDataType.BIT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.ip</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, String> IP = createField(DSL.name("ip"),
|
||||
SQLDataType.VARCHAR(15).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.panel_acknowledged</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, Boolean> PANEL_ACKNOWLEDGED = createField(DSL.name("panel_acknowledged"), SQLDataType.BIT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, String> UUID = createField(DSL.name("uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.panel_verified</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, Boolean> PANEL_VERIFIED = createField(DSL.name("panel_verified"), SQLDataType.BIT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.initial</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, Boolean> INITIAL = createField(DSL.name("initial"),
|
||||
SQLDataType.BIT.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.game_verified</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, Boolean> GAME_VERIFIED = createField(DSL.name("game_verified"), SQLDataType.BIT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.panel_acknowledged</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, Boolean> PANEL_ACKNOWLEDGED = createField(
|
||||
DSL.name("panel_acknowledged"), SQLDataType.BIT.nullable(false), this, "");
|
||||
|
||||
private StaffogStaffip(Name alias, Table<StaffogStaffipRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.panel_verified</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, Boolean> PANEL_VERIFIED = createField(DSL.name("panel_verified"),
|
||||
SQLDataType.BIT.nullable(false), this, "");
|
||||
|
||||
private StaffogStaffip(Name alias, Table<StaffogStaffipRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_staffip.game_verified</code>.
|
||||
*/
|
||||
public final TableField<StaffogStaffipRecord, Boolean> GAME_VERIFIED = createField(DSL.name("game_verified"),
|
||||
SQLDataType.BIT.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_staffip</code> table reference
|
||||
*/
|
||||
public StaffogStaffip(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_STAFFIP);
|
||||
}
|
||||
private StaffogStaffip(Name alias, Table<StaffogStaffipRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_staffip</code> table reference
|
||||
*/
|
||||
public StaffogStaffip(Name alias) {
|
||||
this(alias, STAFFOG_STAFFIP);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_staffip</code> table reference
|
||||
*/
|
||||
public StaffogStaffip() {
|
||||
this(DSL.name("staffog_staffip"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogStaffip(Table<O> child, ForeignKey<O, StaffogStaffipRecord> key) {
|
||||
super(child, key, STAFFOG_STAFFIP);
|
||||
}
|
||||
private StaffogStaffip(Name alias, Table<StaffogStaffipRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public Identity<StaffogStaffipRecord, Integer> getIdentity() {
|
||||
return (Identity<StaffogStaffipRecord, Integer>) super.getIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogStaffipRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_STAFFIP_PRIMARY;
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_staffip</code> table reference
|
||||
*/
|
||||
public StaffogStaffip(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogStaffip as(String alias) {
|
||||
return new StaffogStaffip(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_STAFFIP);
|
||||
|
||||
@Override
|
||||
public StaffogStaffip as(Name alias) {
|
||||
return new StaffogStaffip(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffip as(Table<?> alias) {
|
||||
return new StaffogStaffip(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_staffip</code> table reference
|
||||
*/
|
||||
public StaffogStaffip(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStaffip rename(String name) {
|
||||
return new StaffogStaffip(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_STAFFIP);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStaffip rename(Name name) {
|
||||
return new StaffogStaffip(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStaffip rename(Table<?> name) {
|
||||
return new StaffogStaffip(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_staffip</code> table reference
|
||||
*/
|
||||
public StaffogStaffip() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row7 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_staffip"), null);
|
||||
|
||||
@Override
|
||||
public Row7<Integer, String, String, Boolean, Boolean, Boolean, Boolean> fieldsRow() {
|
||||
return (Row7) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function7<? super Integer, ? super String, ? super String, ? super Boolean, ? super Boolean, ? super Boolean, ? super Boolean, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogStaffip(Table<O> child, ForeignKey<O, StaffogStaffipRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function7<? super Integer, ? super String, ? super String, ? super Boolean, ? super Boolean, ? super Boolean, ? super Boolean, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_STAFFIP);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<StaffogStaffipRecord, Integer> getIdentity() {
|
||||
|
||||
return (Identity<StaffogStaffipRecord, Integer>) super.getIdentity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogStaffipRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_STAFFIP_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffip as(String alias) {
|
||||
|
||||
return new StaffogStaffip(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffip as(Name alias) {
|
||||
|
||||
return new StaffogStaffip(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffip as(Table<?> alias) {
|
||||
|
||||
return new StaffogStaffip(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStaffip rename(String name) {
|
||||
|
||||
return new StaffogStaffip(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStaffip rename(Name name) {
|
||||
|
||||
return new StaffogStaffip(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStaffip rename(Table<?> name) {
|
||||
|
||||
return new StaffogStaffip(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row7 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row7<Integer, String, String, Boolean, Boolean, Boolean, Boolean> fieldsRow() {
|
||||
|
||||
return (Row7) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(
|
||||
Function7<? super Integer, ? super String, ? super String, ? super Boolean, ? super Boolean, ? super Boolean, ? super Boolean, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function7<? super Integer, ? super String, ? super String, ? super Boolean, ? super Boolean, ? super Boolean, ? super Boolean, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function2;
|
||||
@@ -17,7 +16,6 @@ import org.jooq.TableOptions;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogStatRecord;
|
||||
|
||||
@@ -27,130 +25,165 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogStatRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogStat extends TableImpl<StaffogStatRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_stat</code>
|
||||
*/
|
||||
public static final StaffogStat STAFFOG_STAT = new StaffogStat();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_stat</code>
|
||||
*/
|
||||
public static final StaffogStat STAFFOG_STAT = new StaffogStat();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogStatRecord> getRecordType() {
|
||||
return StaffogStatRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogStatRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_stat.name</code>.
|
||||
*/
|
||||
public final TableField<StaffogStatRecord, String> NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
return StaffogStatRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_stat.stat</code>.
|
||||
*/
|
||||
public final TableField<StaffogStatRecord, String> STAT = createField(DSL.name("stat"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
}
|
||||
|
||||
private StaffogStat(Name alias, Table<StaffogStatRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_stat.name</code>.
|
||||
*/
|
||||
public final TableField<StaffogStatRecord, String> NAME = createField(DSL.name("name"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
private StaffogStat(Name alias, Table<StaffogStatRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_stat.stat</code>.
|
||||
*/
|
||||
public final TableField<StaffogStatRecord, String> STAT = createField(DSL.name("stat"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_stat</code> table reference
|
||||
*/
|
||||
public StaffogStat(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_STAT);
|
||||
}
|
||||
private StaffogStat(Name alias, Table<StaffogStatRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_stat</code> table reference
|
||||
*/
|
||||
public StaffogStat(Name alias) {
|
||||
this(alias, STAFFOG_STAT);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_stat</code> table reference
|
||||
*/
|
||||
public StaffogStat() {
|
||||
this(DSL.name("staffog_stat"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogStat(Table<O> child, ForeignKey<O, StaffogStatRecord> key) {
|
||||
super(child, key, STAFFOG_STAT);
|
||||
}
|
||||
private StaffogStat(Name alias, Table<StaffogStatRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public StaffogStat as(String alias) {
|
||||
return new StaffogStat(DSL.name(alias), this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStat as(Name alias) {
|
||||
return new StaffogStat(alias, this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_stat</code> table reference
|
||||
*/
|
||||
public StaffogStat(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogStat as(Table<?> alias) {
|
||||
return new StaffogStat(alias.getQualifiedName(), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_STAT);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStat rename(String name) {
|
||||
return new StaffogStat(DSL.name(name), null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStat rename(Name name) {
|
||||
return new StaffogStat(name, null);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_stat</code> table reference
|
||||
*/
|
||||
public StaffogStat(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStat rename(Table<?> name) {
|
||||
return new StaffogStat(name.getQualifiedName(), null);
|
||||
}
|
||||
this(alias, STAFFOG_STAT);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row2 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@Override
|
||||
public Row2<String, String> fieldsRow() {
|
||||
return (Row2) super.fieldsRow();
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_stat</code> table reference
|
||||
*/
|
||||
public StaffogStat() {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function2<? super String, ? super String, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
this(DSL.name("staffog_stat"), null);
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function2<? super String, ? super String, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public <O extends Record> StaffogStat(Table<O> child, ForeignKey<O, StaffogStatRecord> key) {
|
||||
|
||||
super(child, key, STAFFOG_STAT);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStat as(String alias) {
|
||||
|
||||
return new StaffogStat(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStat as(Name alias) {
|
||||
|
||||
return new StaffogStat(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStat as(Table<?> alias) {
|
||||
|
||||
return new StaffogStat(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStat rename(String name) {
|
||||
|
||||
return new StaffogStat(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStat rename(Name name) {
|
||||
|
||||
return new StaffogStat(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogStat rename(Table<?> name) {
|
||||
|
||||
return new StaffogStat(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row2 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row2<String, String> fieldsRow() {
|
||||
|
||||
return (Row2) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function2<? super String, ? super String, ? extends U> from) {
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function2<? super String, ? super String, ? extends U> from) {
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package uk.hotten.staffog.data.jooq.tables;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function3;
|
||||
@@ -19,7 +18,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogTaskRecord;
|
||||
@@ -30,145 +28,187 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogTaskRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogTask extends TableImpl<StaffogTaskRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_task</code>
|
||||
*/
|
||||
public static final StaffogTask STAFFOG_TASK = new StaffogTask();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_task</code>
|
||||
*/
|
||||
public static final StaffogTask STAFFOG_TASK = new StaffogTask();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogTaskRecord> getRecordType() {
|
||||
return StaffogTaskRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogTaskRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_task.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogTaskRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
return StaffogTaskRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_task.task</code>.
|
||||
*/
|
||||
public final TableField<StaffogTaskRecord, String> TASK = createField(DSL.name("task"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_task.data</code>.
|
||||
*/
|
||||
public final TableField<StaffogTaskRecord, String> DATA = createField(DSL.name("data"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_task.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogTaskRecord, Integer> ID = createField(DSL.name("id"),
|
||||
SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||
|
||||
private StaffogTask(Name alias, Table<StaffogTaskRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_task.task</code>.
|
||||
*/
|
||||
public final TableField<StaffogTaskRecord, String> TASK = createField(DSL.name("task"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
private StaffogTask(Name alias, Table<StaffogTaskRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_task.data</code>.
|
||||
*/
|
||||
public final TableField<StaffogTaskRecord, String> DATA = createField(DSL.name("data"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_task</code> table reference
|
||||
*/
|
||||
public StaffogTask(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_TASK);
|
||||
}
|
||||
private StaffogTask(Name alias, Table<StaffogTaskRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_task</code> table reference
|
||||
*/
|
||||
public StaffogTask(Name alias) {
|
||||
this(alias, STAFFOG_TASK);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_task</code> table reference
|
||||
*/
|
||||
public StaffogTask() {
|
||||
this(DSL.name("staffog_task"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogTask(Table<O> child, ForeignKey<O, StaffogTaskRecord> key) {
|
||||
super(child, key, STAFFOG_TASK);
|
||||
}
|
||||
private StaffogTask(Name alias, Table<StaffogTaskRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public Identity<StaffogTaskRecord, Integer> getIdentity() {
|
||||
return (Identity<StaffogTaskRecord, Integer>) super.getIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogTaskRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_TASK_PRIMARY;
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_task</code> table reference
|
||||
*/
|
||||
public StaffogTask(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogTask as(String alias) {
|
||||
return new StaffogTask(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_TASK);
|
||||
|
||||
@Override
|
||||
public StaffogTask as(Name alias) {
|
||||
return new StaffogTask(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogTask as(Table<?> alias) {
|
||||
return new StaffogTask(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_task</code> table reference
|
||||
*/
|
||||
public StaffogTask(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogTask rename(String name) {
|
||||
return new StaffogTask(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_TASK);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogTask rename(Name name) {
|
||||
return new StaffogTask(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogTask rename(Table<?> name) {
|
||||
return new StaffogTask(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_task</code> table reference
|
||||
*/
|
||||
public StaffogTask() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row3 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_task"), null);
|
||||
|
||||
@Override
|
||||
public Row3<Integer, String, String> fieldsRow() {
|
||||
return (Row3) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function3<? super Integer, ? super String, ? super String, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogTask(Table<O> child, ForeignKey<O, StaffogTaskRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function3<? super Integer, ? super String, ? super String, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_TASK);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<StaffogTaskRecord, Integer> getIdentity() {
|
||||
|
||||
return (Identity<StaffogTaskRecord, Integer>) super.getIdentity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogTaskRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_TASK_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogTask as(String alias) {
|
||||
|
||||
return new StaffogTask(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogTask as(Name alias) {
|
||||
|
||||
return new StaffogTask(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogTask as(Table<?> alias) {
|
||||
|
||||
return new StaffogTask(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogTask rename(String name) {
|
||||
|
||||
return new StaffogTask(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogTask rename(Name name) {
|
||||
|
||||
return new StaffogTask(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogTask rename(Table<?> name) {
|
||||
|
||||
return new StaffogTask(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row3 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row3<Integer, String, String> fieldsRow() {
|
||||
|
||||
return (Row3) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function3<? super Integer, ? super String, ? super String, ? extends U> from) {
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function3<? super Integer, ? super String, ? super String, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package uk.hotten.staffog.data.jooq.tables;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Function6;
|
||||
@@ -20,7 +19,6 @@ import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.Keys;
|
||||
import uk.hotten.staffog.data.jooq.Staffog;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogWebRecord;
|
||||
@@ -31,160 +29,207 @@ import uk.hotten.staffog.data.jooq.tables.records.StaffogWebRecord;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogWeb extends TableImpl<StaffogWebRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_web</code>
|
||||
*/
|
||||
public static final StaffogWeb STAFFOG_WEB = new StaffogWeb();
|
||||
/**
|
||||
* The reference instance of <code>staffog.staffog_web</code>
|
||||
*/
|
||||
public static final StaffogWeb STAFFOG_WEB = new StaffogWeb();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogWebRecord> getRecordType() {
|
||||
return StaffogWebRecord.class;
|
||||
}
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<StaffogWebRecord> getRecordType() {
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false), this, "");
|
||||
return StaffogWebRecord.class;
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.username</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, String> USERNAME = createField(DSL.name("username"), SQLDataType.VARCHAR(128).nullable(false), this, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, String> UUID = createField(DSL.name("uuid"), SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.id</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, Integer> ID = createField(DSL.name("id"),
|
||||
SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.password</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, String> PASSWORD = createField(DSL.name("password"), SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.username</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, String> USERNAME = createField(DSL.name("username"),
|
||||
SQLDataType.VARCHAR(128).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.active</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, Boolean> ACTIVE = createField(DSL.name("active"), SQLDataType.BIT.nullable(false).defaultValue(DSL.inline("b'1'", SQLDataType.BIT)), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.uuid</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, String> UUID = createField(DSL.name("uuid"),
|
||||
SQLDataType.VARCHAR(36).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.admin</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, Boolean> ADMIN = createField(DSL.name("admin"), SQLDataType.BIT.nullable(false), this, "");
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.password</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, String> PASSWORD = createField(DSL.name("password"),
|
||||
SQLDataType.VARCHAR(2048).nullable(false), this, "");
|
||||
|
||||
private StaffogWeb(Name alias, Table<StaffogWebRecord> aliased) {
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.active</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, Boolean> ACTIVE = createField(DSL.name("active"),
|
||||
SQLDataType.BIT.nullable(false).defaultValue(DSL.inline("b'1'", SQLDataType.BIT)), this, "");
|
||||
|
||||
private StaffogWeb(Name alias, Table<StaffogWebRecord> aliased, Field<?>[] parameters) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
}
|
||||
/**
|
||||
* The column <code>staffog.staffog_web.admin</code>.
|
||||
*/
|
||||
public final TableField<StaffogWebRecord, Boolean> ADMIN = createField(DSL.name("admin"),
|
||||
SQLDataType.BIT.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_web</code> table reference
|
||||
*/
|
||||
public StaffogWeb(String alias) {
|
||||
this(DSL.name(alias), STAFFOG_WEB);
|
||||
}
|
||||
private StaffogWeb(Name alias, Table<StaffogWebRecord> aliased) {
|
||||
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_web</code> table reference
|
||||
*/
|
||||
public StaffogWeb(Name alias) {
|
||||
this(alias, STAFFOG_WEB);
|
||||
}
|
||||
this(alias, aliased, null);
|
||||
|
||||
/**
|
||||
* Create a <code>staffog.staffog_web</code> table reference
|
||||
*/
|
||||
public StaffogWeb() {
|
||||
this(DSL.name("staffog_web"), null);
|
||||
}
|
||||
}
|
||||
|
||||
public <O extends Record> StaffogWeb(Table<O> child, ForeignKey<O, StaffogWebRecord> key) {
|
||||
super(child, key, STAFFOG_WEB);
|
||||
}
|
||||
private StaffogWeb(Name alias, Table<StaffogWebRecord> aliased, Field<?>[] parameters) {
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
}
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogWebRecord> getPrimaryKey() {
|
||||
return Keys.KEY_STAFFOG_WEB_PRIMARY;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UniqueKey<StaffogWebRecord>> getUniqueKeys() {
|
||||
return Arrays.asList(Keys.KEY_STAFFOG_WEB_USERNAME);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_web</code> table reference
|
||||
*/
|
||||
public StaffogWeb(String alias) {
|
||||
|
||||
@Override
|
||||
public StaffogWeb as(String alias) {
|
||||
return new StaffogWeb(DSL.name(alias), this);
|
||||
}
|
||||
this(DSL.name(alias), STAFFOG_WEB);
|
||||
|
||||
@Override
|
||||
public StaffogWeb as(Name alias) {
|
||||
return new StaffogWeb(alias, this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWeb as(Table<?> alias) {
|
||||
return new StaffogWeb(alias.getQualifiedName(), this);
|
||||
}
|
||||
/**
|
||||
* Create an aliased <code>staffog.staffog_web</code> table reference
|
||||
*/
|
||||
public StaffogWeb(Name alias) {
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogWeb rename(String name) {
|
||||
return new StaffogWeb(DSL.name(name), null);
|
||||
}
|
||||
this(alias, STAFFOG_WEB);
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogWeb rename(Name name) {
|
||||
return new StaffogWeb(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogWeb rename(Table<?> name) {
|
||||
return new StaffogWeb(name.getQualifiedName(), null);
|
||||
}
|
||||
/**
|
||||
* Create a <code>staffog.staffog_web</code> table reference
|
||||
*/
|
||||
public StaffogWeb() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row6 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
this(DSL.name("staffog_web"), null);
|
||||
|
||||
@Override
|
||||
public Row6<Integer, String, String, String, Boolean, Boolean> fieldsRow() {
|
||||
return (Row6) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Function6<? super Integer, ? super String, ? super String, ? super String, ? super Boolean, ? super Boolean, ? extends U> from) {
|
||||
return convertFrom(Records.mapping(from));
|
||||
}
|
||||
public <O extends Record> StaffogWeb(Table<O> child, ForeignKey<O, StaffogWebRecord> key) {
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType, Function6<? super Integer, ? super String, ? super String, ? super String, ? super Boolean, ? super Boolean, ? extends U> from) {
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
}
|
||||
super(child, key, STAFFOG_WEB);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
|
||||
return aliased() ? null : Staffog.STAFFOG;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<StaffogWebRecord> getPrimaryKey() {
|
||||
|
||||
return Keys.KEY_STAFFOG_WEB_PRIMARY;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UniqueKey<StaffogWebRecord>> getUniqueKeys() {
|
||||
|
||||
return Arrays.asList(Keys.KEY_STAFFOG_WEB_USERNAME);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWeb as(String alias) {
|
||||
|
||||
return new StaffogWeb(DSL.name(alias), this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWeb as(Name alias) {
|
||||
|
||||
return new StaffogWeb(alias, this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWeb as(Table<?> alias) {
|
||||
|
||||
return new StaffogWeb(alias.getQualifiedName(), this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogWeb rename(String name) {
|
||||
|
||||
return new StaffogWeb(DSL.name(name), null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogWeb rename(Name name) {
|
||||
|
||||
return new StaffogWeb(name, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public StaffogWeb rename(Table<?> name) {
|
||||
|
||||
return new StaffogWeb(name.getQualifiedName(), null);
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row6 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row6<Integer, String, String, String, Boolean, Boolean> fieldsRow() {
|
||||
|
||||
return (Row6) super.fieldsRow();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(
|
||||
Function6<? super Integer, ? super String, ? super String, ? super String, ? super Boolean, ? super Boolean, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
|
||||
*/
|
||||
public <U> SelectField<U> mapping(Class<U> toType,
|
||||
Function6<? super Integer, ? super String, ? super String, ? super String, ? super Boolean, ? super Boolean, ? extends U> from)
|
||||
{
|
||||
|
||||
return convertFrom(toType, Records.mapping(from));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+659
-500
File diff suppressed because it is too large.
Load diff
+227
-166
@@ -5,211 +5,272 @@ import org.jooq.Record1;
|
||||
import org.jooq.Record4;
|
||||
import org.jooq.Row4;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogAudit;
|
||||
|
||||
/**
|
||||
* This class was generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogAuditRecord extends UpdatableRecordImpl<StaffogAuditRecord> implements Record4<Integer, String, String, Long> {
|
||||
public class StaffogAuditRecord extends UpdatableRecordImpl<StaffogAuditRecord>
|
||||
implements Record4<Integer, String, String, Long>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_audit.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
set(0, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_audit.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_audit.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return (Integer) get(0);
|
||||
}
|
||||
set(0, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_audit.type</code>.
|
||||
*/
|
||||
public void setType(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_audit.type</code>.
|
||||
*/
|
||||
public String getType() {
|
||||
return (String) get(1);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_audit.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_audit.data</code>.
|
||||
*/
|
||||
public void setData(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
return (Integer) get(0);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_audit.data</code>.
|
||||
*/
|
||||
public String getData() {
|
||||
return (String) get(2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_audit.time</code>.
|
||||
*/
|
||||
public void setTime(Long value) {
|
||||
set(3, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_audit.type</code>.
|
||||
*/
|
||||
public void setType(String value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_audit.time</code>.
|
||||
*/
|
||||
public Long getTime() {
|
||||
return (Long) get(3);
|
||||
}
|
||||
set(1, value);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_audit.type</code>.
|
||||
*/
|
||||
public String getType() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record4 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
return (String) get(1);
|
||||
|
||||
@Override
|
||||
public Row4<Integer, String, String, Long> fieldsRow() {
|
||||
return (Row4) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Row4<Integer, String, String, Long> valuesRow() {
|
||||
return (Row4) super.valuesRow();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_audit.data</code>.
|
||||
*/
|
||||
public void setData(String value) {
|
||||
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
return StaffogAudit.STAFFOG_AUDIT.ID;
|
||||
}
|
||||
set(2, value);
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
return StaffogAudit.STAFFOG_AUDIT.TYPE;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
return StaffogAudit.STAFFOG_AUDIT.DATA;
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_audit.data</code>.
|
||||
*/
|
||||
public String getData() {
|
||||
|
||||
@Override
|
||||
public Field<Long> field4() {
|
||||
return StaffogAudit.STAFFOG_AUDIT.TIME;
|
||||
}
|
||||
return (String) get(2);
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
return getType();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_audit.time</code>.
|
||||
*/
|
||||
public void setTime(Long value) {
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
return getData();
|
||||
}
|
||||
set(3, value);
|
||||
|
||||
@Override
|
||||
public Long component4() {
|
||||
return getTime();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
return getId();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_audit.time</code>.
|
||||
*/
|
||||
public Long getTime() {
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
return getType();
|
||||
}
|
||||
return (Long) get(3);
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
return getData();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long value4() {
|
||||
return getTime();
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogAuditRecord value1(Integer value) {
|
||||
setId(value);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
|
||||
@Override
|
||||
public StaffogAuditRecord value2(String value) {
|
||||
setType(value);
|
||||
return this;
|
||||
}
|
||||
return (Record1) super.key();
|
||||
|
||||
@Override
|
||||
public StaffogAuditRecord value3(String value) {
|
||||
setData(value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAuditRecord value4(Long value) {
|
||||
setTime(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Record4 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogAuditRecord values(Integer value1, String value2, String value3, Long value4) {
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Row4<Integer, String, String, Long> fieldsRow() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
return (Row4) super.fieldsRow();
|
||||
|
||||
/**
|
||||
* Create a detached StaffogAuditRecord
|
||||
*/
|
||||
public StaffogAuditRecord() {
|
||||
super(StaffogAudit.STAFFOG_AUDIT);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogAuditRecord
|
||||
*/
|
||||
public StaffogAuditRecord(Integer id, String type, String data, Long time) {
|
||||
super(StaffogAudit.STAFFOG_AUDIT);
|
||||
@Override
|
||||
public Row4<Integer, String, String, Long> valuesRow() {
|
||||
|
||||
setId(id);
|
||||
setType(type);
|
||||
setData(data);
|
||||
setTime(time);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
return (Row4) super.valuesRow();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
|
||||
return StaffogAudit.STAFFOG_AUDIT.ID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
|
||||
return StaffogAudit.STAFFOG_AUDIT.TYPE;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
|
||||
return StaffogAudit.STAFFOG_AUDIT.DATA;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Long> field4() {
|
||||
|
||||
return StaffogAudit.STAFFOG_AUDIT.TIME;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
|
||||
return getType();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
|
||||
return getData();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long component4() {
|
||||
|
||||
return getTime();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
|
||||
return getType();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
|
||||
return getData();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long value4() {
|
||||
|
||||
return getTime();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAuditRecord value1(Integer value) {
|
||||
|
||||
setId(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAuditRecord value2(String value) {
|
||||
|
||||
setType(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAuditRecord value3(String value) {
|
||||
|
||||
setData(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAuditRecord value4(Long value) {
|
||||
|
||||
setTime(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogAuditRecord values(Integer value1, String value2, String value3, Long value4) {
|
||||
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached StaffogAuditRecord
|
||||
*/
|
||||
public StaffogAuditRecord() {
|
||||
|
||||
super(StaffogAudit.STAFFOG_AUDIT);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogAuditRecord
|
||||
*/
|
||||
public StaffogAuditRecord(Integer id, String type, String data, Long time) {
|
||||
|
||||
super(StaffogAudit.STAFFOG_AUDIT);
|
||||
|
||||
setId(id);
|
||||
setType(type);
|
||||
setData(data);
|
||||
setTime(time);
|
||||
resetChangedOnNotNull();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
+268
-197
@@ -5,250 +5,321 @@ import org.jooq.Record1;
|
||||
import org.jooq.Record5;
|
||||
import org.jooq.Row5;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogChatreport;
|
||||
|
||||
/**
|
||||
* This class was generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogChatreportRecord extends UpdatableRecordImpl<StaffogChatreportRecord> implements Record5<Integer, String, String, Long, String> {
|
||||
public class StaffogChatreportRecord extends UpdatableRecordImpl<StaffogChatreportRecord>
|
||||
implements Record5<Integer, String, String, Long, String>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_chatreport.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
set(0, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_chatreport.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_chatreport.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return (Integer) get(0);
|
||||
}
|
||||
set(0, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_chatreport.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_chatreport.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
return (String) get(1);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_chatreport.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_chatreport.by_uuid</code>.
|
||||
*/
|
||||
public void setByUuid(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
return (Integer) get(0);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_chatreport.by_uuid</code>.
|
||||
*/
|
||||
public String getByUuid() {
|
||||
return (String) get(2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_chatreport.time</code>.
|
||||
*/
|
||||
public void setTime(Long value) {
|
||||
set(3, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_chatreport.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_chatreport.time</code>.
|
||||
*/
|
||||
public Long getTime() {
|
||||
return (Long) get(3);
|
||||
}
|
||||
set(1, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_chatreport.messages</code>.
|
||||
*/
|
||||
public void setMessages(String value) {
|
||||
set(4, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_chatreport.messages</code>.
|
||||
*/
|
||||
public String getMessages() {
|
||||
return (String) get(4);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_chatreport.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
return (String) get(1);
|
||||
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record5 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_chatreport.by_uuid</code>.
|
||||
*/
|
||||
public void setByUuid(String value) {
|
||||
|
||||
@Override
|
||||
public Row5<Integer, String, String, Long, String> fieldsRow() {
|
||||
return (Row5) super.fieldsRow();
|
||||
}
|
||||
set(2, value);
|
||||
|
||||
@Override
|
||||
public Row5<Integer, String, String, Long, String> valuesRow() {
|
||||
return (Row5) super.valuesRow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
return StaffogChatreport.STAFFOG_CHATREPORT.ID;
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_chatreport.by_uuid</code>.
|
||||
*/
|
||||
public String getByUuid() {
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
return StaffogChatreport.STAFFOG_CHATREPORT.UUID;
|
||||
}
|
||||
return (String) get(2);
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
return StaffogChatreport.STAFFOG_CHATREPORT.BY_UUID;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Long> field4() {
|
||||
return StaffogChatreport.STAFFOG_CHATREPORT.TIME;
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_chatreport.time</code>.
|
||||
*/
|
||||
public void setTime(Long value) {
|
||||
|
||||
@Override
|
||||
public Field<String> field5() {
|
||||
return StaffogChatreport.STAFFOG_CHATREPORT.MESSAGES;
|
||||
}
|
||||
set(3, value);
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
return getUuid();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_chatreport.time</code>.
|
||||
*/
|
||||
public Long getTime() {
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
return getByUuid();
|
||||
}
|
||||
return (Long) get(3);
|
||||
|
||||
@Override
|
||||
public Long component4() {
|
||||
return getTime();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component5() {
|
||||
return getMessages();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_chatreport.messages</code>.
|
||||
*/
|
||||
public void setMessages(String value) {
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
return getId();
|
||||
}
|
||||
set(4, value);
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
return getUuid();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
return getByUuid();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_chatreport.messages</code>.
|
||||
*/
|
||||
public String getMessages() {
|
||||
|
||||
@Override
|
||||
public Long value4() {
|
||||
return getTime();
|
||||
}
|
||||
return (String) get(4);
|
||||
|
||||
@Override
|
||||
public String value5() {
|
||||
return getMessages();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord value1(Integer value) {
|
||||
setId(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord value2(String value) {
|
||||
setUuid(value);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord value3(String value) {
|
||||
setByUuid(value);
|
||||
return this;
|
||||
}
|
||||
return (Record1) super.key();
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord value4(Long value) {
|
||||
setTime(value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord value5(String value) {
|
||||
setMessages(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Record5 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord values(Integer value1, String value2, String value3, Long value4, String value5) {
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
value5(value5);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Row5<Integer, String, String, Long, String> fieldsRow() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
return (Row5) super.fieldsRow();
|
||||
|
||||
/**
|
||||
* Create a detached StaffogChatreportRecord
|
||||
*/
|
||||
public StaffogChatreportRecord() {
|
||||
super(StaffogChatreport.STAFFOG_CHATREPORT);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogChatreportRecord
|
||||
*/
|
||||
public StaffogChatreportRecord(Integer id, String uuid, String byUuid, Long time, String messages) {
|
||||
@Override
|
||||
public Row5<Integer, String, String, Long, String> valuesRow() {
|
||||
|
||||
super(StaffogChatreport.STAFFOG_CHATREPORT);
|
||||
return (Row5) super.valuesRow();
|
||||
|
||||
setId(id);
|
||||
setUuid(uuid);
|
||||
setByUuid(byUuid);
|
||||
setTime(time);
|
||||
setMessages(messages);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
|
||||
}
|
||||
return StaffogChatreport.STAFFOG_CHATREPORT.ID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
|
||||
return StaffogChatreport.STAFFOG_CHATREPORT.UUID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
|
||||
return StaffogChatreport.STAFFOG_CHATREPORT.BY_UUID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Long> field4() {
|
||||
|
||||
return StaffogChatreport.STAFFOG_CHATREPORT.TIME;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field5() {
|
||||
|
||||
return StaffogChatreport.STAFFOG_CHATREPORT.MESSAGES;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
|
||||
return getByUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long component4() {
|
||||
|
||||
return getTime();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component5() {
|
||||
|
||||
return getMessages();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
|
||||
return getByUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long value4() {
|
||||
|
||||
return getTime();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value5() {
|
||||
|
||||
return getMessages();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord value1(Integer value) {
|
||||
|
||||
setId(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord value2(String value) {
|
||||
|
||||
setUuid(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord value3(String value) {
|
||||
|
||||
setByUuid(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord value4(Long value) {
|
||||
|
||||
setTime(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord value5(String value) {
|
||||
|
||||
setMessages(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogChatreportRecord values(Integer value1, String value2, String value3, Long value4, String value5) {
|
||||
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
value5(value5);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached StaffogChatreportRecord
|
||||
*/
|
||||
public StaffogChatreportRecord() {
|
||||
|
||||
super(StaffogChatreport.STAFFOG_CHATREPORT);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogChatreportRecord
|
||||
*/
|
||||
public StaffogChatreportRecord(Integer id, String uuid, String byUuid, Long time, String messages) {
|
||||
|
||||
super(StaffogChatreport.STAFFOG_CHATREPORT);
|
||||
|
||||
setId(id);
|
||||
setUuid(uuid);
|
||||
setByUuid(byUuid);
|
||||
setTime(time);
|
||||
setMessages(messages);
|
||||
resetChangedOnNotNull();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+225
-167
@@ -1,219 +1,277 @@
|
||||
package uk.hotten.staffog.data.jooq.tables.records;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.Record4;
|
||||
import org.jooq.Row4;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogHistory;
|
||||
|
||||
/**
|
||||
* This class was generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogHistoryRecord extends UpdatableRecordImpl<StaffogHistoryRecord> implements Record4<Integer, LocalDateTime, String, String> {
|
||||
public class StaffogHistoryRecord extends UpdatableRecordImpl<StaffogHistoryRecord>
|
||||
implements Record4<Integer, LocalDateTime, String, String>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_history.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
set(0, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_history.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_history.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return (Integer) get(0);
|
||||
}
|
||||
set(0, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_history.date</code>.
|
||||
*/
|
||||
public void setDate(LocalDateTime value) {
|
||||
set(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_history.date</code>.
|
||||
*/
|
||||
public LocalDateTime getDate() {
|
||||
return (LocalDateTime) get(1);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_history.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_history.name</code>.
|
||||
*/
|
||||
public void setName(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
return (Integer) get(0);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_history.name</code>.
|
||||
*/
|
||||
public String getName() {
|
||||
return (String) get(2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_history.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
set(3, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_history.date</code>.
|
||||
*/
|
||||
public void setDate(LocalDateTime value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_history.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
return (String) get(3);
|
||||
}
|
||||
set(1, value);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_history.date</code>.
|
||||
*/
|
||||
public LocalDateTime getDate() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record4 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
return (LocalDateTime) get(1);
|
||||
|
||||
@Override
|
||||
public Row4<Integer, LocalDateTime, String, String> fieldsRow() {
|
||||
return (Row4) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Row4<Integer, LocalDateTime, String, String> valuesRow() {
|
||||
return (Row4) super.valuesRow();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_history.name</code>.
|
||||
*/
|
||||
public void setName(String value) {
|
||||
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
return StaffogHistory.STAFFOG_HISTORY.ID;
|
||||
}
|
||||
set(2, value);
|
||||
|
||||
@Override
|
||||
public Field<LocalDateTime> field2() {
|
||||
return StaffogHistory.STAFFOG_HISTORY.DATE;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
return StaffogHistory.STAFFOG_HISTORY.NAME;
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_history.name</code>.
|
||||
*/
|
||||
public String getName() {
|
||||
|
||||
@Override
|
||||
public Field<String> field4() {
|
||||
return StaffogHistory.STAFFOG_HISTORY.UUID;
|
||||
}
|
||||
return (String) get(2);
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalDateTime component2() {
|
||||
return getDate();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_history.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
return getName();
|
||||
}
|
||||
set(3, value);
|
||||
|
||||
@Override
|
||||
public String component4() {
|
||||
return getUuid();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
return getId();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_history.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
|
||||
@Override
|
||||
public LocalDateTime value2() {
|
||||
return getDate();
|
||||
}
|
||||
return (String) get(3);
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
return getName();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value4() {
|
||||
return getUuid();
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogHistoryRecord value1(Integer value) {
|
||||
setId(value);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
|
||||
@Override
|
||||
public StaffogHistoryRecord value2(LocalDateTime value) {
|
||||
setDate(value);
|
||||
return this;
|
||||
}
|
||||
return (Record1) super.key();
|
||||
|
||||
@Override
|
||||
public StaffogHistoryRecord value3(String value) {
|
||||
setName(value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogHistoryRecord value4(String value) {
|
||||
setUuid(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Record4 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogHistoryRecord values(Integer value1, LocalDateTime value2, String value3, String value4) {
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Row4<Integer, LocalDateTime, String, String> fieldsRow() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
return (Row4) super.fieldsRow();
|
||||
|
||||
/**
|
||||
* Create a detached StaffogHistoryRecord
|
||||
*/
|
||||
public StaffogHistoryRecord() {
|
||||
super(StaffogHistory.STAFFOG_HISTORY);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogHistoryRecord
|
||||
*/
|
||||
public StaffogHistoryRecord(Integer id, LocalDateTime date, String name, String uuid) {
|
||||
@Override
|
||||
public Row4<Integer, LocalDateTime, String, String> valuesRow() {
|
||||
|
||||
super(StaffogHistory.STAFFOG_HISTORY);
|
||||
return (Row4) super.valuesRow();
|
||||
|
||||
setId(id);
|
||||
setDate(date);
|
||||
setName(name);
|
||||
setUuid(uuid);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
|
||||
}
|
||||
return StaffogHistory.STAFFOG_HISTORY.ID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<LocalDateTime> field2() {
|
||||
|
||||
return StaffogHistory.STAFFOG_HISTORY.DATE;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
|
||||
return StaffogHistory.STAFFOG_HISTORY.NAME;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field4() {
|
||||
|
||||
return StaffogHistory.STAFFOG_HISTORY.UUID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalDateTime component2() {
|
||||
|
||||
return getDate();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
|
||||
return getName();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component4() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalDateTime value2() {
|
||||
|
||||
return getDate();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
|
||||
return getName();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value4() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogHistoryRecord value1(Integer value) {
|
||||
|
||||
setId(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogHistoryRecord value2(LocalDateTime value) {
|
||||
|
||||
setDate(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogHistoryRecord value3(String value) {
|
||||
|
||||
setName(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogHistoryRecord value4(String value) {
|
||||
|
||||
setUuid(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogHistoryRecord values(Integer value1, LocalDateTime value2, String value3, String value4) {
|
||||
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached StaffogHistoryRecord
|
||||
*/
|
||||
public StaffogHistoryRecord() {
|
||||
|
||||
super(StaffogHistory.STAFFOG_HISTORY);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogHistoryRecord
|
||||
*/
|
||||
public StaffogHistoryRecord(Integer id, LocalDateTime date, String name, String uuid) {
|
||||
|
||||
super(StaffogHistory.STAFFOG_HISTORY);
|
||||
|
||||
setId(id);
|
||||
setDate(date);
|
||||
setName(name);
|
||||
setUuid(uuid);
|
||||
resetChangedOnNotNull();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,287 +5,372 @@ import org.jooq.Record1;
|
||||
import org.jooq.Record6;
|
||||
import org.jooq.Row6;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogKick;
|
||||
|
||||
/**
|
||||
* This class was generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogKickRecord extends UpdatableRecordImpl<StaffogKickRecord> implements Record6<Long, String, String, String, String, Long> {
|
||||
public class StaffogKickRecord extends UpdatableRecordImpl<StaffogKickRecord>
|
||||
implements Record6<Long, String, String, String, String, Long>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.id</code>.
|
||||
*/
|
||||
public void setId(Long value) {
|
||||
set(0, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.id</code>.
|
||||
*/
|
||||
public void setId(Long value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.id</code>.
|
||||
*/
|
||||
public Long getId() {
|
||||
return (Long) get(0);
|
||||
}
|
||||
set(0, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
return (String) get(1);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.id</code>.
|
||||
*/
|
||||
public Long getId() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.reason</code>.
|
||||
*/
|
||||
public void setReason(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
return (Long) get(0);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.reason</code>.
|
||||
*/
|
||||
public String getReason() {
|
||||
return (String) get(2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.by_uuid</code>.
|
||||
*/
|
||||
public void setByUuid(String value) {
|
||||
set(3, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.by_uuid</code>.
|
||||
*/
|
||||
public String getByUuid() {
|
||||
return (String) get(3);
|
||||
}
|
||||
set(1, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.by_name</code>.
|
||||
*/
|
||||
public void setByName(String value) {
|
||||
set(4, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.by_name</code>.
|
||||
*/
|
||||
public String getByName() {
|
||||
return (String) get(4);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.time</code>.
|
||||
*/
|
||||
public void setTime(Long value) {
|
||||
set(5, value);
|
||||
}
|
||||
return (String) get(1);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.time</code>.
|
||||
*/
|
||||
public Long getTime() {
|
||||
return (Long) get(5);
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.reason</code>.
|
||||
*/
|
||||
public void setReason(String value) {
|
||||
|
||||
@Override
|
||||
public Record1<Long> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
set(2, value);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record6 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@Override
|
||||
public Row6<Long, String, String, String, String, Long> fieldsRow() {
|
||||
return (Row6) super.fieldsRow();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.reason</code>.
|
||||
*/
|
||||
public String getReason() {
|
||||
|
||||
@Override
|
||||
public Row6<Long, String, String, String, String, Long> valuesRow() {
|
||||
return (Row6) super.valuesRow();
|
||||
}
|
||||
return (String) get(2);
|
||||
|
||||
@Override
|
||||
public Field<Long> field1() {
|
||||
return StaffogKick.STAFFOG_KICK.ID;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
return StaffogKick.STAFFOG_KICK.UUID;
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.by_uuid</code>.
|
||||
*/
|
||||
public void setByUuid(String value) {
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
return StaffogKick.STAFFOG_KICK.REASON;
|
||||
}
|
||||
set(3, value);
|
||||
|
||||
@Override
|
||||
public Field<String> field4() {
|
||||
return StaffogKick.STAFFOG_KICK.BY_UUID;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field5() {
|
||||
return StaffogKick.STAFFOG_KICK.BY_NAME;
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.by_uuid</code>.
|
||||
*/
|
||||
public String getByUuid() {
|
||||
|
||||
@Override
|
||||
public Field<Long> field6() {
|
||||
return StaffogKick.STAFFOG_KICK.TIME;
|
||||
}
|
||||
return (String) get(3);
|
||||
|
||||
@Override
|
||||
public Long component1() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
return getUuid();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.by_name</code>.
|
||||
*/
|
||||
public void setByName(String value) {
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
return getReason();
|
||||
}
|
||||
set(4, value);
|
||||
|
||||
@Override
|
||||
public String component4() {
|
||||
return getByUuid();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component5() {
|
||||
return getByName();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.by_name</code>.
|
||||
*/
|
||||
public String getByName() {
|
||||
|
||||
@Override
|
||||
public Long component6() {
|
||||
return getTime();
|
||||
}
|
||||
return (String) get(4);
|
||||
|
||||
@Override
|
||||
public Long value1() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
return getUuid();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_kick.time</code>.
|
||||
*/
|
||||
public void setTime(Long value) {
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
return getReason();
|
||||
}
|
||||
set(5, value);
|
||||
|
||||
@Override
|
||||
public String value4() {
|
||||
return getByUuid();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value5() {
|
||||
return getByName();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_kick.time</code>.
|
||||
*/
|
||||
public Long getTime() {
|
||||
|
||||
@Override
|
||||
public Long value6() {
|
||||
return getTime();
|
||||
}
|
||||
return (Long) get(5);
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value1(Long value) {
|
||||
setId(value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value2(String value) {
|
||||
setUuid(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value3(String value) {
|
||||
setReason(value);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Record1<Long> key() {
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value4(String value) {
|
||||
setByUuid(value);
|
||||
return this;
|
||||
}
|
||||
return (Record1) super.key();
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value5(String value) {
|
||||
setByName(value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value6(Long value) {
|
||||
setTime(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Record6 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord values(Long value1, String value2, String value3, String value4, String value5, Long value6) {
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
value5(value5);
|
||||
value6(value6);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Row6<Long, String, String, String, String, Long> fieldsRow() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
return (Row6) super.fieldsRow();
|
||||
|
||||
/**
|
||||
* Create a detached StaffogKickRecord
|
||||
*/
|
||||
public StaffogKickRecord() {
|
||||
super(StaffogKick.STAFFOG_KICK);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogKickRecord
|
||||
*/
|
||||
public StaffogKickRecord(Long id, String uuid, String reason, String byUuid, String byName, Long time) {
|
||||
@Override
|
||||
public Row6<Long, String, String, String, String, Long> valuesRow() {
|
||||
|
||||
super(StaffogKick.STAFFOG_KICK);
|
||||
return (Row6) super.valuesRow();
|
||||
|
||||
setId(id);
|
||||
setUuid(uuid);
|
||||
setReason(reason);
|
||||
setByUuid(byUuid);
|
||||
setByName(byName);
|
||||
setTime(time);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Field<Long> field1() {
|
||||
|
||||
}
|
||||
return StaffogKick.STAFFOG_KICK.ID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
|
||||
return StaffogKick.STAFFOG_KICK.UUID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
|
||||
return StaffogKick.STAFFOG_KICK.REASON;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field4() {
|
||||
|
||||
return StaffogKick.STAFFOG_KICK.BY_UUID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field5() {
|
||||
|
||||
return StaffogKick.STAFFOG_KICK.BY_NAME;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Long> field6() {
|
||||
|
||||
return StaffogKick.STAFFOG_KICK.TIME;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long component1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
|
||||
return getReason();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component4() {
|
||||
|
||||
return getByUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component5() {
|
||||
|
||||
return getByName();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long component6() {
|
||||
|
||||
return getTime();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long value1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
|
||||
return getReason();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value4() {
|
||||
|
||||
return getByUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value5() {
|
||||
|
||||
return getByName();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long value6() {
|
||||
|
||||
return getTime();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value1(Long value) {
|
||||
|
||||
setId(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value2(String value) {
|
||||
|
||||
setUuid(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value3(String value) {
|
||||
|
||||
setReason(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value4(String value) {
|
||||
|
||||
setByUuid(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value5(String value) {
|
||||
|
||||
setByName(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord value6(Long value) {
|
||||
|
||||
setTime(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogKickRecord values(Long value1, String value2, String value3, String value4, String value5,
|
||||
Long value6)
|
||||
{
|
||||
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
value5(value5);
|
||||
value6(value6);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached StaffogKickRecord
|
||||
*/
|
||||
public StaffogKickRecord() {
|
||||
|
||||
super(StaffogKick.STAFFOG_KICK);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogKickRecord
|
||||
*/
|
||||
public StaffogKickRecord(Long id, String uuid, String reason, String byUuid, String byName, Long time) {
|
||||
|
||||
super(StaffogKick.STAFFOG_KICK);
|
||||
|
||||
setId(id);
|
||||
setUuid(uuid);
|
||||
setReason(reason);
|
||||
setByUuid(byUuid);
|
||||
setByName(byName);
|
||||
setTime(time);
|
||||
resetChangedOnNotNull();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+173
-128
@@ -4,167 +4,212 @@ import org.jooq.Field;
|
||||
import org.jooq.Record3;
|
||||
import org.jooq.Row3;
|
||||
import org.jooq.impl.TableRecordImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogLinkcode;
|
||||
|
||||
/**
|
||||
* This class was generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogLinkcodeRecord extends TableRecordImpl<StaffogLinkcodeRecord> implements Record3<String, String, Boolean> {
|
||||
public class StaffogLinkcodeRecord extends TableRecordImpl<StaffogLinkcodeRecord>
|
||||
implements Record3<String, String, Boolean>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_linkcode.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
set(0, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_linkcode.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_linkcode.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
return (String) get(0);
|
||||
}
|
||||
set(0, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_linkcode.code</code>.
|
||||
*/
|
||||
public void setCode(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_linkcode.code</code>.
|
||||
*/
|
||||
public String getCode() {
|
||||
return (String) get(1);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_linkcode.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_linkcode.admin</code>.
|
||||
*/
|
||||
public void setAdmin(Boolean value) {
|
||||
set(2, value);
|
||||
}
|
||||
return (String) get(0);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_linkcode.admin</code>.
|
||||
*/
|
||||
public Boolean getAdmin() {
|
||||
return (Boolean) get(2);
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record3 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_linkcode.code</code>.
|
||||
*/
|
||||
public void setCode(String value) {
|
||||
|
||||
@Override
|
||||
public Row3<String, String, Boolean> fieldsRow() {
|
||||
return (Row3) super.fieldsRow();
|
||||
}
|
||||
set(1, value);
|
||||
|
||||
@Override
|
||||
public Row3<String, String, Boolean> valuesRow() {
|
||||
return (Row3) super.valuesRow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field1() {
|
||||
return StaffogLinkcode.STAFFOG_LINKCODE.UUID;
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_linkcode.code</code>.
|
||||
*/
|
||||
public String getCode() {
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
return StaffogLinkcode.STAFFOG_LINKCODE.CODE;
|
||||
}
|
||||
return (String) get(1);
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field3() {
|
||||
return StaffogLinkcode.STAFFOG_LINKCODE.ADMIN;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component1() {
|
||||
return getUuid();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_linkcode.admin</code>.
|
||||
*/
|
||||
public void setAdmin(Boolean value) {
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
return getCode();
|
||||
}
|
||||
set(2, value);
|
||||
|
||||
@Override
|
||||
public Boolean component3() {
|
||||
return getAdmin();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value1() {
|
||||
return getUuid();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_linkcode.admin</code>.
|
||||
*/
|
||||
public Boolean getAdmin() {
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
return getCode();
|
||||
}
|
||||
return (Boolean) get(2);
|
||||
|
||||
@Override
|
||||
public Boolean value3() {
|
||||
return getAdmin();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogLinkcodeRecord value1(String value) {
|
||||
setUuid(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Record3 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogLinkcodeRecord value2(String value) {
|
||||
setCode(value);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Row3<String, String, Boolean> fieldsRow() {
|
||||
|
||||
@Override
|
||||
public StaffogLinkcodeRecord value3(Boolean value) {
|
||||
setAdmin(value);
|
||||
return this;
|
||||
}
|
||||
return (Row3) super.fieldsRow();
|
||||
|
||||
@Override
|
||||
public StaffogLinkcodeRecord values(String value1, String value2, Boolean value3) {
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
@Override
|
||||
public Row3<String, String, Boolean> valuesRow() {
|
||||
|
||||
/**
|
||||
* Create a detached StaffogLinkcodeRecord
|
||||
*/
|
||||
public StaffogLinkcodeRecord() {
|
||||
super(StaffogLinkcode.STAFFOG_LINKCODE);
|
||||
}
|
||||
return (Row3) super.valuesRow();
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogLinkcodeRecord
|
||||
*/
|
||||
public StaffogLinkcodeRecord(String uuid, String code, Boolean admin) {
|
||||
}
|
||||
|
||||
super(StaffogLinkcode.STAFFOG_LINKCODE);
|
||||
@Override
|
||||
public Field<String> field1() {
|
||||
|
||||
setUuid(uuid);
|
||||
setCode(code);
|
||||
setAdmin(admin);
|
||||
resetChangedOnNotNull();
|
||||
return StaffogLinkcode.STAFFOG_LINKCODE.UUID;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
|
||||
return StaffogLinkcode.STAFFOG_LINKCODE.CODE;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field3() {
|
||||
|
||||
return StaffogLinkcode.STAFFOG_LINKCODE.ADMIN;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component1() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
|
||||
return getCode();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean component3() {
|
||||
|
||||
return getAdmin();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value1() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
|
||||
return getCode();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean value3() {
|
||||
|
||||
return getAdmin();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogLinkcodeRecord value1(String value) {
|
||||
|
||||
setUuid(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogLinkcodeRecord value2(String value) {
|
||||
|
||||
setCode(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogLinkcodeRecord value3(Boolean value) {
|
||||
|
||||
setAdmin(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogLinkcodeRecord values(String value1, String value2, Boolean value3) {
|
||||
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached StaffogLinkcodeRecord
|
||||
*/
|
||||
public StaffogLinkcodeRecord() {
|
||||
|
||||
super(StaffogLinkcode.STAFFOG_LINKCODE);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogLinkcodeRecord
|
||||
*/
|
||||
public StaffogLinkcodeRecord(String uuid, String code, Boolean admin) {
|
||||
|
||||
super(StaffogLinkcode.STAFFOG_LINKCODE);
|
||||
|
||||
setUuid(uuid);
|
||||
setCode(code);
|
||||
setAdmin(admin);
|
||||
resetChangedOnNotNull();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
+710
-537
File diff suppressed because it is too large.
Load diff
+358
-259
@@ -5,324 +5,423 @@ import org.jooq.Record1;
|
||||
import org.jooq.Record7;
|
||||
import org.jooq.Row7;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogStaffip;
|
||||
|
||||
/**
|
||||
* This class was generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogStaffipRecord extends UpdatableRecordImpl<StaffogStaffipRecord> implements Record7<Integer, String, String, Boolean, Boolean, Boolean, Boolean> {
|
||||
public class StaffogStaffipRecord extends UpdatableRecordImpl<StaffogStaffipRecord>
|
||||
implements Record7<Integer, String, String, Boolean, Boolean, Boolean, Boolean>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
set(0, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return (Integer) get(0);
|
||||
}
|
||||
set(0, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.ip</code>.
|
||||
*/
|
||||
public void setIp(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.ip</code>.
|
||||
*/
|
||||
public String getIp() {
|
||||
return (String) get(1);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
return (Integer) get(0);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
return (String) get(2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.initial</code>.
|
||||
*/
|
||||
public void setInitial(Boolean value) {
|
||||
set(3, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.ip</code>.
|
||||
*/
|
||||
public void setIp(String value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.initial</code>.
|
||||
*/
|
||||
public Boolean getInitial() {
|
||||
return (Boolean) get(3);
|
||||
}
|
||||
set(1, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.panel_acknowledged</code>.
|
||||
*/
|
||||
public void setPanelAcknowledged(Boolean value) {
|
||||
set(4, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.panel_acknowledged</code>.
|
||||
*/
|
||||
public Boolean getPanelAcknowledged() {
|
||||
return (Boolean) get(4);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.ip</code>.
|
||||
*/
|
||||
public String getIp() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.panel_verified</code>.
|
||||
*/
|
||||
public void setPanelVerified(Boolean value) {
|
||||
set(5, value);
|
||||
}
|
||||
return (String) get(1);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.panel_verified</code>.
|
||||
*/
|
||||
public Boolean getPanelVerified() {
|
||||
return (Boolean) get(5);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.game_verified</code>.
|
||||
*/
|
||||
public void setGameVerified(Boolean value) {
|
||||
set(6, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.game_verified</code>.
|
||||
*/
|
||||
public Boolean getGameVerified() {
|
||||
return (Boolean) get(6);
|
||||
}
|
||||
set(2, value);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record7 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
return (String) get(2);
|
||||
|
||||
@Override
|
||||
public Row7<Integer, String, String, Boolean, Boolean, Boolean, Boolean> fieldsRow() {
|
||||
return (Row7) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Row7<Integer, String, String, Boolean, Boolean, Boolean, Boolean> valuesRow() {
|
||||
return (Row7) super.valuesRow();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.initial</code>.
|
||||
*/
|
||||
public void setInitial(Boolean value) {
|
||||
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.ID;
|
||||
}
|
||||
set(3, value);
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.IP;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.UUID;
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.initial</code>.
|
||||
*/
|
||||
public Boolean getInitial() {
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field4() {
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.INITIAL;
|
||||
}
|
||||
return (Boolean) get(3);
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field5() {
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.PANEL_ACKNOWLEDGED;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field6() {
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.PANEL_VERIFIED;
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.panel_acknowledged</code>.
|
||||
*/
|
||||
public void setPanelAcknowledged(Boolean value) {
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field7() {
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.GAME_VERIFIED;
|
||||
}
|
||||
set(4, value);
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
return getIp();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.panel_acknowledged</code>.
|
||||
*/
|
||||
public Boolean getPanelAcknowledged() {
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
return getUuid();
|
||||
}
|
||||
return (Boolean) get(4);
|
||||
|
||||
@Override
|
||||
public Boolean component4() {
|
||||
return getInitial();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean component5() {
|
||||
return getPanelAcknowledged();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.panel_verified</code>.
|
||||
*/
|
||||
public void setPanelVerified(Boolean value) {
|
||||
|
||||
@Override
|
||||
public Boolean component6() {
|
||||
return getPanelVerified();
|
||||
}
|
||||
set(5, value);
|
||||
|
||||
@Override
|
||||
public Boolean component7() {
|
||||
return getGameVerified();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
return getId();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.panel_verified</code>.
|
||||
*/
|
||||
public Boolean getPanelVerified() {
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
return getIp();
|
||||
}
|
||||
return (Boolean) get(5);
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
return getUuid();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean value4() {
|
||||
return getInitial();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_staffip.game_verified</code>.
|
||||
*/
|
||||
public void setGameVerified(Boolean value) {
|
||||
|
||||
@Override
|
||||
public Boolean value5() {
|
||||
return getPanelAcknowledged();
|
||||
}
|
||||
set(6, value);
|
||||
|
||||
@Override
|
||||
public Boolean value6() {
|
||||
return getPanelVerified();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean value7() {
|
||||
return getGameVerified();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_staffip.game_verified</code>.
|
||||
*/
|
||||
public Boolean getGameVerified() {
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value1(Integer value) {
|
||||
setId(value);
|
||||
return this;
|
||||
}
|
||||
return (Boolean) get(6);
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value2(String value) {
|
||||
setIp(value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value3(String value) {
|
||||
setUuid(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value4(Boolean value) {
|
||||
setInitial(value);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value5(Boolean value) {
|
||||
setPanelAcknowledged(value);
|
||||
return this;
|
||||
}
|
||||
return (Record1) super.key();
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value6(Boolean value) {
|
||||
setPanelVerified(value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value7(Boolean value) {
|
||||
setGameVerified(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Record7 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord values(Integer value1, String value2, String value3, Boolean value4, Boolean value5, Boolean value6, Boolean value7) {
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
value5(value5);
|
||||
value6(value6);
|
||||
value7(value7);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Row7<Integer, String, String, Boolean, Boolean, Boolean, Boolean> fieldsRow() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
return (Row7) super.fieldsRow();
|
||||
|
||||
/**
|
||||
* Create a detached StaffogStaffipRecord
|
||||
*/
|
||||
public StaffogStaffipRecord() {
|
||||
super(StaffogStaffip.STAFFOG_STAFFIP);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogStaffipRecord
|
||||
*/
|
||||
public StaffogStaffipRecord(Integer id, String ip, String uuid, Boolean initial, Boolean panelAcknowledged, Boolean panelVerified, Boolean gameVerified) {
|
||||
@Override
|
||||
public Row7<Integer, String, String, Boolean, Boolean, Boolean, Boolean> valuesRow() {
|
||||
|
||||
super(StaffogStaffip.STAFFOG_STAFFIP);
|
||||
return (Row7) super.valuesRow();
|
||||
|
||||
setId(id);
|
||||
setIp(ip);
|
||||
setUuid(uuid);
|
||||
setInitial(initial);
|
||||
setPanelAcknowledged(panelAcknowledged);
|
||||
setPanelVerified(panelVerified);
|
||||
setGameVerified(gameVerified);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
|
||||
}
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.ID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.IP;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.UUID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field4() {
|
||||
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.INITIAL;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field5() {
|
||||
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.PANEL_ACKNOWLEDGED;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field6() {
|
||||
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.PANEL_VERIFIED;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field7() {
|
||||
|
||||
return StaffogStaffip.STAFFOG_STAFFIP.GAME_VERIFIED;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
|
||||
return getIp();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean component4() {
|
||||
|
||||
return getInitial();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean component5() {
|
||||
|
||||
return getPanelAcknowledged();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean component6() {
|
||||
|
||||
return getPanelVerified();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean component7() {
|
||||
|
||||
return getGameVerified();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
|
||||
return getIp();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean value4() {
|
||||
|
||||
return getInitial();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean value5() {
|
||||
|
||||
return getPanelAcknowledged();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean value6() {
|
||||
|
||||
return getPanelVerified();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean value7() {
|
||||
|
||||
return getGameVerified();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value1(Integer value) {
|
||||
|
||||
setId(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value2(String value) {
|
||||
|
||||
setIp(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value3(String value) {
|
||||
|
||||
setUuid(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value4(Boolean value) {
|
||||
|
||||
setInitial(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value5(Boolean value) {
|
||||
|
||||
setPanelAcknowledged(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value6(Boolean value) {
|
||||
|
||||
setPanelVerified(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord value7(Boolean value) {
|
||||
|
||||
setGameVerified(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStaffipRecord values(Integer value1, String value2, String value3, Boolean value4, Boolean value5,
|
||||
Boolean value6, Boolean value7)
|
||||
{
|
||||
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
value5(value5);
|
||||
value6(value6);
|
||||
value7(value7);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached StaffogStaffipRecord
|
||||
*/
|
||||
public StaffogStaffipRecord() {
|
||||
|
||||
super(StaffogStaffip.STAFFOG_STAFFIP);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogStaffipRecord
|
||||
*/
|
||||
public StaffogStaffipRecord(Integer id, String ip, String uuid, Boolean initial, Boolean panelAcknowledged,
|
||||
Boolean panelVerified, Boolean gameVerified)
|
||||
{
|
||||
|
||||
super(StaffogStaffip.STAFFOG_STAFFIP);
|
||||
|
||||
setId(id);
|
||||
setIp(ip);
|
||||
setUuid(uuid);
|
||||
setInitial(initial);
|
||||
setPanelAcknowledged(panelAcknowledged);
|
||||
setPanelVerified(panelVerified);
|
||||
setGameVerified(gameVerified);
|
||||
resetChangedOnNotNull();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,129 +4,161 @@ import org.jooq.Field;
|
||||
import org.jooq.Record2;
|
||||
import org.jooq.Row2;
|
||||
import org.jooq.impl.TableRecordImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogStat;
|
||||
|
||||
/**
|
||||
* This class was generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogStatRecord extends TableRecordImpl<StaffogStatRecord> implements Record2<String, String> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_stat.name</code>.
|
||||
*/
|
||||
public void setName(String value) {
|
||||
set(0, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_stat.name</code>.
|
||||
*/
|
||||
public void setName(String value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_stat.name</code>.
|
||||
*/
|
||||
public String getName() {
|
||||
return (String) get(0);
|
||||
}
|
||||
set(0, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_stat.stat</code>.
|
||||
*/
|
||||
public void setStat(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_stat.stat</code>.
|
||||
*/
|
||||
public String getStat() {
|
||||
return (String) get(1);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_stat.name</code>.
|
||||
*/
|
||||
public String getName() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record2 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
return (String) get(0);
|
||||
|
||||
@Override
|
||||
public Row2<String, String> fieldsRow() {
|
||||
return (Row2) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Row2<String, String> valuesRow() {
|
||||
return (Row2) super.valuesRow();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_stat.stat</code>.
|
||||
*/
|
||||
public void setStat(String value) {
|
||||
|
||||
@Override
|
||||
public Field<String> field1() {
|
||||
return StaffogStat.STAFFOG_STAT.NAME;
|
||||
}
|
||||
set(1, value);
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
return StaffogStat.STAFFOG_STAT.STAT;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component1() {
|
||||
return getName();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_stat.stat</code>.
|
||||
*/
|
||||
public String getStat() {
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
return getStat();
|
||||
}
|
||||
return (String) get(1);
|
||||
|
||||
@Override
|
||||
public String value1() {
|
||||
return getName();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
return getStat();
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Record2 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogStatRecord value1(String value) {
|
||||
setName(value);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Row2<String, String> fieldsRow() {
|
||||
|
||||
@Override
|
||||
public StaffogStatRecord value2(String value) {
|
||||
setStat(value);
|
||||
return this;
|
||||
}
|
||||
return (Row2) super.fieldsRow();
|
||||
|
||||
@Override
|
||||
public StaffogStatRecord values(String value1, String value2) {
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
@Override
|
||||
public Row2<String, String> valuesRow() {
|
||||
|
||||
/**
|
||||
* Create a detached StaffogStatRecord
|
||||
*/
|
||||
public StaffogStatRecord() {
|
||||
super(StaffogStat.STAFFOG_STAT);
|
||||
}
|
||||
return (Row2) super.valuesRow();
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogStatRecord
|
||||
*/
|
||||
public StaffogStatRecord(String name, String stat) {
|
||||
}
|
||||
|
||||
super(StaffogStat.STAFFOG_STAT);
|
||||
@Override
|
||||
public Field<String> field1() {
|
||||
|
||||
setName(name);
|
||||
setStat(stat);
|
||||
resetChangedOnNotNull();
|
||||
return StaffogStat.STAFFOG_STAT.NAME;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
|
||||
return StaffogStat.STAFFOG_STAT.STAT;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component1() {
|
||||
|
||||
return getName();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
|
||||
return getStat();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value1() {
|
||||
|
||||
return getName();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
|
||||
return getStat();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStatRecord value1(String value) {
|
||||
|
||||
setName(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStatRecord value2(String value) {
|
||||
|
||||
setStat(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogStatRecord values(String value1, String value2) {
|
||||
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached StaffogStatRecord
|
||||
*/
|
||||
public StaffogStatRecord() {
|
||||
|
||||
super(StaffogStat.STAFFOG_STAT);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogStatRecord
|
||||
*/
|
||||
public StaffogStatRecord(String name, String stat) {
|
||||
|
||||
super(StaffogStat.STAFFOG_STAT);
|
||||
|
||||
setName(name);
|
||||
setStat(stat);
|
||||
resetChangedOnNotNull();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,176 +5,223 @@ import org.jooq.Record1;
|
||||
import org.jooq.Record3;
|
||||
import org.jooq.Row3;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogTask;
|
||||
|
||||
/**
|
||||
* This class was generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogTaskRecord extends UpdatableRecordImpl<StaffogTaskRecord> implements Record3<Integer, String, String> {
|
||||
public class StaffogTaskRecord extends UpdatableRecordImpl<StaffogTaskRecord>
|
||||
implements Record3<Integer, String, String>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_task.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
set(0, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_task.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_task.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return (Integer) get(0);
|
||||
}
|
||||
set(0, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_task.task</code>.
|
||||
*/
|
||||
public void setTask(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_task.task</code>.
|
||||
*/
|
||||
public String getTask() {
|
||||
return (String) get(1);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_task.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_task.data</code>.
|
||||
*/
|
||||
public void setData(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
return (Integer) get(0);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_task.data</code>.
|
||||
*/
|
||||
public String getData() {
|
||||
return (String) get(2);
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_task.task</code>.
|
||||
*/
|
||||
public void setTask(String value) {
|
||||
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
set(1, value);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record3 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@Override
|
||||
public Row3<Integer, String, String> fieldsRow() {
|
||||
return (Row3) super.fieldsRow();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_task.task</code>.
|
||||
*/
|
||||
public String getTask() {
|
||||
|
||||
@Override
|
||||
public Row3<Integer, String, String> valuesRow() {
|
||||
return (Row3) super.valuesRow();
|
||||
}
|
||||
return (String) get(1);
|
||||
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
return StaffogTask.STAFFOG_TASK.ID;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
return StaffogTask.STAFFOG_TASK.TASK;
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_task.data</code>.
|
||||
*/
|
||||
public void setData(String value) {
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
return StaffogTask.STAFFOG_TASK.DATA;
|
||||
}
|
||||
set(2, value);
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
return getTask();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_task.data</code>.
|
||||
*/
|
||||
public String getData() {
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
return getData();
|
||||
}
|
||||
return (String) get(2);
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
return getTask();
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
return getData();
|
||||
}
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
|
||||
@Override
|
||||
public StaffogTaskRecord value1(Integer value) {
|
||||
setId(value);
|
||||
return this;
|
||||
}
|
||||
return (Record1) super.key();
|
||||
|
||||
@Override
|
||||
public StaffogTaskRecord value2(String value) {
|
||||
setTask(value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogTaskRecord value3(String value) {
|
||||
setData(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Record3 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogTaskRecord values(Integer value1, String value2, String value3) {
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Row3<Integer, String, String> fieldsRow() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
return (Row3) super.fieldsRow();
|
||||
|
||||
/**
|
||||
* Create a detached StaffogTaskRecord
|
||||
*/
|
||||
public StaffogTaskRecord() {
|
||||
super(StaffogTask.STAFFOG_TASK);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogTaskRecord
|
||||
*/
|
||||
public StaffogTaskRecord(Integer id, String task, String data) {
|
||||
@Override
|
||||
public Row3<Integer, String, String> valuesRow() {
|
||||
|
||||
super(StaffogTask.STAFFOG_TASK);
|
||||
return (Row3) super.valuesRow();
|
||||
|
||||
setId(id);
|
||||
setTask(task);
|
||||
setData(data);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
|
||||
}
|
||||
return StaffogTask.STAFFOG_TASK.ID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
|
||||
return StaffogTask.STAFFOG_TASK.TASK;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
|
||||
return StaffogTask.STAFFOG_TASK.DATA;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
|
||||
return getTask();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
|
||||
return getData();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
|
||||
return getTask();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
|
||||
return getData();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogTaskRecord value1(Integer value) {
|
||||
|
||||
setId(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogTaskRecord value2(String value) {
|
||||
|
||||
setTask(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogTaskRecord value3(String value) {
|
||||
|
||||
setData(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogTaskRecord values(Integer value1, String value2, String value3) {
|
||||
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached StaffogTaskRecord
|
||||
*/
|
||||
public StaffogTaskRecord() {
|
||||
|
||||
super(StaffogTask.STAFFOG_TASK);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogTaskRecord
|
||||
*/
|
||||
public StaffogTaskRecord(Integer id, String task, String data) {
|
||||
|
||||
super(StaffogTask.STAFFOG_TASK);
|
||||
|
||||
setId(id);
|
||||
setTask(task);
|
||||
setData(data);
|
||||
resetChangedOnNotNull();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,287 +5,372 @@ import org.jooq.Record1;
|
||||
import org.jooq.Record6;
|
||||
import org.jooq.Row6;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import uk.hotten.staffog.data.jooq.tables.StaffogWeb;
|
||||
|
||||
/**
|
||||
* This class was generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class StaffogWebRecord extends UpdatableRecordImpl<StaffogWebRecord> implements Record6<Integer, String, String, String, Boolean, Boolean> {
|
||||
public class StaffogWebRecord extends UpdatableRecordImpl<StaffogWebRecord>
|
||||
implements Record6<Integer, String, String, String, Boolean, Boolean>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
set(0, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return (Integer) get(0);
|
||||
}
|
||||
set(0, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.username</code>.
|
||||
*/
|
||||
public void setUsername(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.username</code>.
|
||||
*/
|
||||
public String getUsername() {
|
||||
return (String) get(1);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
return (Integer) get(0);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
return (String) get(2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.password</code>.
|
||||
*/
|
||||
public void setPassword(String value) {
|
||||
set(3, value);
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.username</code>.
|
||||
*/
|
||||
public void setUsername(String value) {
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.password</code>.
|
||||
*/
|
||||
public String getPassword() {
|
||||
return (String) get(3);
|
||||
}
|
||||
set(1, value);
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.active</code>.
|
||||
*/
|
||||
public void setActive(Boolean value) {
|
||||
set(4, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.active</code>.
|
||||
*/
|
||||
public Boolean getActive() {
|
||||
return (Boolean) get(4);
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.username</code>.
|
||||
*/
|
||||
public String getUsername() {
|
||||
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.admin</code>.
|
||||
*/
|
||||
public void setAdmin(Boolean value) {
|
||||
set(5, value);
|
||||
}
|
||||
return (String) get(1);
|
||||
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.admin</code>.
|
||||
*/
|
||||
public Boolean getAdmin() {
|
||||
return (Boolean) get(5);
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.uuid</code>.
|
||||
*/
|
||||
public void setUuid(String value) {
|
||||
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
set(2, value);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record6 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@Override
|
||||
public Row6<Integer, String, String, String, Boolean, Boolean> fieldsRow() {
|
||||
return (Row6) super.fieldsRow();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.uuid</code>.
|
||||
*/
|
||||
public String getUuid() {
|
||||
|
||||
@Override
|
||||
public Row6<Integer, String, String, String, Boolean, Boolean> valuesRow() {
|
||||
return (Row6) super.valuesRow();
|
||||
}
|
||||
return (String) get(2);
|
||||
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
return StaffogWeb.STAFFOG_WEB.ID;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
return StaffogWeb.STAFFOG_WEB.USERNAME;
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.password</code>.
|
||||
*/
|
||||
public void setPassword(String value) {
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
return StaffogWeb.STAFFOG_WEB.UUID;
|
||||
}
|
||||
set(3, value);
|
||||
|
||||
@Override
|
||||
public Field<String> field4() {
|
||||
return StaffogWeb.STAFFOG_WEB.PASSWORD;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field5() {
|
||||
return StaffogWeb.STAFFOG_WEB.ACTIVE;
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.password</code>.
|
||||
*/
|
||||
public String getPassword() {
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field6() {
|
||||
return StaffogWeb.STAFFOG_WEB.ADMIN;
|
||||
}
|
||||
return (String) get(3);
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
return getUsername();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.active</code>.
|
||||
*/
|
||||
public void setActive(Boolean value) {
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
return getUuid();
|
||||
}
|
||||
set(4, value);
|
||||
|
||||
@Override
|
||||
public String component4() {
|
||||
return getPassword();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean component5() {
|
||||
return getActive();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.active</code>.
|
||||
*/
|
||||
public Boolean getActive() {
|
||||
|
||||
@Override
|
||||
public Boolean component6() {
|
||||
return getAdmin();
|
||||
}
|
||||
return (Boolean) get(4);
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
return getId();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
return getUsername();
|
||||
}
|
||||
/**
|
||||
* Setter for <code>staffog.staffog_web.admin</code>.
|
||||
*/
|
||||
public void setAdmin(Boolean value) {
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
return getUuid();
|
||||
}
|
||||
set(5, value);
|
||||
|
||||
@Override
|
||||
public String value4() {
|
||||
return getPassword();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean value5() {
|
||||
return getActive();
|
||||
}
|
||||
/**
|
||||
* Getter for <code>staffog.staffog_web.admin</code>.
|
||||
*/
|
||||
public Boolean getAdmin() {
|
||||
|
||||
@Override
|
||||
public Boolean value6() {
|
||||
return getAdmin();
|
||||
}
|
||||
return (Boolean) get(5);
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value1(Integer value) {
|
||||
setId(value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value2(String value) {
|
||||
setUsername(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value3(String value) {
|
||||
setUuid(value);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value4(String value) {
|
||||
setPassword(value);
|
||||
return this;
|
||||
}
|
||||
return (Record1) super.key();
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value5(Boolean value) {
|
||||
setActive(value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value6(Boolean value) {
|
||||
setAdmin(value);
|
||||
return this;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// Record6 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord values(Integer value1, String value2, String value3, String value4, Boolean value5, Boolean value6) {
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
value5(value5);
|
||||
value6(value6);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public Row6<Integer, String, String, String, Boolean, Boolean> fieldsRow() {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
return (Row6) super.fieldsRow();
|
||||
|
||||
/**
|
||||
* Create a detached StaffogWebRecord
|
||||
*/
|
||||
public StaffogWebRecord() {
|
||||
super(StaffogWeb.STAFFOG_WEB);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogWebRecord
|
||||
*/
|
||||
public StaffogWebRecord(Integer id, String username, String uuid, String password, Boolean active, Boolean admin) {
|
||||
@Override
|
||||
public Row6<Integer, String, String, String, Boolean, Boolean> valuesRow() {
|
||||
|
||||
super(StaffogWeb.STAFFOG_WEB);
|
||||
return (Row6) super.valuesRow();
|
||||
|
||||
setId(id);
|
||||
setUsername(username);
|
||||
setUuid(uuid);
|
||||
setPassword(password);
|
||||
setActive(active);
|
||||
setAdmin(admin);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Field<Integer> field1() {
|
||||
|
||||
}
|
||||
return StaffogWeb.STAFFOG_WEB.ID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field2() {
|
||||
|
||||
return StaffogWeb.STAFFOG_WEB.USERNAME;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field3() {
|
||||
|
||||
return StaffogWeb.STAFFOG_WEB.UUID;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field4() {
|
||||
|
||||
return StaffogWeb.STAFFOG_WEB.PASSWORD;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field5() {
|
||||
|
||||
return StaffogWeb.STAFFOG_WEB.ACTIVE;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Boolean> field6() {
|
||||
|
||||
return StaffogWeb.STAFFOG_WEB.ADMIN;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component2() {
|
||||
|
||||
return getUsername();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component3() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component4() {
|
||||
|
||||
return getPassword();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean component5() {
|
||||
|
||||
return getActive();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean component6() {
|
||||
|
||||
return getAdmin();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value1() {
|
||||
|
||||
return getId();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value2() {
|
||||
|
||||
return getUsername();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value3() {
|
||||
|
||||
return getUuid();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value4() {
|
||||
|
||||
return getPassword();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean value5() {
|
||||
|
||||
return getActive();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean value6() {
|
||||
|
||||
return getAdmin();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value1(Integer value) {
|
||||
|
||||
setId(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value2(String value) {
|
||||
|
||||
setUsername(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value3(String value) {
|
||||
|
||||
setUuid(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value4(String value) {
|
||||
|
||||
setPassword(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value5(Boolean value) {
|
||||
|
||||
setActive(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord value6(Boolean value) {
|
||||
|
||||
setAdmin(value);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffogWebRecord values(Integer value1, String value2, String value3, String value4, Boolean value5,
|
||||
Boolean value6)
|
||||
{
|
||||
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
value5(value5);
|
||||
value6(value6);
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached StaffogWebRecord
|
||||
*/
|
||||
public StaffogWebRecord() {
|
||||
|
||||
super(StaffogWeb.STAFFOG_WEB);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialized StaffogWebRecord
|
||||
*/
|
||||
public StaffogWebRecord(Integer id, String username, String uuid, String password, Boolean active, Boolean admin) {
|
||||
|
||||
super(StaffogWeb.STAFFOG_WEB);
|
||||
|
||||
setId(id);
|
||||
setUsername(username);
|
||||
setUuid(uuid);
|
||||
setPassword(password);
|
||||
setActive(active);
|
||||
setAdmin(admin);
|
||||
resetChangedOnNotNull();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,82 +10,89 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import io.papermc.paper.event.player.AsyncChatEvent;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import net.trueog.utilitiesog.UtilitiesOG;
|
||||
import uk.hotten.staffog.punish.data.ChatReportEntry;
|
||||
import uk.hotten.staffog.punish.data.PunishEntry;
|
||||
import uk.hotten.staffog.punish.data.PunishType;
|
||||
import uk.hotten.staffog.utils.Message;
|
||||
import uk.hotten.staffog.utils.TimeUtils;
|
||||
|
||||
public class PunishEventListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onJoin(PlayerJoinEvent event) {
|
||||
@EventHandler
|
||||
public void onJoin(PlayerJoinEvent event) {
|
||||
|
||||
PunishManager.getInstance().checkNameToUuid(event.getPlayer().getName(), event.getPlayer().getUniqueId());
|
||||
PunishManager.getInstance().checkNameToUuid(event.getPlayer().getName(), event.getPlayer().getUniqueId());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onAsyncPreJoin(AsyncPlayerPreLoginEvent event) {
|
||||
@EventHandler
|
||||
public void onAsyncPreJoin(AsyncPlayerPreLoginEvent event) {
|
||||
|
||||
PunishEntry entry = PunishManager.getInstance().checkActivePunishment(PunishType.BAN, event.getUniqueId());
|
||||
final PunishEntry entry = PunishManager.getInstance().checkActivePunishment(PunishType.BAN,
|
||||
event.getUniqueId());
|
||||
|
||||
if (entry == null)
|
||||
return;
|
||||
if (entry == null) {
|
||||
|
||||
event.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_BANNED);
|
||||
return;
|
||||
|
||||
String messageString = "&cYou have been banned for: \n" +
|
||||
"&f" + entry.getReason() + "\n\n" +
|
||||
"&c" + "Your ban " + (entry.getUntil() == -1 ? "does not expire." : "will expire in:\n"
|
||||
+ "&f" + TimeUtils.formatMillisecondTime(entry.calculateRemaining()));
|
||||
}
|
||||
|
||||
// Create a MiniMessage instance.
|
||||
MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
// Deserialize the string into a TextComponent.å
|
||||
Component kickMessage = miniMessage.deserialize(messageString);
|
||||
event.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_BANNED);
|
||||
|
||||
event.kickMessage(kickMessage);
|
||||
final String messageString = "&cYou have been banned for: \n" + "&f" + entry.getReason() + "\n\n" + "&c"
|
||||
+ "Your ban " + (entry.getUntil() == -1 ? "does not expire."
|
||||
: "will expire in:\n" + "&f" + TimeUtils.formatMillisecondTime(entry.calculateRemaining()));
|
||||
|
||||
}
|
||||
// Create a MiniMessage instance.
|
||||
final MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
// Deserialize the string into a TextComponent.å
|
||||
final Component kickMessage = miniMessage.deserialize(messageString);
|
||||
|
||||
@EventHandler
|
||||
public void onAsyncChat(AsyncChatEvent event) {
|
||||
event.kickMessage(kickMessage);
|
||||
|
||||
PunishEntry entry = PunishManager.getInstance().checkActivePunishment(PunishType.MUTE, event.getPlayer().getUniqueId());
|
||||
}
|
||||
|
||||
if (entry != null) {
|
||||
@EventHandler
|
||||
public void onAsyncChat(AsyncChatEvent event) {
|
||||
|
||||
event.setCancelled(true);
|
||||
event.getPlayer().sendMessage(Message.format("&c" + "You have been muted for " + "&6" + entry.getReason()));
|
||||
event.getPlayer().sendMessage(Message.format("&c" + "Your mute " + (entry.getUntil() == -1 ? "does not expire." : "will expire in: " + "&f" + TimeUtils.formatMillisecondTime(entry.calculateRemaining()))));
|
||||
final PunishEntry entry = PunishManager.getInstance().checkActivePunishment(PunishType.MUTE,
|
||||
event.getPlayer().getUniqueId());
|
||||
|
||||
}
|
||||
else {
|
||||
if (entry != null) {
|
||||
|
||||
return;
|
||||
event.setCancelled(true);
|
||||
UtilitiesOG.trueogMessage(event.getPlayer(), "&c" + "You have been muted for " + "&6" + entry.getReason());
|
||||
UtilitiesOG.trueogMessage(event.getPlayer(),
|
||||
"&c" + "Your mute " + (entry.getUntil() == -1 ? "does not expire."
|
||||
: "will expire in: " + "&f" + TimeUtils.formatMillisecondTime(entry.calculateRemaining())));
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
return;
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST )
|
||||
public void onAsyncChatReport(AsyncChatEvent event) {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
}
|
||||
|
||||
return;
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onAsyncChatReport(AsyncChatEvent event) {
|
||||
|
||||
}
|
||||
if (event.isCancelled()) {
|
||||
|
||||
String eventMessage = MiniMessage.miniMessage().serialize(event.message());
|
||||
return;
|
||||
|
||||
PunishManager pm = PunishManager.getInstance();
|
||||
ChatReportEntry entry = new ChatReportEntry(event.getPlayer().getUniqueId(), event.getPlayer().getName(), eventMessage, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
pm.getChatReportEntries().add(entry);
|
||||
Bukkit.getServer().getScheduler().runTaskLater(pm.getPlugin(), () -> pm.getChatReportEntries().remove(entry), 2400); // remove 2m later
|
||||
final String eventMessage = MiniMessage.miniMessage().serialize(event.message());
|
||||
|
||||
}
|
||||
final PunishManager pm = PunishManager.getInstance();
|
||||
final ChatReportEntry entry = new ChatReportEntry(event.getPlayer().getUniqueId(), event.getPlayer().getName(),
|
||||
eventMessage, System.currentTimeMillis());
|
||||
|
||||
pm.getChatReportEntries().add(entry);
|
||||
Bukkit.getServer().getScheduler().runTaskLater(pm.getPlugin(), () -> pm.getChatReportEntries().remove(entry),
|
||||
2400); // remove 2m later
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import java.sql.Connection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jooq.DSLContext;
|
||||
@@ -21,6 +22,8 @@ import com.google.gson.Gson;
|
||||
import lombok.Getter;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import net.trueog.utilitiesog.UtilitiesOG;
|
||||
import uk.hotten.staffog.StaffOGPlugin;
|
||||
import uk.hotten.staffog.data.DatabaseManager;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogBanRecord;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogChatreportRecord;
|
||||
@@ -32,466 +35,494 @@ import uk.hotten.staffog.punish.data.PunishEntry;
|
||||
import uk.hotten.staffog.punish.data.PunishType;
|
||||
import uk.hotten.staffog.security.SecurityManager;
|
||||
import uk.hotten.staffog.utils.Console;
|
||||
import uk.hotten.staffog.utils.Message;
|
||||
import uk.hotten.staffog.utils.TimeUtils;
|
||||
|
||||
public class PunishManager {
|
||||
|
||||
@Getter private JavaPlugin plugin;
|
||||
@Getter private static PunishManager instance;
|
||||
|
||||
@Getter private ArrayList<ChatReportEntry> chatReportEntries;
|
||||
|
||||
public PunishManager(JavaPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
instance = this;
|
||||
chatReportEntries = new ArrayList<>();
|
||||
|
||||
plugin.getServer().getPluginManager().registerEvents(new PunishEventListener(), plugin);
|
||||
}
|
||||
|
||||
public void checkNameToUuid(String name, UUID uuid) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
|
||||
boolean exists = dsl.fetchExists(dsl.select(STAFFOG_HISTORY.ID)
|
||||
.from(STAFFOG_HISTORY)
|
||||
.where(STAFFOG_HISTORY.UUID.eq(uuid.toString()))
|
||||
.and(STAFFOG_HISTORY.NAME.eq(name)));
|
||||
|
||||
if (exists) {
|
||||
return;
|
||||
}
|
||||
|
||||
dsl.insertInto(STAFFOG_HISTORY)
|
||||
.set(STAFFOG_HISTORY.UUID, uuid.toString())
|
||||
.set(STAFFOG_HISTORY.NAME, name)
|
||||
.execute();
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
|
||||
Console.error("Failed to check username to uuid.");
|
||||
error.printStackTrace();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public String getNameFromUUID(UUID uuid) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
|
||||
return dsl.select(STAFFOG_HISTORY.NAME)
|
||||
.from(STAFFOG_HISTORY)
|
||||
.where(STAFFOG_HISTORY.UUID.eq(uuid.toString()))
|
||||
.orderBy(STAFFOG_HISTORY.ID.desc())
|
||||
.limit(1)
|
||||
.fetchOne(STAFFOG_HISTORY.NAME);
|
||||
|
||||
} catch (Exception error) {
|
||||
Console.error("Failed to get name from uuid. " + uuid.toString());
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public UUID getUUIDFromName(String name) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
String uuidString = dsl.select(STAFFOG_HISTORY.UUID)
|
||||
.from(STAFFOG_HISTORY)
|
||||
.where(STAFFOG_HISTORY.NAME.eq(name))
|
||||
.orderBy(STAFFOG_HISTORY.ID.desc())
|
||||
.limit(1)
|
||||
.fetchOne(STAFFOG_HISTORY.UUID);
|
||||
|
||||
if (uuidString == null)
|
||||
return null;
|
||||
|
||||
return UUID.fromString(uuidString);
|
||||
|
||||
} catch (Exception error) {
|
||||
Console.error("Failed to get name from name. " + name);
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void newPunishment(PunishEntry entry) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
if (entry.getType() == PunishType.BAN) {
|
||||
dsl.insertInto(STAFFOG_BAN)
|
||||
.set(STAFFOG_BAN.UUID, entry.getUuid().toString())
|
||||
.set(STAFFOG_BAN.REASON, entry.getReason())
|
||||
.set(STAFFOG_BAN.BY_UUID, entry.getByUuid())
|
||||
.set(STAFFOG_BAN.BY_NAME, entry.getByName())
|
||||
.set(STAFFOG_BAN.TIME, entry.getTime())
|
||||
.set(STAFFOG_BAN.UNTIL, entry.getUntil())
|
||||
.set(STAFFOG_BAN.ACTIVE, entry.isActive())
|
||||
.execute();
|
||||
} else {
|
||||
dsl.insertInto(STAFFOG_MUTE)
|
||||
.set(STAFFOG_MUTE.UUID, entry.getUuid().toString())
|
||||
.set(STAFFOG_MUTE.REASON, entry.getReason())
|
||||
.set(STAFFOG_MUTE.BY_UUID, entry.getByUuid())
|
||||
.set(STAFFOG_MUTE.BY_NAME, entry.getByName())
|
||||
.set(STAFFOG_MUTE.TIME, entry.getTime())
|
||||
.set(STAFFOG_MUTE.UNTIL, entry.getUntil())
|
||||
.set(STAFFOG_MUTE.ACTIVE, entry.isActive())
|
||||
.execute();
|
||||
}
|
||||
|
||||
String duration = TimeUtils.formatMillisecondTime(entry.calculateDuration());
|
||||
if (entry.getPlayer() != null && entry.getPlayer().isOnline()) {
|
||||
switch (entry.getType()) {
|
||||
case BAN -> {
|
||||
|
||||
String messageString = ("&c" + "You have been banned for:\n" +
|
||||
"&f" + entry.getReason() + "\n\n" +
|
||||
"&c" + "Your ban " + (entry.getUntil() == -1 ? "does not expire." : "will expire in: \n"
|
||||
+ "&f" + duration));
|
||||
|
||||
// Create a MiniMessage instance.
|
||||
MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
// Deserialize the string into a TextComponent.å
|
||||
Component kickMessage = miniMessage.deserialize(messageString);
|
||||
|
||||
entry.getPlayer().kick(kickMessage);
|
||||
|
||||
}
|
||||
case MUTE -> {
|
||||
entry.getPlayer().sendMessage(Message.format("&cYou have been muted for &f" + entry.getReason()));
|
||||
entry.getPlayer().sendMessage(Message.format("&cYour mute " + (entry.getUntil() == -1 ? "does not expire." : "will expire in: \n"
|
||||
+ "&f" + duration)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Message.staffBroadcast(Message.formatNotification(
|
||||
entry.getType().toString(),
|
||||
"New " + entry.getType().toString().toLowerCase()
|
||||
+ " on " + entry.getName() + " for "
|
||||
+ duration + " by " + entry.getByName()));
|
||||
|
||||
SecurityManager.getInstance().checkAndDeactivateStaffAccount(entry.getUuid());
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
Console.error("Failed to create punishment.");
|
||||
error.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public PunishEntry getPunishment(PunishType type, int id) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
PunishEntry entry = new PunishEntry(type);
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
if (type == PunishType.BAN) {
|
||||
StaffogBanRecord record = dsl.select(STAFFOG_BAN.asterisk())
|
||||
.from(STAFFOG_BAN)
|
||||
.where(STAFFOG_BAN.ID.eq((long) id))
|
||||
.fetchOneInto(STAFFOG_BAN);
|
||||
|
||||
if (record == null) {
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
entry.setId(record.getId());
|
||||
entry.setUuid(UUID.fromString(record.getUuid()));
|
||||
entry.setName(getNameFromUUID(entry.getUuid()));
|
||||
entry.setReason(record.getReason());
|
||||
entry.setByUuid(record.getByUuid());
|
||||
entry.setByName(record.getByName());
|
||||
entry.setTime(record.getTime());
|
||||
entry.setUntil(record.getUntil());
|
||||
entry.setActive(record.getActive());
|
||||
if (! entry.isActive()) {
|
||||
entry.setRemovedUuid(record.getRemovedUuid());
|
||||
entry.setRemovedName(record.getRemovedName());
|
||||
entry.setRemovedTime(record.getRemovedTime());
|
||||
entry.setRemovedReason(record.getRemovedReason());
|
||||
}
|
||||
} else {
|
||||
StaffogMuteRecord record = dsl.select(STAFFOG_MUTE.asterisk())
|
||||
.from(STAFFOG_MUTE)
|
||||
.where(STAFFOG_MUTE.ID.eq((long) id))
|
||||
.fetchOneInto(STAFFOG_MUTE);
|
||||
|
||||
if (record == null)
|
||||
return null;
|
||||
|
||||
entry.setId(record.getId());
|
||||
entry.setUuid(UUID.fromString(record.getUuid()));
|
||||
entry.setName(getNameFromUUID(entry.getUuid()));
|
||||
entry.setReason(record.getReason());
|
||||
entry.setByUuid(record.getByUuid());
|
||||
entry.setByName(record.getByName());
|
||||
entry.setTime(record.getTime());
|
||||
entry.setUntil(record.getUntil());
|
||||
entry.setActive(record.getActive());
|
||||
if (! entry.isActive()) {
|
||||
entry.setRemovedUuid(record.getRemovedUuid());
|
||||
entry.setRemovedName(record.getRemovedName());
|
||||
entry.setRemovedTime(record.getRemovedTime());
|
||||
entry.setRemovedReason(record.getRemovedReason());
|
||||
}
|
||||
}
|
||||
|
||||
if (entry.checkDurationOver()) {
|
||||
expirePunishment(entry);
|
||||
return null;
|
||||
}
|
||||
|
||||
return entry;
|
||||
|
||||
|
||||
} catch (Exception error) {
|
||||
Console.error("Failed to get punishment info for id " + id);
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public PunishEntry checkActivePunishment(PunishType type, UUID uuid) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
PunishEntry entry = new PunishEntry(type);
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
if (type == PunishType.BAN) {
|
||||
StaffogBanRecord record = dsl.select(STAFFOG_BAN.asterisk())
|
||||
.from(STAFFOG_BAN)
|
||||
.where(STAFFOG_BAN.UUID.eq(uuid.toString()))
|
||||
.and(STAFFOG_BAN.ACTIVE.eq(true))
|
||||
.fetchOneInto(STAFFOG_BAN);
|
||||
|
||||
if (record == null)
|
||||
return null;
|
||||
|
||||
entry.setId(record.getId());
|
||||
entry.setUuid(UUID.fromString(record.getUuid()));
|
||||
entry.setName(getNameFromUUID(entry.getUuid()));
|
||||
entry.setReason(record.getReason());
|
||||
entry.setByUuid(record.getByUuid());
|
||||
entry.setByName(record.getByName());
|
||||
entry.setTime(record.getTime());
|
||||
entry.setUntil(record.getUntil());
|
||||
entry.setActive(record.getActive());
|
||||
} else {
|
||||
StaffogMuteRecord record = dsl.select(STAFFOG_MUTE.asterisk())
|
||||
.from(STAFFOG_MUTE)
|
||||
.where(STAFFOG_MUTE.UUID.eq(uuid.toString()))
|
||||
.and(STAFFOG_MUTE.ACTIVE.eq(true))
|
||||
.fetchOneInto(STAFFOG_MUTE);
|
||||
|
||||
if (record == null)
|
||||
return null;
|
||||
|
||||
entry.setId(record.getId());
|
||||
entry.setUuid(UUID.fromString(record.getUuid()));
|
||||
entry.setName(getNameFromUUID(entry.getUuid()));
|
||||
entry.setReason(record.getReason());
|
||||
entry.setByUuid(record.getByUuid());
|
||||
entry.setByName(record.getByName());
|
||||
entry.setTime(record.getTime());
|
||||
entry.setUntil(record.getUntil());
|
||||
entry.setActive(record.getActive());
|
||||
}
|
||||
|
||||
if (entry.checkDurationOver()) {
|
||||
expirePunishment(entry);
|
||||
return null;
|
||||
}
|
||||
|
||||
return entry;
|
||||
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
Console.error("Failed to get punishment info for " + uuid);
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void expirePunishment(PunishEntry entry) {
|
||||
entry.setRemovedUuid("Expired");
|
||||
entry.setRemovedName("Expired");
|
||||
entry.setRemovedReason("Punishment Expired");
|
||||
entry.setActive(false);
|
||||
removePunishment(entry);
|
||||
}
|
||||
|
||||
public void removePunishment(PunishEntry entry) {
|
||||
entry.setActive(false);
|
||||
entry.setRemovedTime(System.currentTimeMillis());
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
if (entry.getName() == null)
|
||||
entry.setName(getNameFromUUID(entry.getUuid()));
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
if (entry.getType() == PunishType.BAN) {
|
||||
dsl.update(STAFFOG_BAN)
|
||||
.set(STAFFOG_BAN.REMOVED_UUID, entry.getRemovedUuid())
|
||||
.set(STAFFOG_BAN.REMOVED_NAME, entry.getRemovedName())
|
||||
.set(STAFFOG_BAN.REMOVED_REASON, entry.getRemovedReason())
|
||||
.set(STAFFOG_BAN.REMOVED_TIME, entry.getRemovedTime())
|
||||
.set(STAFFOG_BAN.ACTIVE, false)
|
||||
.where(STAFFOG_BAN.ID.eq(entry.getId()))
|
||||
.execute();
|
||||
} else {
|
||||
dsl.update(STAFFOG_MUTE)
|
||||
.set(STAFFOG_MUTE.REMOVED_UUID, entry.getRemovedUuid())
|
||||
.set(STAFFOG_MUTE.REMOVED_NAME, entry.getRemovedName())
|
||||
.set(STAFFOG_MUTE.REMOVED_REASON, entry.getRemovedReason())
|
||||
.set(STAFFOG_MUTE.REMOVED_TIME, entry.getRemovedTime())
|
||||
.set(STAFFOG_MUTE.ACTIVE, false)
|
||||
.where(STAFFOG_MUTE.ID.eq(entry.getId()))
|
||||
.execute();
|
||||
}
|
||||
|
||||
if (entry.getType() == PunishType.MUTE && Bukkit.getServer().getPlayer(entry.getUuid()) != null) {
|
||||
|
||||
Bukkit.getServer().getPlayer(entry.getUuid()).sendMessage(Message.format("&aYou have been unmuted."));
|
||||
|
||||
}
|
||||
|
||||
Message.staffBroadcast(Message.formatNotification("UN" + entry.getType(), entry.getName() + " has been un" + entry.getType().getBroadcastMessage() + " by " + entry.getRemovedName()));
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
|
||||
Console.error("Failed to remove punishment.");
|
||||
error.printStackTrace();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void visualRemovePunishment(PunishEntry entry) {
|
||||
|
||||
if (entry.getType() == PunishType.MUTE && Bukkit.getServer().getPlayer(entry.getUuid()) != null) {
|
||||
|
||||
Bukkit.getServer().getPlayer(entry.getUuid()).sendMessage(Message.format("&aYou have been unmuted."));
|
||||
|
||||
}
|
||||
|
||||
Message.staffBroadcast(Message.formatNotification("UN" + entry.getType(), entry.getName() + " has been un" + entry.getType().getBroadcastMessage() + " by " + entry.getRemovedName()));
|
||||
|
||||
}
|
||||
|
||||
public void newKickPunishment(KickPunishEntry entry) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
dsl.insertInto(STAFFOG_KICK)
|
||||
.set(STAFFOG_KICK.UUID, entry.getUuid().toString())
|
||||
.set(STAFFOG_KICK.REASON, entry.getReason())
|
||||
.set(STAFFOG_KICK.BY_UUID, entry.getByUuid())
|
||||
.set(STAFFOG_KICK.BY_NAME, entry.getByName())
|
||||
.set(STAFFOG_KICK.TIME, entry.getTime())
|
||||
.execute();
|
||||
|
||||
if (entry.getPlayer() != null && entry.getPlayer().isOnline()) {
|
||||
|
||||
String messageString = "&cYou have been kicked for:\n" +
|
||||
"&f" + entry.getReason() + "\n\n" +
|
||||
"&c" + "Please read our rules when you rejoin by running /rules";
|
||||
@Getter
|
||||
private final JavaPlugin plugin;
|
||||
|
||||
// Create a MiniMessage instance.
|
||||
MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
// Deserialize the string into a TextComponent.å
|
||||
Component kickMessage = miniMessage.deserialize(messageString);
|
||||
@Getter
|
||||
private static PunishManager instance;
|
||||
|
||||
entry.getPlayer().kick(kickMessage);
|
||||
@Getter
|
||||
private final ArrayList<ChatReportEntry> chatReportEntries;
|
||||
|
||||
}
|
||||
|
||||
Message.staffBroadcast(Message.formatNotification("KICK", entry.getName() + " has been kicked by " + entry.getByName()));
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
public PunishManager(JavaPlugin plugin) {
|
||||
|
||||
Console.error("Failed to create kick punishment.");
|
||||
error.printStackTrace();
|
||||
|
||||
}
|
||||
this.plugin = plugin;
|
||||
instance = this;
|
||||
chatReportEntries = new ArrayList<>();
|
||||
|
||||
}
|
||||
plugin.getServer().getPluginManager().registerEvents(new PunishEventListener(), plugin);
|
||||
|
||||
public boolean isIncludedInCurrentChatReport(String name) {
|
||||
for (ChatReportEntry entry : chatReportEntries) {
|
||||
if (name.equalsIgnoreCase(entry.getName())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public void checkNameToUuid(String name, UUID uuid) {
|
||||
|
||||
public UUID getUUIDFromChatReport(String name) {
|
||||
for (ChatReportEntry entry : chatReportEntries) {
|
||||
if (name.equalsIgnoreCase(entry.getName())) {
|
||||
return entry.getUuid();
|
||||
}
|
||||
}
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
return null;
|
||||
}
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
|
||||
public String exportChatReport(UUID by, UUID reported) {
|
||||
Gson gson = new Gson();
|
||||
String data = gson.toJson(chatReportEntries);
|
||||
final boolean exists = dsl.fetchExists(dsl.select(STAFFOG_HISTORY.ID).from(STAFFOG_HISTORY)
|
||||
.where(STAFFOG_HISTORY.UUID.eq(uuid.toString())).and(STAFFOG_HISTORY.NAME.eq(name)));
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
if (exists) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
StaffogChatreportRecord record = dsl.insertInto(STAFFOG_CHATREPORT)
|
||||
.set(STAFFOG_CHATREPORT.UUID, reported.toString())
|
||||
.set(STAFFOG_CHATREPORT.BY_UUID, by.toString())
|
||||
.set(STAFFOG_CHATREPORT.TIME, System.currentTimeMillis())
|
||||
.set(STAFFOG_CHATREPORT.MESSAGES, data)
|
||||
.returning(STAFFOG_CHATREPORT.ID)
|
||||
.fetchOne();
|
||||
return;
|
||||
|
||||
return "" + record.getId();
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
dsl.insertInto(STAFFOG_HISTORY).set(STAFFOG_HISTORY.UUID, uuid.toString()).set(STAFFOG_HISTORY.NAME, name)
|
||||
.execute();
|
||||
|
||||
public String createReportFromCR(UUID by, UUID reported, int crid, String reason) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
} catch (Exception error) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
StaffogReportRecord record = dsl.insertInto(STAFFOG_REPORT)
|
||||
.set(STAFFOG_REPORT.UUID, reported.toString())
|
||||
.set(STAFFOG_REPORT.BY_UUID, by.toString())
|
||||
.set(STAFFOG_REPORT.TIME, System.currentTimeMillis())
|
||||
.set(STAFFOG_REPORT.TYPE, "CHAT")
|
||||
.set(STAFFOG_REPORT.REASON, reason)
|
||||
.set(STAFFOG_REPORT.CRID, crid)
|
||||
.returning(STAFFOG_REPORT.ID)
|
||||
.fetchOne();
|
||||
Console.error("Failed to check username to uuid.");
|
||||
error.printStackTrace();
|
||||
|
||||
return "" + record.getId();
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String getNameFromUUID(UUID uuid) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
|
||||
return dsl.select(STAFFOG_HISTORY.NAME).from(STAFFOG_HISTORY)
|
||||
.where(STAFFOG_HISTORY.UUID.eq(uuid.toString())).orderBy(STAFFOG_HISTORY.ID.desc()).limit(1)
|
||||
.fetchOne(STAFFOG_HISTORY.NAME);
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
Console.error("Failed to get name from uuid. " + uuid.toString());
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public UUID getUUIDFromName(String name) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
final String uuidString = dsl.select(STAFFOG_HISTORY.UUID).from(STAFFOG_HISTORY)
|
||||
.where(STAFFOG_HISTORY.NAME.eq(name)).orderBy(STAFFOG_HISTORY.ID.desc()).limit(1)
|
||||
.fetchOne(STAFFOG_HISTORY.UUID);
|
||||
|
||||
if (uuidString == null) {
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
return UUID.fromString(uuidString);
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
Console.error("Failed to get name from name. " + name);
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void newPunishment(PunishEntry entry) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
if (entry.getType() == PunishType.BAN) {
|
||||
|
||||
dsl.insertInto(STAFFOG_BAN).set(STAFFOG_BAN.UUID, entry.getUuid().toString())
|
||||
.set(STAFFOG_BAN.REASON, entry.getReason()).set(STAFFOG_BAN.BY_UUID, entry.getByUuid())
|
||||
.set(STAFFOG_BAN.BY_NAME, entry.getByName()).set(STAFFOG_BAN.TIME, entry.getTime())
|
||||
.set(STAFFOG_BAN.UNTIL, entry.getUntil()).set(STAFFOG_BAN.ACTIVE, entry.isActive()).execute();
|
||||
|
||||
} else {
|
||||
|
||||
dsl.insertInto(STAFFOG_MUTE).set(STAFFOG_MUTE.UUID, entry.getUuid().toString())
|
||||
.set(STAFFOG_MUTE.REASON, entry.getReason()).set(STAFFOG_MUTE.BY_UUID, entry.getByUuid())
|
||||
.set(STAFFOG_MUTE.BY_NAME, entry.getByName()).set(STAFFOG_MUTE.TIME, entry.getTime())
|
||||
.set(STAFFOG_MUTE.UNTIL, entry.getUntil()).set(STAFFOG_MUTE.ACTIVE, entry.isActive()).execute();
|
||||
|
||||
}
|
||||
|
||||
final String duration = TimeUtils.formatMillisecondTime(entry.calculateDuration());
|
||||
if (entry.getPlayer() != null && entry.getPlayer().isOnline()) {
|
||||
|
||||
switch (entry.getType()) {
|
||||
|
||||
case BAN -> {
|
||||
|
||||
final String messageString = ("&c" + "You have been banned for:\n" + "&f" + entry.getReason()
|
||||
+ "\n\n" + "&c" + "Your ban " + (entry.getUntil() == -1 ? "does not expire."
|
||||
: "will expire in: \n" + "&f" + duration));
|
||||
|
||||
// Create a MiniMessage instance.
|
||||
final MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
// Deserialize the string into a TextComponent.
|
||||
final Component kickMessage = miniMessage.deserialize(messageString);
|
||||
|
||||
entry.getPlayer().kick(kickMessage);
|
||||
|
||||
}
|
||||
case MUTE -> {
|
||||
|
||||
UtilitiesOG.trueogMessage(entry.getPlayer(),
|
||||
"&cYou have been muted for &f" + entry.getReason());
|
||||
UtilitiesOG.trueogMessage(entry.getPlayer(),
|
||||
"&cYour mute " + (entry.getUntil() == -1 ? "does not expire."
|
||||
: "will expire in: \n" + "&f" + duration));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
StaffOGPlugin.staffBroadcast(StaffOGPlugin.formatNotification(entry.getType().toString(),
|
||||
"New " + StringUtils.lowerCase(entry.getType().toString()) + " on " + entry.getName() + " for "
|
||||
+ duration + " by " + entry.getByName()));
|
||||
|
||||
SecurityManager.getInstance().checkAndDeactivateStaffAccount(entry.getUuid());
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
Console.error("Failed to create punishment.");
|
||||
error.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public PunishEntry getPunishment(PunishType type, int id) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
final PunishEntry entry = new PunishEntry(type);
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
if (type == PunishType.BAN) {
|
||||
|
||||
final StaffogBanRecord record = dsl.select(STAFFOG_BAN.asterisk()).from(STAFFOG_BAN)
|
||||
.where(STAFFOG_BAN.ID.eq((long) id)).fetchOneInto(STAFFOG_BAN);
|
||||
|
||||
if (record == null) {
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
entry.setId(record.getId());
|
||||
entry.setUuid(UUID.fromString(record.getUuid()));
|
||||
entry.setName(getNameFromUUID(entry.getUuid()));
|
||||
entry.setReason(record.getReason());
|
||||
entry.setByUuid(record.getByUuid());
|
||||
entry.setByName(record.getByName());
|
||||
entry.setTime(record.getTime());
|
||||
entry.setUntil(record.getUntil());
|
||||
entry.setActive(record.getActive());
|
||||
if (!entry.isActive()) {
|
||||
|
||||
entry.setRemovedUuid(record.getRemovedUuid());
|
||||
entry.setRemovedName(record.getRemovedName());
|
||||
entry.setRemovedTime(record.getRemovedTime());
|
||||
entry.setRemovedReason(record.getRemovedReason());
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
final StaffogMuteRecord record = dsl.select(STAFFOG_MUTE.asterisk()).from(STAFFOG_MUTE)
|
||||
.where(STAFFOG_MUTE.ID.eq((long) id)).fetchOneInto(STAFFOG_MUTE);
|
||||
|
||||
if (record == null) {
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
entry.setId(record.getId());
|
||||
entry.setUuid(UUID.fromString(record.getUuid()));
|
||||
entry.setName(getNameFromUUID(entry.getUuid()));
|
||||
entry.setReason(record.getReason());
|
||||
entry.setByUuid(record.getByUuid());
|
||||
entry.setByName(record.getByName());
|
||||
entry.setTime(record.getTime());
|
||||
entry.setUntil(record.getUntil());
|
||||
entry.setActive(record.getActive());
|
||||
if (!entry.isActive()) {
|
||||
|
||||
entry.setRemovedUuid(record.getRemovedUuid());
|
||||
entry.setRemovedName(record.getRemovedName());
|
||||
entry.setRemovedTime(record.getRemovedTime());
|
||||
entry.setRemovedReason(record.getRemovedReason());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (entry.checkDurationOver()) {
|
||||
|
||||
expirePunishment(entry);
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
return entry;
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
Console.error("Failed to get punishment info for id " + id);
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public PunishEntry checkActivePunishment(PunishType type, UUID uuid) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
final PunishEntry entry = new PunishEntry(type);
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
if (type == PunishType.BAN) {
|
||||
|
||||
final StaffogBanRecord record = dsl.select(STAFFOG_BAN.asterisk()).from(STAFFOG_BAN)
|
||||
.where(STAFFOG_BAN.UUID.eq(uuid.toString())).and(STAFFOG_BAN.ACTIVE.eq(true))
|
||||
.fetchOneInto(STAFFOG_BAN);
|
||||
|
||||
if (record == null) {
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
entry.setId(record.getId());
|
||||
entry.setUuid(UUID.fromString(record.getUuid()));
|
||||
entry.setName(getNameFromUUID(entry.getUuid()));
|
||||
entry.setReason(record.getReason());
|
||||
entry.setByUuid(record.getByUuid());
|
||||
entry.setByName(record.getByName());
|
||||
entry.setTime(record.getTime());
|
||||
entry.setUntil(record.getUntil());
|
||||
entry.setActive(record.getActive());
|
||||
|
||||
} else {
|
||||
|
||||
final StaffogMuteRecord record = dsl.select(STAFFOG_MUTE.asterisk()).from(STAFFOG_MUTE)
|
||||
.where(STAFFOG_MUTE.UUID.eq(uuid.toString())).and(STAFFOG_MUTE.ACTIVE.eq(true))
|
||||
.fetchOneInto(STAFFOG_MUTE);
|
||||
|
||||
if (record == null) {
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
entry.setId(record.getId());
|
||||
entry.setUuid(UUID.fromString(record.getUuid()));
|
||||
entry.setName(getNameFromUUID(entry.getUuid()));
|
||||
entry.setReason(record.getReason());
|
||||
entry.setByUuid(record.getByUuid());
|
||||
entry.setByName(record.getByName());
|
||||
entry.setTime(record.getTime());
|
||||
entry.setUntil(record.getUntil());
|
||||
entry.setActive(record.getActive());
|
||||
|
||||
}
|
||||
|
||||
if (entry.checkDurationOver()) {
|
||||
|
||||
expirePunishment(entry);
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
return entry;
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
Console.error("Failed to get punishment info for " + uuid);
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void expirePunishment(PunishEntry entry) {
|
||||
|
||||
entry.setRemovedUuid("Expired");
|
||||
entry.setRemovedName("Expired");
|
||||
entry.setRemovedReason("Punishment Expired");
|
||||
entry.setActive(false);
|
||||
removePunishment(entry);
|
||||
|
||||
}
|
||||
|
||||
public void removePunishment(PunishEntry entry) {
|
||||
|
||||
entry.setActive(false);
|
||||
entry.setRemovedTime(System.currentTimeMillis());
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
if (entry.getName() == null) {
|
||||
|
||||
entry.setName(getNameFromUUID(entry.getUuid()));
|
||||
|
||||
}
|
||||
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
if (entry.getType() == PunishType.BAN) {
|
||||
|
||||
dsl.update(STAFFOG_BAN).set(STAFFOG_BAN.REMOVED_UUID, entry.getRemovedUuid())
|
||||
.set(STAFFOG_BAN.REMOVED_NAME, entry.getRemovedName())
|
||||
.set(STAFFOG_BAN.REMOVED_REASON, entry.getRemovedReason())
|
||||
.set(STAFFOG_BAN.REMOVED_TIME, entry.getRemovedTime()).set(STAFFOG_BAN.ACTIVE, false)
|
||||
.where(STAFFOG_BAN.ID.eq(entry.getId())).execute();
|
||||
|
||||
} else {
|
||||
|
||||
dsl.update(STAFFOG_MUTE).set(STAFFOG_MUTE.REMOVED_UUID, entry.getRemovedUuid())
|
||||
.set(STAFFOG_MUTE.REMOVED_NAME, entry.getRemovedName())
|
||||
.set(STAFFOG_MUTE.REMOVED_REASON, entry.getRemovedReason())
|
||||
.set(STAFFOG_MUTE.REMOVED_TIME, entry.getRemovedTime()).set(STAFFOG_MUTE.ACTIVE, false)
|
||||
.where(STAFFOG_MUTE.ID.eq(entry.getId())).execute();
|
||||
|
||||
}
|
||||
|
||||
if (entry.getType() == PunishType.MUTE && Bukkit.getServer().getPlayer(entry.getUuid()) != null) {
|
||||
|
||||
UtilitiesOG.trueogMessage(Bukkit.getServer().getPlayer(entry.getUuid()), "&aYou have been unmuted.");
|
||||
|
||||
}
|
||||
|
||||
StaffOGPlugin.staffBroadcast(StaffOGPlugin.formatNotification("UN" + entry.getType(), entry.getName()
|
||||
+ " has been un" + entry.getType().getBroadcastMessage() + " by " + entry.getRemovedName()));
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
Console.error("Failed to remove punishment.");
|
||||
error.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void visualRemovePunishment(PunishEntry entry) {
|
||||
|
||||
if (entry.getType() == PunishType.MUTE && Bukkit.getServer().getPlayer(entry.getUuid()) != null) {
|
||||
|
||||
UtilitiesOG.trueogMessage(Bukkit.getServer().getPlayer(entry.getUuid()), "&aYou have been unmuted.");
|
||||
|
||||
}
|
||||
|
||||
StaffOGPlugin.staffBroadcast(StaffOGPlugin.formatNotification("UN" + entry.getType(), entry.getName()
|
||||
+ " has been un" + entry.getType().getBroadcastMessage() + " by " + entry.getRemovedName()));
|
||||
|
||||
}
|
||||
|
||||
public void newKickPunishment(KickPunishEntry entry) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
dsl.insertInto(STAFFOG_KICK).set(STAFFOG_KICK.UUID, entry.getUuid().toString())
|
||||
.set(STAFFOG_KICK.REASON, entry.getReason()).set(STAFFOG_KICK.BY_UUID, entry.getByUuid())
|
||||
.set(STAFFOG_KICK.BY_NAME, entry.getByName()).set(STAFFOG_KICK.TIME, entry.getTime()).execute();
|
||||
|
||||
if (entry.getPlayer() != null && entry.getPlayer().isOnline()) {
|
||||
|
||||
final String messageString = "&cYou have been kicked for:\n" + "&f" + entry.getReason() + "\n\n" + "&c"
|
||||
+ "Please read our rules when you rejoin by running /rules";
|
||||
|
||||
// Create a MiniMessage instance.
|
||||
final MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
// Deserialize the string into a TextComponent.å
|
||||
final Component kickMessage = miniMessage.deserialize(messageString);
|
||||
|
||||
entry.getPlayer().kick(kickMessage);
|
||||
|
||||
}
|
||||
|
||||
StaffOGPlugin.staffBroadcast(StaffOGPlugin.formatNotification("KICK",
|
||||
entry.getName() + " has been kicked by " + entry.getByName()));
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
Console.error("Failed to create kick punishment.");
|
||||
error.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean isIncludedInCurrentChatReport(String name) {
|
||||
|
||||
return chatReportEntries.stream().filter(entry -> StringUtils.equalsIgnoreCase(name, entry.getName()))
|
||||
.findFirst().map(entry -> true).orElse(false);
|
||||
|
||||
}
|
||||
|
||||
public UUID getUUIDFromChatReport(String name) {
|
||||
|
||||
return chatReportEntries.stream().filter(entry -> StringUtils.equalsIgnoreCase(name, entry.getName()))
|
||||
.findFirst().map(ChatReportEntry::getUuid).orElse(null);
|
||||
|
||||
}
|
||||
|
||||
public String exportChatReport(UUID by, UUID reported) {
|
||||
|
||||
final Gson gson = new Gson();
|
||||
final String data = gson.toJson(chatReportEntries);
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
final StaffogChatreportRecord record = dsl.insertInto(STAFFOG_CHATREPORT)
|
||||
.set(STAFFOG_CHATREPORT.UUID, reported.toString()).set(STAFFOG_CHATREPORT.BY_UUID, by.toString())
|
||||
.set(STAFFOG_CHATREPORT.TIME, System.currentTimeMillis()).set(STAFFOG_CHATREPORT.MESSAGES, data)
|
||||
.returning(STAFFOG_CHATREPORT.ID).fetchOne();
|
||||
|
||||
return Integer.toString(record.getId());
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String createReportFromCR(UUID by, UUID reported, int crid, String reason) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
final StaffogReportRecord record = dsl.insertInto(STAFFOG_REPORT)
|
||||
.set(STAFFOG_REPORT.UUID, reported.toString()).set(STAFFOG_REPORT.BY_UUID, by.toString())
|
||||
.set(STAFFOG_REPORT.TIME, System.currentTimeMillis()).set(STAFFOG_REPORT.TYPE, "CHAT")
|
||||
.set(STAFFOG_REPORT.REASON, reason).set(STAFFOG_REPORT.CRID, crid).returning(STAFFOG_REPORT.ID)
|
||||
.fetchOne();
|
||||
|
||||
return Integer.toString(record.getId());
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +1,29 @@
|
||||
package uk.hotten.staffog.punish.data;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
public class ChatReportEntry {
|
||||
|
||||
@Getter private UUID uuid;
|
||||
@Getter private String name;
|
||||
@Getter private String message;
|
||||
@Getter private long time;
|
||||
@Getter
|
||||
private UUID uuid;
|
||||
|
||||
public ChatReportEntry(UUID uuid, String name, String message, long time) {
|
||||
@Getter
|
||||
private String name;
|
||||
|
||||
this.uuid = uuid;
|
||||
this.name = name;
|
||||
this.message = message;
|
||||
this.time = time;
|
||||
@Getter
|
||||
private String message;
|
||||
|
||||
}
|
||||
@Getter
|
||||
private long time;
|
||||
|
||||
}
|
||||
public ChatReportEntry(UUID uuid, String name, String message, long time) {
|
||||
|
||||
this.uuid = uuid;
|
||||
this.name = name;
|
||||
this.message = message;
|
||||
this.time = time;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +1,43 @@
|
||||
package uk.hotten.staffog.punish.data;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class KickPunishEntry {
|
||||
|
||||
@Getter @Setter private Player player;
|
||||
@Getter @Setter private String name;
|
||||
@Getter
|
||||
@Setter
|
||||
private Player player;
|
||||
|
||||
// Data stored in DB
|
||||
@Getter @Setter private int id;
|
||||
@Getter @Setter private UUID uuid;
|
||||
@Getter @Setter private String reason;
|
||||
@Getter
|
||||
@Setter
|
||||
private String name;
|
||||
|
||||
@Getter @Setter private String byUuid;
|
||||
@Getter @Setter private String byName;
|
||||
// Data stored in DB
|
||||
@Getter
|
||||
@Setter
|
||||
private int id;
|
||||
|
||||
@Getter @Setter private long time;
|
||||
@Getter
|
||||
@Setter
|
||||
private UUID uuid;
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
private String reason;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private String byUuid;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private String byName;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private long time;
|
||||
|
||||
}
|
||||
@@ -2,92 +2,129 @@ package uk.hotten.staffog.punish.data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.entity.Player;
|
||||
import uk.hotten.staffog.utils.TimeUtils;
|
||||
|
||||
public class PunishEntry {
|
||||
|
||||
// None DB data
|
||||
@Getter @Setter private PunishType type;
|
||||
@Getter @Setter private Player player;
|
||||
@Getter @Setter private String name;
|
||||
// None DB data
|
||||
@Getter
|
||||
@Setter
|
||||
private PunishType type;
|
||||
|
||||
// Data stored in DB
|
||||
@Getter @Setter private long id;
|
||||
@Getter @Setter private UUID uuid;
|
||||
@Getter @Setter private String reason;
|
||||
@Getter
|
||||
@Setter
|
||||
private Player player;
|
||||
|
||||
@Getter @Setter private String byUuid;
|
||||
@Getter @Setter private String byName;
|
||||
@Getter
|
||||
@Setter
|
||||
private String name;
|
||||
|
||||
@Getter @Setter private String removedUuid;
|
||||
@Getter @Setter private String removedName;
|
||||
@Getter @Setter private String removedReason;
|
||||
@Getter @Setter private long removedTime;
|
||||
// Data stored in DB
|
||||
@Getter
|
||||
@Setter
|
||||
private long id;
|
||||
|
||||
@Getter @Setter private long time;
|
||||
@Getter @Setter private long until;
|
||||
@Getter
|
||||
@Setter
|
||||
private UUID uuid;
|
||||
|
||||
@Getter @Setter private boolean active;
|
||||
@Getter
|
||||
@Setter
|
||||
private String reason;
|
||||
|
||||
public PunishEntry(PunishType type) {
|
||||
@Getter
|
||||
@Setter
|
||||
private String byUuid;
|
||||
|
||||
this.type = type;
|
||||
@Getter
|
||||
@Setter
|
||||
private String byName;
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
private String removedUuid;
|
||||
|
||||
public long calculateDuration() {
|
||||
@Getter
|
||||
@Setter
|
||||
private String removedName;
|
||||
|
||||
if (until == -1) {
|
||||
@Getter
|
||||
@Setter
|
||||
private String removedReason;
|
||||
|
||||
return -1;
|
||||
@Getter
|
||||
@Setter
|
||||
private long removedTime;
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
private long time;
|
||||
|
||||
return until - time;
|
||||
@Getter
|
||||
@Setter
|
||||
private long until;
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean active;
|
||||
|
||||
public long calculateRemaining() {
|
||||
public PunishEntry(PunishType type) {
|
||||
|
||||
if (until == -1) {
|
||||
this.type = type;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
public long calculateDuration() {
|
||||
|
||||
return until - System.currentTimeMillis();
|
||||
if (until == -1) {
|
||||
|
||||
}
|
||||
return -1;
|
||||
|
||||
public boolean checkDurationOver() {
|
||||
}
|
||||
|
||||
if (until == -1) {
|
||||
return until - time;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
public long calculateRemaining() {
|
||||
|
||||
return (calculateRemaining() <= 0);
|
||||
if (until == -1) {
|
||||
|
||||
}
|
||||
return -1;
|
||||
|
||||
public String calculateUntilDate() {
|
||||
}
|
||||
|
||||
if (until == -1) {
|
||||
return until - System.currentTimeMillis();
|
||||
|
||||
return "forever";
|
||||
}
|
||||
|
||||
}
|
||||
public boolean checkDurationOver() {
|
||||
|
||||
Date date = new Date(until);
|
||||
if (until == -1) {
|
||||
|
||||
return TimeUtils.notificationTimeFormat.format(date);
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return (calculateRemaining() <= 0);
|
||||
|
||||
}
|
||||
|
||||
public String calculateUntilDate() {
|
||||
|
||||
if (until == -1) {
|
||||
|
||||
return "forever";
|
||||
|
||||
}
|
||||
|
||||
Date date = new Date(until);
|
||||
|
||||
return TimeUtils.notificationTimeFormat.format(date);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,17 +4,19 @@ import lombok.Getter;
|
||||
|
||||
public enum PunishType {
|
||||
|
||||
BAN("staffog_ban", "banned"),
|
||||
MUTE("staffog_mute", "muted");
|
||||
BAN("staffog_ban", "banned"), MUTE("staffog_mute", "muted");
|
||||
|
||||
@Getter private String table;
|
||||
@Getter private String broadcastMessage;
|
||||
@Getter
|
||||
private String table;
|
||||
|
||||
private PunishType(String table, String broadcastMessage) {
|
||||
@Getter
|
||||
private String broadcastMessage;
|
||||
|
||||
this.table = table;
|
||||
this.broadcastMessage = broadcastMessage;
|
||||
private PunishType(String table, String broadcastMessage) {
|
||||
|
||||
}
|
||||
this.table = table;
|
||||
this.broadcastMessage = broadcastMessage;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,85 +1,82 @@
|
||||
package uk.hotten.staffog.security;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import uk.hotten.staffog.StaffOGPlugin;
|
||||
import uk.hotten.staffog.security.data.StaffIPInfo;
|
||||
|
||||
public class SecurityEventListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onPreJoin(AsyncPlayerPreLoginEvent event) {
|
||||
@EventHandler
|
||||
public void onPreJoin(AsyncPlayerPreLoginEvent event) {
|
||||
|
||||
SecurityManager sm = SecurityManager.getInstance();
|
||||
UUID uuid = event.getUniqueId();
|
||||
SecurityManager sm = SecurityManager.getInstance();
|
||||
UUID uuid = event.getUniqueId();
|
||||
|
||||
if (! StaffOGPlugin.getVaultPerms().playerHas("world", Bukkit.getOfflinePlayer(uuid), "staffog.panelaccess")) {
|
||||
if (!StaffOGPlugin.hasPermission(uuid, event.getName(), "world", "staffog.panelaccess")) {
|
||||
|
||||
return;
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String ip = event.getAddress().getHostAddress();
|
||||
String ip = event.getAddress().getHostAddress();
|
||||
|
||||
if (! sm.hasUUIDGotIp(event.getUniqueId())) {
|
||||
if (!sm.hasUUIDGotIp(event.getUniqueId())) {
|
||||
|
||||
StaffIPInfo ipInfo = new StaffIPInfo(-1, uuid, ip, true, false, false, true);
|
||||
sm.createIpEntry(ipInfo);
|
||||
return;
|
||||
StaffIPInfo ipInfo = new StaffIPInfo(-1, uuid, ip, true, false, false, true);
|
||||
sm.createIpEntry(ipInfo);
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
StaffIPInfo ipInfo = sm.isIpRecognised(event.getUniqueId(), event.getAddress().getHostAddress());
|
||||
if (ipInfo == null) {
|
||||
StaffIPInfo ipInfo = sm.isIpRecognised(event.getUniqueId(), event.getAddress().getHostAddress());
|
||||
if (ipInfo == null) {
|
||||
|
||||
ipInfo = new StaffIPInfo(-1, uuid, ip, false, false, false, true);
|
||||
sm.createIpEntry(ipInfo);
|
||||
ipInfo = new StaffIPInfo(-1, uuid, ip, false, false, false, true);
|
||||
sm.createIpEntry(ipInfo);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Only challenge a new IP if the users's panel account is already set up.
|
||||
if (! ipInfo.isPanelAcknowledged() && ! ipInfo.isInitial() && sm.isUserAccountCreated(uuid, ip) == true) {
|
||||
// Only challenge a new IP if the users's panel account is already set up.
|
||||
if (!ipInfo.isPanelAcknowledged() && !ipInfo.isInitial() && sm.isUserAccountCreated(uuid, ip) == true) {
|
||||
|
||||
event.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_OTHER);
|
||||
event.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_OTHER);
|
||||
|
||||
String messageString = "&cNew IP address detected!\n" +
|
||||
"&6Please login to the staff panel to authenticate your new IP address.\n\n" +
|
||||
"&cIf you are using a VPN, please disconnect it and try again.";
|
||||
String messageString = "&cNew IP address detected!\n"
|
||||
+ "&6Please login to the staff panel to authenticate your new IP address.\n\n"
|
||||
+ "&cIf you are using a VPN, please disconnect it and try again.";
|
||||
|
||||
// Create a MiniMessage instance.
|
||||
MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
// Deserialize the string into a TextComponent.
|
||||
Component kickMessage = miniMessage.deserialize(messageString);
|
||||
// Create a MiniMessage instance.
|
||||
MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
// Deserialize the string into a TextComponent.
|
||||
Component kickMessage = miniMessage.deserialize(messageString);
|
||||
|
||||
event.kickMessage(kickMessage);
|
||||
return;
|
||||
event.kickMessage(kickMessage);
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (! ipInfo.isGameVerified()) {
|
||||
if (!ipInfo.isGameVerified()) {
|
||||
|
||||
ipInfo.setGameVerified(true);
|
||||
sm.updateIpEntry(ipInfo);
|
||||
ipInfo.setGameVerified(true);
|
||||
sm.updateIpEntry(ipInfo);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
sm.getStaffIPInfos().put(uuid, ipInfo);
|
||||
sm.getStaffIPInfos().put(uuid, ipInfo);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onQuit(PlayerQuitEvent event) {
|
||||
@EventHandler
|
||||
public void onQuit(PlayerQuitEvent event) {
|
||||
|
||||
SecurityManager.getInstance().getStaffIPInfos().remove(event.getPlayer().getUniqueId());
|
||||
SecurityManager.getInstance().getStaffIPInfos().remove(event.getPlayer().getUniqueId());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,15 +5,12 @@ import static uk.hotten.staffog.data.jooq.Tables.STAFFOG_STAFFIP;
|
||||
import static uk.hotten.staffog.data.jooq.Tables.STAFFOG_WEB;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.UUID;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jooq.DSLContext;
|
||||
import org.jooq.impl.DSL;
|
||||
|
||||
import lombok.Getter;
|
||||
import uk.hotten.staffog.data.DatabaseManager;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogLinkcodeRecord;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogStaffipRecord;
|
||||
@@ -23,247 +20,240 @@ import uk.hotten.staffog.utils.Console;
|
||||
|
||||
public class SecurityManager {
|
||||
|
||||
@Getter private static SecurityManager instance;
|
||||
@Getter private HashMap<UUID, StaffIPInfo> staffIPInfos;
|
||||
@Getter
|
||||
private static SecurityManager instance;
|
||||
|
||||
public SecurityManager(JavaPlugin plugin) {
|
||||
instance = this;
|
||||
staffIPInfos = new HashMap<>();
|
||||
@Getter
|
||||
private HashMap<UUID, StaffIPInfo> staffIPInfos;
|
||||
|
||||
plugin.getServer().getPluginManager().registerEvents(new SecurityEventListener(), plugin);
|
||||
}
|
||||
public SecurityManager(JavaPlugin plugin) {
|
||||
|
||||
public StaffIPInfo isIpRecognised(UUID uuid, String ip) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
instance = this;
|
||||
staffIPInfos = new HashMap<>();
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
StaffogStaffipRecord record = dsl.select(STAFFOG_STAFFIP.asterisk())
|
||||
.from(STAFFOG_STAFFIP)
|
||||
.where(STAFFOG_STAFFIP.UUID.eq(uuid.toString()))
|
||||
.and(STAFFOG_STAFFIP.IP.eq(ip))
|
||||
.fetchOneInto(STAFFOG_STAFFIP);
|
||||
|
||||
if (record == null) {
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
return new StaffIPInfo(
|
||||
record.getId(),
|
||||
UUID.fromString(record.getUuid()),
|
||||
record.getIp(),
|
||||
record.getInitial(),
|
||||
record.getPanelAcknowledged(),
|
||||
record.getPanelVerified(),
|
||||
record.getGameVerified()
|
||||
);
|
||||
}
|
||||
catch (Exception error) {
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isUserAccountCreated(UUID id, String ip) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
StaffogStaffipRecord record = dsl.select(STAFFOG_STAFFIP.asterisk())
|
||||
.from(STAFFOG_STAFFIP)
|
||||
.where(STAFFOG_STAFFIP.UUID.eq(id.toString()))
|
||||
.and(STAFFOG_STAFFIP.IP.eq(ip))
|
||||
.fetchOneInto(STAFFOG_STAFFIP);
|
||||
|
||||
if (record == null) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
return record.getPanelVerified();
|
||||
plugin.getServer().getPluginManager().registerEvents(new SecurityEventListener(), plugin);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
e.printStackTrace();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public StaffIPInfo isIpRecognised(UUID uuid, String ip) {
|
||||
|
||||
public boolean hasUUIDGotIp(UUID uuid) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
return dsl.fetchExists(dsl.selectFrom(STAFFOG_STAFFIP)
|
||||
.where(STAFFOG_STAFFIP.UUID.eq(uuid.toString())));
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
StaffogStaffipRecord record = dsl.select(STAFFOG_STAFFIP.asterisk()).from(STAFFOG_STAFFIP)
|
||||
.where(STAFFOG_STAFFIP.UUID.eq(uuid.toString())).and(STAFFOG_STAFFIP.IP.eq(ip))
|
||||
.fetchOneInto(STAFFOG_STAFFIP);
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
error.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (record == null) {
|
||||
|
||||
public void createIpEntry(StaffIPInfo info) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
return null;
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
dsl.insertInto(STAFFOG_STAFFIP)
|
||||
.set(STAFFOG_STAFFIP.IP, info.getIp())
|
||||
.set(STAFFOG_STAFFIP.UUID, info.getUuid().toString())
|
||||
.set(STAFFOG_STAFFIP.INITIAL, info.isInitial())
|
||||
.set(STAFFOG_STAFFIP.PANEL_ACKNOWLEDGED, info.isPanelAcknowledged())
|
||||
.set(STAFFOG_STAFFIP.PANEL_VERIFIED, info.isPanelVerified())
|
||||
.set(STAFFOG_STAFFIP.GAME_VERIFIED, info.isGameVerified())
|
||||
.execute();
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
Console.error("Failed to create ip entry.");
|
||||
error.printStackTrace();
|
||||
}
|
||||
}
|
||||
return new StaffIPInfo(record.getId(), UUID.fromString(record.getUuid()), record.getIp(),
|
||||
record.getInitial(), record.getPanelAcknowledged(), record.getPanelVerified(),
|
||||
record.getGameVerified());
|
||||
|
||||
public void updateIpEntry(StaffIPInfo info) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
} catch (Exception error) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
dsl.update(STAFFOG_STAFFIP)
|
||||
.set(STAFFOG_STAFFIP.IP, info.getIp())
|
||||
.set(STAFFOG_STAFFIP.UUID, info.getUuid().toString())
|
||||
.set(STAFFOG_STAFFIP.INITIAL, info.isInitial())
|
||||
.set(STAFFOG_STAFFIP.PANEL_ACKNOWLEDGED, info.isPanelAcknowledged())
|
||||
.set(STAFFOG_STAFFIP.PANEL_VERIFIED, info.isPanelVerified())
|
||||
.set(STAFFOG_STAFFIP.GAME_VERIFIED, info.isGameVerified())
|
||||
.where(STAFFOG_STAFFIP.ID.eq(info.getId()))
|
||||
.execute();
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
Console.error("Failed to update ip entry.");
|
||||
error.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean doesLinkCodeExist(String code) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
}
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
return dsl.fetchExists(dsl.selectFrom(STAFFOG_LINKCODE)
|
||||
.where(STAFFOG_LINKCODE.CODE.eq(code)));
|
||||
public boolean isUserAccountCreated(UUID id, String ip) {
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
error.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
public String doesPlayerHaveLinkCode(UUID uuid) {
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
StaffogStaffipRecord record = dsl.select(STAFFOG_STAFFIP.asterisk()).from(STAFFOG_STAFFIP)
|
||||
.where(STAFFOG_STAFFIP.UUID.eq(id.toString())).and(STAFFOG_STAFFIP.IP.eq(ip))
|
||||
.fetchOneInto(STAFFOG_STAFFIP);
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
StaffogLinkcodeRecord record = dsl.select(STAFFOG_LINKCODE.asterisk())
|
||||
.from(STAFFOG_LINKCODE)
|
||||
.where(STAFFOG_LINKCODE.UUID.eq(uuid.toString()))
|
||||
.fetchOneInto(STAFFOG_LINKCODE);
|
||||
if (record == null) {
|
||||
|
||||
if (record == null) {
|
||||
return false;
|
||||
|
||||
return null;
|
||||
} else {
|
||||
|
||||
}
|
||||
return record.getPanelVerified();
|
||||
|
||||
return record.getCode();
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
public String createLinkCode(UUID uuid, boolean admin) {
|
||||
e.printStackTrace();
|
||||
|
||||
String code = "";
|
||||
String possibleChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
+ "0123456789"
|
||||
+ "abcdefghijklmnopqrstuvxyz";
|
||||
return false;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (code.equals("")) {
|
||||
}
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
}
|
||||
|
||||
int index = (int)(possibleChars.length() * Math.random());
|
||||
public boolean hasUUIDGotIp(UUID uuid) {
|
||||
|
||||
// add Character one by one in end of sb
|
||||
sb.append(possibleChars.charAt(index));
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
}
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
return dsl.fetchExists(dsl.selectFrom(STAFFOG_STAFFIP).where(STAFFOG_STAFFIP.UUID.eq(uuid.toString())));
|
||||
|
||||
if (! doesLinkCodeExist(sb.toString())) {
|
||||
} catch (Exception error) {
|
||||
|
||||
code = sb.toString();
|
||||
error.printStackTrace();
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
public void createIpEntry(StaffIPInfo info) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
dsl.insertInto(STAFFOG_LINKCODE)
|
||||
.set(STAFFOG_LINKCODE.UUID, uuid.toString())
|
||||
.set(STAFFOG_LINKCODE.CODE, code)
|
||||
.set(STAFFOG_LINKCODE.ADMIN, admin)
|
||||
.execute();
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
Console.error("Failed to create link code.");
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
dsl.insertInto(STAFFOG_STAFFIP).set(STAFFOG_STAFFIP.IP, info.getIp())
|
||||
.set(STAFFOG_STAFFIP.UUID, info.getUuid().toString()).set(STAFFOG_STAFFIP.INITIAL, info.isInitial())
|
||||
.set(STAFFOG_STAFFIP.PANEL_ACKNOWLEDGED, info.isPanelAcknowledged())
|
||||
.set(STAFFOG_STAFFIP.PANEL_VERIFIED, info.isPanelVerified())
|
||||
.set(STAFFOG_STAFFIP.GAME_VERIFIED, info.isGameVerified()).execute();
|
||||
|
||||
return code;
|
||||
} catch (Exception error) {
|
||||
|
||||
}
|
||||
Console.error("Failed to create ip entry.");
|
||||
error.printStackTrace();
|
||||
|
||||
public void checkAndDeactivateStaffAccount(UUID uuid) {
|
||||
}
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
}
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
public void updateIpEntry(StaffIPInfo info) {
|
||||
|
||||
StaffogWebRecord record = dsl.select(STAFFOG_WEB.asterisk())
|
||||
.from(STAFFOG_WEB)
|
||||
.where(STAFFOG_WEB.UUID.eq(uuid.toString()))
|
||||
.fetchOneInto(STAFFOG_WEB);
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
if (record == null)
|
||||
return;
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
dsl.update(STAFFOG_STAFFIP).set(STAFFOG_STAFFIP.IP, info.getIp())
|
||||
.set(STAFFOG_STAFFIP.UUID, info.getUuid().toString()).set(STAFFOG_STAFFIP.INITIAL, info.isInitial())
|
||||
.set(STAFFOG_STAFFIP.PANEL_ACKNOWLEDGED, info.isPanelAcknowledged())
|
||||
.set(STAFFOG_STAFFIP.PANEL_VERIFIED, info.isPanelVerified())
|
||||
.set(STAFFOG_STAFFIP.GAME_VERIFIED, info.isGameVerified())
|
||||
.where(STAFFOG_STAFFIP.ID.eq(info.getId())).execute();
|
||||
|
||||
dsl.update(STAFFOG_WEB)
|
||||
.set(STAFFOG_WEB.ACTIVE, false)
|
||||
.where(STAFFOG_WEB.UUID.eq(uuid.toString()))
|
||||
.execute();
|
||||
} catch (Exception error) {
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
Console.error("Failed to update ip entry.");
|
||||
error.printStackTrace();
|
||||
|
||||
error.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private boolean doesLinkCodeExist(String code) {
|
||||
|
||||
}
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
return dsl.fetchExists(dsl.selectFrom(STAFFOG_LINKCODE).where(STAFFOG_LINKCODE.CODE.eq(code)));
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
error.printStackTrace();
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String doesPlayerHaveLinkCode(UUID uuid) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
StaffogLinkcodeRecord record = dsl.select(STAFFOG_LINKCODE.asterisk()).from(STAFFOG_LINKCODE)
|
||||
.where(STAFFOG_LINKCODE.UUID.eq(uuid.toString())).fetchOneInto(STAFFOG_LINKCODE);
|
||||
|
||||
if (record == null) {
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
return record.getCode();
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String createLinkCode(UUID uuid, boolean admin) {
|
||||
|
||||
String code = "";
|
||||
String possibleChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789" + "abcdefghijklmnopqrstuvxyz";
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (code.equals("")) {
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
||||
int index = (int) (possibleChars.length() * Math.random());
|
||||
|
||||
// add Character one by one in end of sb
|
||||
sb.append(possibleChars.charAt(index));
|
||||
|
||||
}
|
||||
|
||||
if (!doesLinkCodeExist(sb.toString())) {
|
||||
|
||||
code = sb.toString();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
dsl.insertInto(STAFFOG_LINKCODE).set(STAFFOG_LINKCODE.UUID, uuid.toString())
|
||||
.set(STAFFOG_LINKCODE.CODE, code).set(STAFFOG_LINKCODE.ADMIN, admin).execute();
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
Console.error("Failed to create link code.");
|
||||
error.printStackTrace();
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
return code;
|
||||
|
||||
}
|
||||
|
||||
public void checkAndDeactivateStaffAccount(UUID uuid) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
|
||||
StaffogWebRecord record = dsl.select(STAFFOG_WEB.asterisk()).from(STAFFOG_WEB)
|
||||
.where(STAFFOG_WEB.UUID.eq(uuid.toString())).fetchOneInto(STAFFOG_WEB);
|
||||
|
||||
if (record == null)
|
||||
return;
|
||||
|
||||
dsl.update(STAFFOG_WEB).set(STAFFOG_WEB.ACTIVE, false).where(STAFFOG_WEB.UUID.eq(uuid.toString()))
|
||||
.execute();
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
error.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,41 +1,59 @@
|
||||
package uk.hotten.staffog.security.data;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
public class StaffIPInfo {
|
||||
|
||||
@Getter private int id;
|
||||
@Getter private UUID uuid;
|
||||
@Getter private String ip;
|
||||
@Getter @Setter private boolean initial;
|
||||
@Getter @Setter private boolean panelAcknowledged;
|
||||
@Getter @Setter private boolean panelVerified;
|
||||
@Getter @Setter private boolean gameVerified;
|
||||
@Getter
|
||||
private int id;
|
||||
|
||||
public StaffIPInfo(int id, UUID uuid, String ip, boolean initial, boolean panelAcknowledged, boolean panelVerified, boolean gameVerified) {
|
||||
@Getter
|
||||
private UUID uuid;
|
||||
|
||||
this.id = id;
|
||||
this.uuid = uuid;
|
||||
this.ip = ip;
|
||||
this.initial = initial;
|
||||
this.panelAcknowledged = panelAcknowledged;
|
||||
this.panelVerified = panelVerified;
|
||||
this.gameVerified = gameVerified;
|
||||
@Getter
|
||||
private String ip;
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean initial;
|
||||
|
||||
public StaffIPInfo(int id, UUID uuid, String ip) {
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean panelAcknowledged;
|
||||
|
||||
this.id = id;
|
||||
this.uuid = uuid;
|
||||
this.ip = ip;
|
||||
this.initial = false;
|
||||
this.panelVerified = false;
|
||||
this.gameVerified = false;
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean panelVerified;
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean gameVerified;
|
||||
|
||||
public StaffIPInfo(int id, UUID uuid, String ip, boolean initial, boolean panelAcknowledged, boolean panelVerified,
|
||||
boolean gameVerified)
|
||||
{
|
||||
|
||||
this.id = id;
|
||||
this.uuid = uuid;
|
||||
this.ip = ip;
|
||||
this.initial = initial;
|
||||
this.panelAcknowledged = panelAcknowledged;
|
||||
this.panelVerified = panelVerified;
|
||||
this.gameVerified = gameVerified;
|
||||
|
||||
}
|
||||
|
||||
public StaffIPInfo(int id, UUID uuid, String ip) {
|
||||
|
||||
this.id = id;
|
||||
this.uuid = uuid;
|
||||
this.ip = ip;
|
||||
this.initial = false;
|
||||
this.panelVerified = false;
|
||||
this.gameVerified = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package uk.hotten.staffog.tasks;
|
||||
import java.sql.Connection;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jooq.DSLContext;
|
||||
import org.jooq.Result;
|
||||
@@ -11,6 +12,7 @@ import org.jooq.impl.DSL;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import lombok.Getter;
|
||||
import uk.hotten.staffog.StaffOGPlugin;
|
||||
import uk.hotten.staffog.data.DatabaseManager;
|
||||
import uk.hotten.staffog.data.jooq.Tables;
|
||||
import uk.hotten.staffog.data.jooq.tables.records.StaffogTaskRecord;
|
||||
@@ -20,131 +22,142 @@ import uk.hotten.staffog.tasks.data.NewAppealTask;
|
||||
import uk.hotten.staffog.tasks.data.NewReportTask;
|
||||
import uk.hotten.staffog.tasks.data.TaskEntry;
|
||||
import uk.hotten.staffog.tasks.data.UnpunishTask;
|
||||
import uk.hotten.staffog.utils.Message;
|
||||
|
||||
public class TaskManager {
|
||||
|
||||
@Getter private JavaPlugin plugin;
|
||||
@Getter
|
||||
private final JavaPlugin plugin;
|
||||
|
||||
public TaskManager(JavaPlugin plugin) {
|
||||
public TaskManager(JavaPlugin plugin) {
|
||||
|
||||
this.plugin = plugin;
|
||||
this.plugin = plugin;
|
||||
|
||||
plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, () -> {
|
||||
for (TaskEntry entry : checkForTasks()) {
|
||||
switch (entry.getTask()) {
|
||||
case "unpunish": {
|
||||
processUnpunish(entry);
|
||||
deleteTask(entry.getId());
|
||||
break;
|
||||
}
|
||||
case "newreport": {
|
||||
processNewReport(entry);
|
||||
deleteTask(entry.getId());
|
||||
}
|
||||
case "newappeal": {
|
||||
processNewAppeal(entry);
|
||||
deleteTask(entry.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 0, 200);
|
||||
plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, () -> {
|
||||
|
||||
}
|
||||
for (TaskEntry entry : checkForTasks()) {
|
||||
|
||||
private ArrayList<TaskEntry> checkForTasks() {
|
||||
switch (entry.getTask()) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
case "unpunish": {
|
||||
|
||||
ArrayList<TaskEntry> toReturn = new ArrayList<>();
|
||||
processUnpunish(entry);
|
||||
deleteTask(entry.getId());
|
||||
break;
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
Result<StaffogTaskRecord> result = dsl.select(Tables.STAFFOG_TASK.asterisk())
|
||||
.from(Tables.STAFFOG_TASK)
|
||||
.fetchInto(Tables.STAFFOG_TASK);
|
||||
}
|
||||
case "newreport": {
|
||||
|
||||
for (StaffogTaskRecord record : result) {
|
||||
TaskEntry entry = new TaskEntry();
|
||||
entry.setId(record.getId());
|
||||
entry.setTask(record.getTask());
|
||||
entry.setData(record.getData());
|
||||
toReturn.add(entry);
|
||||
}
|
||||
processNewReport(entry);
|
||||
deleteTask(entry.getId());
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
case "newappeal": {
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
processNewAppeal(entry);
|
||||
deleteTask(entry.getId());
|
||||
|
||||
error.printStackTrace();
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void processUnpunish(TaskEntry entry) {
|
||||
}, 0, 200);
|
||||
|
||||
if (! entry.getTask().equals("unpunish")) {
|
||||
}
|
||||
|
||||
return;
|
||||
private ArrayList<TaskEntry> checkForTasks() {
|
||||
|
||||
}
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
Gson gson = new Gson();
|
||||
UnpunishTask task = gson.fromJson(entry.getData(), UnpunishTask.class);
|
||||
PunishEntry punishEntry = PunishManager.getInstance().getPunishment(task.getType(), task.getId());
|
||||
final ArrayList<TaskEntry> toReturn = new ArrayList<>();
|
||||
|
||||
PunishManager.getInstance().visualRemovePunishment(punishEntry);
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
final Result<StaffogTaskRecord> result = dsl.select(Tables.STAFFOG_TASK.asterisk())
|
||||
.from(Tables.STAFFOG_TASK).fetchInto(Tables.STAFFOG_TASK);
|
||||
|
||||
}
|
||||
result.forEach(record -> {
|
||||
|
||||
private void processNewReport(TaskEntry entry) {
|
||||
final TaskEntry entry = new TaskEntry();
|
||||
entry.setId(record.getId());
|
||||
entry.setTask(record.getTask());
|
||||
entry.setData(record.getData());
|
||||
toReturn.add(entry);
|
||||
|
||||
if (! entry.getTask().equals("newreport")) {
|
||||
});
|
||||
|
||||
return;
|
||||
return toReturn;
|
||||
|
||||
}
|
||||
} catch (Exception error) {
|
||||
|
||||
Gson gson = new Gson();
|
||||
NewReportTask task = gson.fromJson(entry.getData(), NewReportTask.class);
|
||||
error.printStackTrace();
|
||||
return new ArrayList<>();
|
||||
|
||||
Message.staffBroadcast(Message.formatNotification("REPORT", "New " + task.getType() + " report #" + task.getId() + " by " + task.getBy() + " against " + task.getOffender()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void processNewAppeal(TaskEntry entry) {
|
||||
private void processUnpunish(TaskEntry entry) {
|
||||
|
||||
if (! entry.getTask().equals("newappeal")) {
|
||||
if (!"unpunish".equals(entry.getTask())) {
|
||||
|
||||
return;
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Gson gson = new Gson();
|
||||
NewAppealTask task = gson.fromJson(entry.getData(), NewAppealTask.class);
|
||||
final Gson gson = new Gson();
|
||||
final UnpunishTask task = gson.fromJson(entry.getData(), UnpunishTask.class);
|
||||
final PunishEntry punishEntry = PunishManager.getInstance().getPunishment(task.getType(), task.getId());
|
||||
|
||||
Message.staffBroadcast(Message.formatNotification("APPEAL", "New " + task.getType().toLowerCase() + " appeal #" + task.getId() + " by " + task.getBy()));
|
||||
PunishManager.getInstance().visualRemovePunishment(punishEntry);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteTask(int id) {
|
||||
private void processNewReport(TaskEntry entry) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
if (!"newreport".equals(entry.getTask())) {
|
||||
|
||||
DSLContext dsl = DSL.using(connection);
|
||||
dsl.delete(Tables.STAFFOG_TASK)
|
||||
.where(Tables.STAFFOG_TASK.ID.eq(id))
|
||||
.execute();
|
||||
return;
|
||||
|
||||
}
|
||||
catch (Exception error) {
|
||||
}
|
||||
|
||||
error.printStackTrace();
|
||||
final Gson gson = new Gson();
|
||||
final NewReportTask task = gson.fromJson(entry.getData(), NewReportTask.class);
|
||||
|
||||
}
|
||||
StaffOGPlugin.staffBroadcast(StaffOGPlugin.formatNotification("REPORT", "New " + task.getType() + " report #"
|
||||
+ task.getId() + " by " + task.getBy() + " against " + task.getOffender()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void processNewAppeal(TaskEntry entry) {
|
||||
|
||||
if (!"newappeal".equals(entry.getTask())) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
final Gson gson = new Gson();
|
||||
final NewAppealTask task = gson.fromJson(entry.getData(), NewAppealTask.class);
|
||||
|
||||
StaffOGPlugin.staffBroadcast(StaffOGPlugin.formatNotification("APPEAL",
|
||||
"New " + StringUtils.lowerCase(task.getType()) + " appeal #" + task.getId() + " by " + task.getBy()));
|
||||
|
||||
}
|
||||
|
||||
private void deleteTask(int id) {
|
||||
|
||||
try (Connection connection = DatabaseManager.getInstance().createConnection()) {
|
||||
|
||||
final DSLContext dsl = DSL.using(connection);
|
||||
dsl.delete(Tables.STAFFOG_TASK).where(Tables.STAFFOG_TASK.ID.eq(id)).execute();
|
||||
|
||||
} catch (Exception error) {
|
||||
|
||||
error.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,8 +5,16 @@ import lombok.Setter;
|
||||
|
||||
public class NewAppealTask {
|
||||
|
||||
@Getter @Setter private int id;
|
||||
@Getter @Setter private String by;
|
||||
@Getter @Setter private String type;
|
||||
@Getter
|
||||
@Setter
|
||||
private int id;
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
private String by;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -5,9 +5,20 @@ import lombok.Setter;
|
||||
|
||||
public class NewReportTask {
|
||||
|
||||
@Getter @Setter private int id;
|
||||
@Getter @Setter private String offender;
|
||||
@Getter @Setter private String by;
|
||||
@Getter @Setter private String type;
|
||||
@Getter
|
||||
@Setter
|
||||
private int id;
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
private String offender;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private String by;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -5,8 +5,16 @@ import lombok.Setter;
|
||||
|
||||
public class TaskEntry {
|
||||
|
||||
@Getter @Setter private int id;
|
||||
@Getter @Setter private String task;
|
||||
@Getter @Setter private String data;
|
||||
@Getter
|
||||
@Setter
|
||||
private int id;
|
||||
|
||||
}
|
||||
@Getter
|
||||
@Setter
|
||||
private String task;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private String data;
|
||||
|
||||
}
|
||||
@@ -5,15 +5,20 @@ import uk.hotten.staffog.punish.data.PunishType;
|
||||
|
||||
public class UnpunishTask {
|
||||
|
||||
@Getter private PunishType type;
|
||||
@Getter private int id;
|
||||
@Getter private String name;
|
||||
@Getter
|
||||
private PunishType type;
|
||||
|
||||
public UnpunishTask(String type, int id) {
|
||||
@Getter
|
||||
private int id;
|
||||
|
||||
this.type = PunishType.valueOf(type);
|
||||
this.id = id;
|
||||
@Getter
|
||||
private String name;
|
||||
|
||||
}
|
||||
public UnpunishTask(String type, int id) {
|
||||
|
||||
}
|
||||
this.type = PunishType.valueOf(type);
|
||||
this.id = id;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,22 +4,22 @@ import org.bukkit.Bukkit;
|
||||
|
||||
public class Console {
|
||||
|
||||
public static void info(String message) {
|
||||
public static void info(String message) {
|
||||
|
||||
Bukkit.getServer().getConsoleSender().sendMessage("[Staff-OG] " + message);
|
||||
Bukkit.getServer().getConsoleSender().sendMessage("[Staff-OG] " + message);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void warn(String message) {
|
||||
public static void warn(String message) {
|
||||
|
||||
Bukkit.getServer().getConsoleSender().sendMessage("[Staff-OG: WARNING] " + message);
|
||||
Bukkit.getServer().getConsoleSender().sendMessage("[Staff-OG: WARNING] " + message);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void error(String message) {
|
||||
public static void error(String message) {
|
||||
|
||||
Bukkit.getServer().getConsoleSender().sendMessage("[Staff-OG: ERROR] " + message);
|
||||
Bukkit.getServer().getConsoleSender().sendMessage("[Staff-OG: ERROR] " + message);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package uk.hotten.staffog.utils;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
|
||||
public class Message {
|
||||
|
||||
public static String format(String message) {
|
||||
|
||||
return "" + "&7" + "[" + "&e" + "Staff-OG" + "&7" + "] " + "&r" + message;
|
||||
|
||||
}
|
||||
|
||||
public static String formatNotification(String prefix, String message) {
|
||||
|
||||
return "" + "&c" + prefix.toUpperCase() + " | " + "&B" + "Notification " + "&8" + "> " + "&r" + message;
|
||||
|
||||
}
|
||||
|
||||
public static void staffBroadcast(String message) {
|
||||
|
||||
Bukkit.getServer().getOnlinePlayers().forEach(p -> {
|
||||
|
||||
if (p.hasPermission("staffog.seebroadcast")) staffOGMessage(p, message);
|
||||
|
||||
});
|
||||
|
||||
staffOGMessage(Bukkit.getServer().getConsoleSender(), message);
|
||||
|
||||
}
|
||||
|
||||
// Sends a formatted message to the player (including name replacement).
|
||||
public static void staffOGMessage(CommandSender p, String message) {
|
||||
|
||||
p.sendMessage(legacySerializerAnyCase(format(message)));
|
||||
|
||||
}
|
||||
|
||||
public static TextComponent legacySerializerAnyCase(String subject) {
|
||||
|
||||
int count = 0;
|
||||
// Count the number of '&' characters to determine the size of the array
|
||||
for (char c : subject.toCharArray()) {
|
||||
|
||||
if (c == '&') {
|
||||
|
||||
count++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Create an array to store the positions of '&' characters
|
||||
int[] positions = new int[count];
|
||||
int index = 0;
|
||||
// Find the positions of '&' characters and store in the array
|
||||
for (int i = 0; i < subject.length(); i++) {
|
||||
|
||||
if (subject.charAt(i) == '&') {
|
||||
|
||||
if (isUpperBukkitCode(subject.charAt(i + 1))) {
|
||||
|
||||
subject = replaceCharAtIndex(subject, (i + 1), Character.toLowerCase(subject.charAt(i + 1)));
|
||||
|
||||
}
|
||||
|
||||
positions[index++] = i;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return LegacyComponentSerializer.legacyAmpersand().deserialize(subject);
|
||||
|
||||
}
|
||||
|
||||
private static boolean isUpperBukkitCode(char input) {
|
||||
|
||||
char[] bukkitColorCodes = {'A', 'B', 'C', 'D', 'E', 'F', 'K', 'L', 'M', 'N', 'O', 'R'};
|
||||
boolean match = false;
|
||||
|
||||
// Loop through each character in the array.
|
||||
for (char c : bukkitColorCodes) {
|
||||
// Check if the current character in the array is equal to the input character.
|
||||
if (c == input) {
|
||||
|
||||
match = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return match;
|
||||
|
||||
}
|
||||
|
||||
private static String replaceCharAtIndex(String original, int index, char newChar) {
|
||||
|
||||
// Check if the index is valid
|
||||
if (index >= 0 && index < original.length()) {
|
||||
|
||||
// Create a new string with the replaced character
|
||||
return original.substring(0, index) + newChar + original.substring(index + 1);
|
||||
|
||||
}
|
||||
|
||||
// If the index is invalid, return the original string
|
||||
return original;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,49 +12,55 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class TimeUtils {
|
||||
|
||||
public static DateFormat notificationTimeFormat = new SimpleDateFormat("dd-MM-yy");
|
||||
public static DateFormat notificationTimeFormat = new SimpleDateFormat("dd-MM-yy");
|
||||
|
||||
public static String formatMillisecondTime(long millis) {
|
||||
if (millis == -1)
|
||||
return "permanent";
|
||||
public static String formatMillisecondTime(long millis) {
|
||||
|
||||
//create the list
|
||||
List<TimeUnit> units = new ArrayList<TimeUnit>(EnumSet.allOf(TimeUnit.class));
|
||||
Collections.reverse(units);
|
||||
units.remove(TimeUnit.MILLISECONDS);
|
||||
units.remove(TimeUnit.MICROSECONDS);
|
||||
units.remove(TimeUnit.NANOSECONDS);
|
||||
if (millis == -1)
|
||||
return "permanent";
|
||||
|
||||
//create the result map of TimeUnit and difference
|
||||
Map<TimeUnit,Long> result = new LinkedHashMap<TimeUnit,Long>();
|
||||
long milliesRest = millis;
|
||||
StringBuilder toReturn = new StringBuilder();
|
||||
// create the list
|
||||
List<TimeUnit> units = new ArrayList<TimeUnit>(EnumSet.allOf(TimeUnit.class));
|
||||
Collections.reverse(units);
|
||||
units.remove(TimeUnit.MILLISECONDS);
|
||||
units.remove(TimeUnit.MICROSECONDS);
|
||||
units.remove(TimeUnit.NANOSECONDS);
|
||||
|
||||
for (TimeUnit unit : units) {
|
||||
// create the result map of TimeUnit and difference
|
||||
Map<TimeUnit, Long> result = new LinkedHashMap<TimeUnit, Long>();
|
||||
long milliesRest = millis;
|
||||
StringBuilder toReturn = new StringBuilder();
|
||||
|
||||
//calculate difference in millisecond
|
||||
long diff = unit.convert(milliesRest,TimeUnit.MILLISECONDS);
|
||||
long diffInMilliesForUnit = unit.toMillis(diff);
|
||||
milliesRest = milliesRest - diffInMilliesForUnit;
|
||||
for (TimeUnit unit : units) {
|
||||
|
||||
//put the result in the map
|
||||
result.put(unit, diff);
|
||||
}
|
||||
// calculate difference in millisecond
|
||||
long diff = unit.convert(milliesRest, TimeUnit.MILLISECONDS);
|
||||
long diffInMilliesForUnit = unit.toMillis(diff);
|
||||
milliesRest = milliesRest - diffInMilliesForUnit;
|
||||
|
||||
// put the result in the map
|
||||
result.put(unit, diff);
|
||||
|
||||
if (millis > 86400000) {
|
||||
result.remove(TimeUnit.MINUTES);
|
||||
result.remove(TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
for (Map.Entry<TimeUnit, Long> entry : result.entrySet()) {
|
||||
if (entry.getValue() == 0)
|
||||
continue;
|
||||
if (millis > 86400000) {
|
||||
|
||||
toReturn.append(entry.getValue()).append(" ").append(entry.getKey().name().toLowerCase()).append(" ");
|
||||
}
|
||||
result.remove(TimeUnit.MINUTES);
|
||||
result.remove(TimeUnit.SECONDS);
|
||||
|
||||
return toReturn.toString().trim();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
for (Map.Entry<TimeUnit, Long> entry : result.entrySet()) {
|
||||
|
||||
if (entry.getValue() == 0)
|
||||
continue;
|
||||
|
||||
toReturn.append(entry.getValue()).append(" ").append(entry.getKey().name().toLowerCase()).append(" ");
|
||||
|
||||
}
|
||||
|
||||
return toReturn.toString().trim();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@ appealWebAddress: "https://appeal.trueog.net"
|
||||
|
||||
sqlType: mariadb # Options: mariadb or mysql
|
||||
sqlHost: localhost
|
||||
sqlUsername: username
|
||||
sqlPassword: password
|
||||
sqlUsername: $MARIADB_USER
|
||||
sqlPassword: $MARIADB_PASSWORD
|
||||
sqlDatabase: staffog
|
||||
sqlPort: 3306
|
||||
sqlPort: 3306
|
||||
@@ -1,10 +1,10 @@
|
||||
name: Staff-OG
|
||||
main: uk.hotten.staffog.StaffOGPlugin
|
||||
version: 1.0-beta
|
||||
version: 1.0
|
||||
api-version: 1.19
|
||||
author: Gxorge
|
||||
description: Punishment system for TrueOG.
|
||||
depend: [Vault]
|
||||
depend: [LuckPerms]
|
||||
|
||||
commands:
|
||||
linkpanel:
|
||||
|
||||
Reference in new issue
Block a user