From a5ce73138fec38772c216c74ac08d7ff55b131f8 Mon Sep 17 00:00:00 2001 From: "Edward M. Kagan" Date: Thu, 18 Nov 2021 19:00:29 +0300 Subject: [PATCH] Drop 101 - initial projet setup tests for Jooq & Speedment. --- docker/run-postgres-14-alpine.sh | 10 + docker/run-postgres-14.sh | 10 + modules/main-jooq/pom.xml | 77 ++++ .../main/java/twopm/tech/ormbench/Bench.java | 36 ++ .../tech/ormbench/jooq/DefaultCatalog.java | 45 ++ .../java/twopm/tech/ormbench/jooq/Keys.java | 42 ++ .../java/twopm/tech/ormbench/jooq/Public.java | 68 +++ .../java/twopm/tech/ormbench/jooq/Tables.java | 32 ++ .../tech/ormbench/jooq/tables/Account.java | 157 +++++++ .../ormbench/jooq/tables/AccountInfo.java | 186 ++++++++ .../ormbench/jooq/tables/AccountInfoType.java | 162 +++++++ .../tables/records/AccountInfoRecord.java | 332 ++++++++++++++ .../tables/records/AccountInfoTypeRecord.java | 294 ++++++++++++ .../jooq/tables/records/AccountRecord.java | 295 ++++++++++++ modules/main-speedment/pom.xml | 81 ++++ .../src/main/java/module-info.java | 8 + .../main/java/twopm/tech/ormbench/Bench.java | 30 ++ .../.speedment/.BenchApplication.java.md5 | 1 + .../.BenchApplicationBuilder.java.md5 | 1 + .../.speedment/.BenchApplicationImpl.java.md5 | 1 + .../.speedment/.BenchInjectorProxy.java.md5 | 1 + .../ormbench/speedment/BenchApplication.java | 13 + .../speedment/BenchApplicationBuilder.java | 14 + .../speedment/BenchApplicationImpl.java | 15 + .../speedment/BenchInjectorProxy.java | 49 ++ .../account/.speedment/.Account.java.md5 | 1 + .../account/.speedment/.AccountImpl.java.md5 | 1 + .../.speedment/.AccountManager.java.md5 | 1 + .../.speedment/.AccountManagerImpl.java.md5 | 1 + .../.speedment/.AccountSqlAdapter.java.md5 | 1 + .../alloc_test/public_/account/Account.java | 12 + .../public_/account/AccountImpl.java | 15 + .../public_/account/AccountManager.java | 13 + .../public_/account/AccountManagerImpl.java | 15 + .../public_/account/AccountSqlAdapter.java | 13 + .../.speedment/.GeneratedAccount.java.md5 | 1 + .../.speedment/.GeneratedAccountImpl.java.md5 | 1 + .../.GeneratedAccountManager.java.md5 | 1 + .../.GeneratedAccountManagerImpl.java.md5 | 1 + .../.GeneratedAccountSqlAdapter.java.md5 | 1 + .../account/generated/GeneratedAccount.java | 242 ++++++++++ .../generated/GeneratedAccountImpl.java | 137 ++++++ .../generated/GeneratedAccountManager.java | 40 ++ .../GeneratedAccountManagerImpl.java | 54 +++ .../generated/GeneratedAccountSqlAdapter.java | 63 +++ .../.speedment/.AccountInfo.java.md5 | 1 + .../.speedment/.AccountInfoImpl.java.md5 | 1 + .../.speedment/.AccountInfoManager.java.md5 | 1 + .../.AccountInfoManagerImpl.java.md5 | 1 + .../.AccountInfoSqlAdapter.java.md5 | 1 + .../public_/account_info/AccountInfo.java | 13 + .../public_/account_info/AccountInfoImpl.java | 15 + .../account_info/AccountInfoManager.java | 14 + .../account_info/AccountInfoManagerImpl.java | 16 + .../account_info/AccountInfoSqlAdapter.java | 14 + .../.speedment/.GeneratedAccountInfo.java.md5 | 1 + .../.GeneratedAccountInfoImpl.java.md5 | 1 + .../.GeneratedAccountInfoManager.java.md5 | 1 + .../.GeneratedAccountInfoManagerImpl.java.md5 | 1 + .../.GeneratedAccountInfoSqlAdapter.java.md5 | 1 + .../generated/GeneratedAccountInfo.java | 303 +++++++++++++ .../generated/GeneratedAccountInfoImpl.java | 165 +++++++ .../GeneratedAccountInfoManager.java | 42 ++ .../GeneratedAccountInfoManagerImpl.java | 55 +++ .../GeneratedAccountInfoSqlAdapter.java | 65 +++ .../.speedment/.AccountInfoType.java.md5 | 1 + .../.speedment/.AccountInfoTypeImpl.java.md5 | 1 + .../.AccountInfoTypeManager.java.md5 | 1 + .../.AccountInfoTypeManagerImpl.java.md5 | 1 + .../.AccountInfoTypeSqlAdapter.java.md5 | 1 + .../account_info_type/AccountInfoType.java | 13 + .../AccountInfoTypeImpl.java | 15 + .../AccountInfoTypeManager.java | 14 + .../AccountInfoTypeManagerImpl.java | 16 + .../AccountInfoTypeSqlAdapter.java | 14 + .../.GeneratedAccountInfoType.java.md5 | 1 + .../.GeneratedAccountInfoTypeImpl.java.md5 | 1 + .../.GeneratedAccountInfoTypeManager.java.md5 | 1 + ...neratedAccountInfoTypeManagerImpl.java.md5 | 1 + ...eneratedAccountInfoTypeSqlAdapter.java.md5 | 1 + .../generated/GeneratedAccountInfoType.java | 250 +++++++++++ .../GeneratedAccountInfoTypeImpl.java | 137 ++++++ .../GeneratedAccountInfoTypeManager.java | 41 ++ .../GeneratedAccountInfoTypeManagerImpl.java | 55 +++ .../GeneratedAccountInfoTypeSqlAdapter.java | 64 +++ .../.GeneratedBenchApplication.java.md5 | 1 + ....GeneratedBenchApplicationBuilder.java.md5 | 1 + .../.GeneratedBenchApplicationImpl.java.md5 | 1 + .../.GeneratedBenchMetadata.java.md5 | 1 + .../generated/GeneratedBenchApplication.java | 17 + .../GeneratedBenchApplicationBuilder.java | 47 ++ .../GeneratedBenchApplicationImpl.java | 19 + .../generated/GeneratedBenchMetadata.java | 423 ++++++++++++++++++ .../src/main/json/speedment.json | 366 +++++++++++++++ pom.xml | 3 + readme.md | 51 ++- sql/00-setup.sql | 38 ++ 97 files changed, 4865 insertions(+), 18 deletions(-) create mode 100755 docker/run-postgres-14-alpine.sh create mode 100755 docker/run-postgres-14.sh create mode 100644 modules/main-jooq/pom.xml create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/Bench.java create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/DefaultCatalog.java create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Keys.java create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Public.java create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Tables.java create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/Account.java create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/AccountInfo.java create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/AccountInfoType.java create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountInfoRecord.java create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountInfoTypeRecord.java create mode 100644 modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountRecord.java create mode 100644 modules/main-speedment/pom.xml create mode 100644 modules/main-speedment/src/main/java/module-info.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/Bench.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplication.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplicationBuilder.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplicationImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchInjectorProxy.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplication.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplicationBuilder.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplicationImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchInjectorProxy.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.Account.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountManager.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountManagerImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountSqlAdapter.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/Account.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountManager.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountManagerImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountSqlAdapter.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccount.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountManager.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountManagerImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountSqlAdapter.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccount.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountManager.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountManagerImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountSqlAdapter.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfo.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoManager.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoManagerImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoSqlAdapter.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfo.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoManager.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoManagerImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoSqlAdapter.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfo.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoManager.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoManagerImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoSqlAdapter.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfo.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoManager.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoManagerImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoSqlAdapter.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoType.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeManager.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeManagerImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeSqlAdapter.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoType.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeManager.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeManagerImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeSqlAdapter.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoType.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeManager.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeManagerImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeSqlAdapter.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoType.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeManager.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeManagerImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeSqlAdapter.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplication.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplicationBuilder.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplicationImpl.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchMetadata.java.md5 create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplication.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplicationBuilder.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplicationImpl.java create mode 100644 modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchMetadata.java create mode 100644 modules/main-speedment/src/main/json/speedment.json create mode 100644 sql/00-setup.sql diff --git a/docker/run-postgres-14-alpine.sh b/docker/run-postgres-14-alpine.sh new file mode 100755 index 0000000..5b011ed --- /dev/null +++ b/docker/run-postgres-14-alpine.sh @@ -0,0 +1,10 @@ +#!/bin/bash +docker run -it --rm \ + --name alloc-test-postgres \ + -e POSTGRES_PASSWORD=alloc-test \ + -e POSTGRES_USER=alloc-test \ + -e PGDATA=/var/lib/postgresql/data \ + -v /home/pagan/projects/digital/2pm.tech/java-orm-bench/docker/pgdata-14-alpine/:/var/lib/postgresql/data \ + -p 6543:5432 \ + postgres:14-alpine + diff --git a/docker/run-postgres-14.sh b/docker/run-postgres-14.sh new file mode 100755 index 0000000..0011943 --- /dev/null +++ b/docker/run-postgres-14.sh @@ -0,0 +1,10 @@ +#!/bin/bash +docker run -it --rm \ + --name alloc-test-postgres \ + -e POSTGRES_PASSWORD=alloc-test \ + -e POSTGRES_USER=alloc-test \ + -e PGDATA=/var/lib/postgresql/data \ + -v /home/pagan/projects/digital/2pm.tech/java-orm-bench/docker/pgdata-14/:/var/lib/postgresql/data \ + -p 6543:5432 \ + postgres:14 + diff --git a/modules/main-jooq/pom.xml b/modules/main-jooq/pom.xml new file mode 100644 index 0000000..c3def9d --- /dev/null +++ b/modules/main-jooq/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + + twopm.tech.orm-bench + bom + 1.0-SNAPSHOT + ../../pom.xml + + main-jooq + jar + + + org.jooq + jooq + 3.15.4 + + + org.jooq + jooq-meta + 3.15.4 + + + org.jooq + jooq-codegen + 3.15.4 + + + org.postgresql + postgresql + 42.3.1 + + + + + + org.jooq + jooq-codegen-maven + 3.15.4 + + + + generate + + + + + + org.postgresql + postgresql + 42.3.1 + + + + + org.postgresql.Driver + jdbc:postgresql://localhost:6543/alloc-test + alloc-test + alloc-test + + + + org.jooq.meta.postgres.PostgresDatabase + .* + + public + + + twopm.tech.ormbench.jooq + src/main/java + + + + + + + \ No newline at end of file diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/Bench.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/Bench.java new file mode 100644 index 0000000..b006f55 --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/Bench.java @@ -0,0 +1,36 @@ +package twopm.tech.ormbench; + +import static twopm.tech.ormbench.jooq.Tables.*; +import java.sql.*; +import java.util.Iterator; +import java.util.UUID; +import org.jooq.DSLContext; +import org.jooq.Record; +import org.jooq.Result; +import org.jooq.SQLDialect; +import org.jooq.impl.DSL; +import twopm.tech.ormbench.jooq.tables.records.AccountRecord; + +/** + * + * @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} + */ +public class Bench { + + public static void main(String[] args) throws SQLException { + String userName = "alloc-test"; + String password = "alloc-test"; + String url = "jdbc:postgresql://localhost:6543/alloc-test"; + try (Connection conn = DriverManager.getConnection(url, userName, password)) { + DSLContext dsl = DSL.using(conn, SQLDialect.POSTGRES); + Result result = dsl.select().from(ACCOUNT).fetch(); + for (Iterator it = result.iterator(); it.hasNext();) { + AccountRecord r = (AccountRecord) it.next(); + UUID id = r.getId(); + String salt = r.getValue(ACCOUNT.SALT); + String pass = r.getValue(ACCOUNT.HASH); + System.out.println("ID: " + id + " salt: " + salt + " pass: " + pass); + } + } + } +} diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/DefaultCatalog.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/DefaultCatalog.java new file mode 100644 index 0000000..56d0f63 --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/DefaultCatalog.java @@ -0,0 +1,45 @@ +/* + * This file is generated by jOOQ. + */ +package twopm.tech.ormbench.jooq; + + +import java.util.Arrays; +import java.util.List; + +import org.jooq.Schema; +import org.jooq.impl.CatalogImpl; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class DefaultCatalog extends CatalogImpl { + + private static final long serialVersionUID = 1L; + + /** + * The reference instance of DEFAULT_CATALOG + */ + public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog(); + + /** + * The schema public. + */ + public final Public PUBLIC = Public.PUBLIC; + + /** + * No further instances allowed + */ + private DefaultCatalog() { + super(""); + } + + @Override + public final List getSchemas() { + return Arrays.asList( + Public.PUBLIC + ); + } +} diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Keys.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Keys.java new file mode 100644 index 0000000..c0c74b9 --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Keys.java @@ -0,0 +1,42 @@ +/* + * This file is generated by jOOQ. + */ +package twopm.tech.ormbench.jooq; + + +import org.jooq.ForeignKey; +import org.jooq.TableField; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.Internal; + +import twopm.tech.ormbench.jooq.tables.Account; +import twopm.tech.ormbench.jooq.tables.AccountInfo; +import twopm.tech.ormbench.jooq.tables.AccountInfoType; +import twopm.tech.ormbench.jooq.tables.records.AccountInfoRecord; +import twopm.tech.ormbench.jooq.tables.records.AccountInfoTypeRecord; +import twopm.tech.ormbench.jooq.tables.records.AccountRecord; + + +/** + * A class modelling foreign key relationships and constraints of tables in + * public. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Keys { + + // ------------------------------------------------------------------------- + // UNIQUE and PRIMARY KEY definitions + // ------------------------------------------------------------------------- + + public static final UniqueKey ACCOUNT_PKEY = Internal.createUniqueKey(Account.ACCOUNT, DSL.name("account_pkey"), new TableField[] { Account.ACCOUNT.ID }, true); + public static final UniqueKey ACCOUNT_INFO_PKEY = Internal.createUniqueKey(AccountInfo.ACCOUNT_INFO, DSL.name("account_info_pkey"), new TableField[] { AccountInfo.ACCOUNT_INFO.ID }, true); + public static final UniqueKey ACCOUNT_INFO_TYPE_PKEY = Internal.createUniqueKey(AccountInfoType.ACCOUNT_INFO_TYPE, DSL.name("account_info_type_pkey"), new TableField[] { AccountInfoType.ACCOUNT_INFO_TYPE.ID }, true); + + // ------------------------------------------------------------------------- + // FOREIGN KEY definitions + // ------------------------------------------------------------------------- + + public static final ForeignKey ACCOUNT_INFO__FK_ACCOUNT_INFO_2_ACCOUNT = Internal.createForeignKey(AccountInfo.ACCOUNT_INFO, DSL.name("fk_account_info_2_account"), new TableField[] { AccountInfo.ACCOUNT_INFO.ACCOUNT_ID }, Keys.ACCOUNT_PKEY, new TableField[] { Account.ACCOUNT.ID }, true); + public static final ForeignKey ACCOUNT_INFO__FK_ACCOUNT_INFO_TYPE_2_ACCOUNT = Internal.createForeignKey(AccountInfo.ACCOUNT_INFO, DSL.name("fk_account_info_type_2_account"), new TableField[] { AccountInfo.ACCOUNT_INFO.ACCOUNT_INFO_TYPE_ID }, Keys.ACCOUNT_INFO_TYPE_PKEY, new TableField[] { AccountInfoType.ACCOUNT_INFO_TYPE.ID }, true); +} diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Public.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Public.java new file mode 100644 index 0000000..757b3c3 --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Public.java @@ -0,0 +1,68 @@ +/* + * This file is generated by jOOQ. + */ +package twopm.tech.ormbench.jooq; + + +import java.util.Arrays; +import java.util.List; + +import org.jooq.Catalog; +import org.jooq.Table; +import org.jooq.impl.SchemaImpl; + +import twopm.tech.ormbench.jooq.tables.Account; +import twopm.tech.ormbench.jooq.tables.AccountInfo; +import twopm.tech.ormbench.jooq.tables.AccountInfoType; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Public extends SchemaImpl { + + private static final long serialVersionUID = 1L; + + /** + * The reference instance of public + */ + public static final Public PUBLIC = new Public(); + + /** + * The table public.account. + */ + public final Account ACCOUNT = Account.ACCOUNT; + + /** + * The table public.account_info. + */ + public final AccountInfo ACCOUNT_INFO = AccountInfo.ACCOUNT_INFO; + + /** + * The table public.account_info_type. + */ + public final AccountInfoType ACCOUNT_INFO_TYPE = AccountInfoType.ACCOUNT_INFO_TYPE; + + /** + * No further instances allowed + */ + private Public() { + super("public", null); + } + + + @Override + public Catalog getCatalog() { + return DefaultCatalog.DEFAULT_CATALOG; + } + + @Override + public final List> getTables() { + return Arrays.asList( + Account.ACCOUNT, + AccountInfo.ACCOUNT_INFO, + AccountInfoType.ACCOUNT_INFO_TYPE + ); + } +} diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Tables.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Tables.java new file mode 100644 index 0000000..6a7c38b --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/Tables.java @@ -0,0 +1,32 @@ +/* + * This file is generated by jOOQ. + */ +package twopm.tech.ormbench.jooq; + + +import twopm.tech.ormbench.jooq.tables.Account; +import twopm.tech.ormbench.jooq.tables.AccountInfo; +import twopm.tech.ormbench.jooq.tables.AccountInfoType; + + +/** + * Convenience access to all tables in public. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Tables { + + /** + * The table public.account. + */ + public static final Account ACCOUNT = Account.ACCOUNT; + + /** + * The table public.account_info. + */ + public static final AccountInfo ACCOUNT_INFO = AccountInfo.ACCOUNT_INFO; + + /** + * The table public.account_info_type. + */ + public static final AccountInfoType ACCOUNT_INFO_TYPE = AccountInfoType.ACCOUNT_INFO_TYPE; +} diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/Account.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/Account.java new file mode 100644 index 0000000..ac9877b --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/Account.java @@ -0,0 +1,157 @@ +/* + * This file is generated by jOOQ. + */ +package twopm.tech.ormbench.jooq.tables; + + +import java.time.LocalDateTime; +import java.util.UUID; + +import org.jooq.Field; +import org.jooq.ForeignKey; +import org.jooq.Name; +import org.jooq.Record; +import org.jooq.Row6; +import org.jooq.Schema; +import org.jooq.Table; +import org.jooq.TableField; +import org.jooq.TableOptions; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; +import org.jooq.impl.TableImpl; + +import twopm.tech.ormbench.jooq.Keys; +import twopm.tech.ormbench.jooq.Public; +import twopm.tech.ormbench.jooq.tables.records.AccountRecord; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Account extends TableImpl { + + private static final long serialVersionUID = 1L; + + /** + * The reference instance of public.account + */ + public static final Account ACCOUNT = new Account(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return AccountRecord.class; + } + + /** + * The column public.account.id. + */ + public final TableField ID = createField(DSL.name("id"), SQLDataType.UUID.nullable(false).defaultValue(DSL.field("gen_random_uuid()", SQLDataType.UUID)), this, ""); + + /** + * The column public.account.hash. + */ + public final TableField HASH = createField(DSL.name("hash"), SQLDataType.VARCHAR(64).nullable(false), this, ""); + + /** + * The column public.account.salt. + */ + public final TableField SALT = createField(DSL.name("salt"), SQLDataType.VARCHAR(16).nullable(false), this, ""); + + /** + * The column public.account.created_at. + */ + public final TableField CREATED_AT = createField(DSL.name("created_at"), SQLDataType.LOCALDATETIME(6), this, ""); + + /** + * The column public.account.updated_at. + */ + public final TableField UPDATED_AT = createField(DSL.name("updated_at"), SQLDataType.LOCALDATETIME(6), this, ""); + + /** + * The column public.account.deleted_at. + */ + public final TableField DELETED_AT = createField(DSL.name("deleted_at"), SQLDataType.LOCALDATETIME(6), this, ""); + + private Account(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private Account(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); + } + + /** + * Create an aliased public.account table reference + */ + public Account(String alias) { + this(DSL.name(alias), ACCOUNT); + } + + /** + * Create an aliased public.account table reference + */ + public Account(Name alias) { + this(alias, ACCOUNT); + } + + /** + * Create a public.account table reference + */ + public Account() { + this(DSL.name("account"), null); + } + + public Account(Table child, ForeignKey key) { + super(child, key, ACCOUNT); + } + + @Override + public Schema getSchema() { + return aliased() ? null : Public.PUBLIC; + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.ACCOUNT_PKEY; + } + + @Override + public Account as(String alias) { + return new Account(DSL.name(alias), this); + } + + @Override + public Account as(Name alias) { + return new Account(alias, this); + } + + /** + * Rename this table + */ + @Override + public Account rename(String name) { + return new Account(DSL.name(name), null); + } + + /** + * Rename this table + */ + @Override + public Account rename(Name name) { + return new Account(name, null); + } + + // ------------------------------------------------------------------------- + // Row6 type methods + // ------------------------------------------------------------------------- + + @Override + public Row6 fieldsRow() { + return (Row6) super.fieldsRow(); + } +} diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/AccountInfo.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/AccountInfo.java new file mode 100644 index 0000000..85d72ab --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/AccountInfo.java @@ -0,0 +1,186 @@ +/* + * This file is generated by jOOQ. + */ +package twopm.tech.ormbench.jooq.tables; + + +import java.time.LocalDateTime; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import org.jooq.Field; +import org.jooq.ForeignKey; +import org.jooq.Name; +import org.jooq.Record; +import org.jooq.Row7; +import org.jooq.Schema; +import org.jooq.Table; +import org.jooq.TableField; +import org.jooq.TableOptions; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; +import org.jooq.impl.TableImpl; + +import twopm.tech.ormbench.jooq.Keys; +import twopm.tech.ormbench.jooq.Public; +import twopm.tech.ormbench.jooq.tables.records.AccountInfoRecord; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class AccountInfo extends TableImpl { + + private static final long serialVersionUID = 1L; + + /** + * The reference instance of public.account_info + */ + public static final AccountInfo ACCOUNT_INFO = new AccountInfo(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return AccountInfoRecord.class; + } + + /** + * The column public.account_info.id. + */ + public final TableField ID = createField(DSL.name("id"), SQLDataType.UUID.nullable(false).defaultValue(DSL.field("gen_random_uuid()", SQLDataType.UUID)), this, ""); + + /** + * The column public.account_info.account_id. + */ + public final TableField ACCOUNT_ID = createField(DSL.name("account_id"), SQLDataType.UUID.nullable(false), this, ""); + + /** + * The column public.account_info.account_info_type_id. + */ + public final TableField ACCOUNT_INFO_TYPE_ID = createField(DSL.name("account_info_type_id"), SQLDataType.BIGINT.nullable(false), this, ""); + + /** + * The column public.account_info.value. + */ + public final TableField VALUE = createField(DSL.name("value"), SQLDataType.VARCHAR(255).nullable(false), this, ""); + + /** + * The column public.account_info.created_at. + */ + public final TableField CREATED_AT = createField(DSL.name("created_at"), SQLDataType.LOCALDATETIME(6), this, ""); + + /** + * The column public.account_info.updated_at. + */ + public final TableField UPDATED_AT = createField(DSL.name("updated_at"), SQLDataType.LOCALDATETIME(6), this, ""); + + /** + * The column public.account_info.deleted_at. + */ + public final TableField DELETED_AT = createField(DSL.name("deleted_at"), SQLDataType.LOCALDATETIME(6), this, ""); + + private AccountInfo(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private AccountInfo(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); + } + + /** + * Create an aliased public.account_info table reference + */ + public AccountInfo(String alias) { + this(DSL.name(alias), ACCOUNT_INFO); + } + + /** + * Create an aliased public.account_info table reference + */ + public AccountInfo(Name alias) { + this(alias, ACCOUNT_INFO); + } + + /** + * Create a public.account_info table reference + */ + public AccountInfo() { + this(DSL.name("account_info"), null); + } + + public AccountInfo(Table child, ForeignKey key) { + super(child, key, ACCOUNT_INFO); + } + + @Override + public Schema getSchema() { + return aliased() ? null : Public.PUBLIC; + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.ACCOUNT_INFO_PKEY; + } + + @Override + public List> getReferences() { + return Arrays.asList(Keys.ACCOUNT_INFO__FK_ACCOUNT_INFO_2_ACCOUNT, Keys.ACCOUNT_INFO__FK_ACCOUNT_INFO_TYPE_2_ACCOUNT); + } + + private transient Account _account; + private transient AccountInfoType _accountInfoType; + + public Account account() { + if (_account == null) + _account = new Account(this, Keys.ACCOUNT_INFO__FK_ACCOUNT_INFO_2_ACCOUNT); + + return _account; + } + + public AccountInfoType accountInfoType() { + if (_accountInfoType == null) + _accountInfoType = new AccountInfoType(this, Keys.ACCOUNT_INFO__FK_ACCOUNT_INFO_TYPE_2_ACCOUNT); + + return _accountInfoType; + } + + @Override + public AccountInfo as(String alias) { + return new AccountInfo(DSL.name(alias), this); + } + + @Override + public AccountInfo as(Name alias) { + return new AccountInfo(alias, this); + } + + /** + * Rename this table + */ + @Override + public AccountInfo rename(String name) { + return new AccountInfo(DSL.name(name), null); + } + + /** + * Rename this table + */ + @Override + public AccountInfo rename(Name name) { + return new AccountInfo(name, null); + } + + // ------------------------------------------------------------------------- + // Row7 type methods + // ------------------------------------------------------------------------- + + @Override + public Row7 fieldsRow() { + return (Row7) super.fieldsRow(); + } +} diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/AccountInfoType.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/AccountInfoType.java new file mode 100644 index 0000000..9d8ef37 --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/AccountInfoType.java @@ -0,0 +1,162 @@ +/* + * This file is generated by jOOQ. + */ +package twopm.tech.ormbench.jooq.tables; + + +import java.time.LocalDateTime; + +import org.jooq.Field; +import org.jooq.ForeignKey; +import org.jooq.Identity; +import org.jooq.Name; +import org.jooq.Record; +import org.jooq.Row6; +import org.jooq.Schema; +import org.jooq.Table; +import org.jooq.TableField; +import org.jooq.TableOptions; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; +import org.jooq.impl.TableImpl; + +import twopm.tech.ormbench.jooq.Keys; +import twopm.tech.ormbench.jooq.Public; +import twopm.tech.ormbench.jooq.tables.records.AccountInfoTypeRecord; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class AccountInfoType extends TableImpl { + + private static final long serialVersionUID = 1L; + + /** + * The reference instance of public.account_info_type + */ + public static final AccountInfoType ACCOUNT_INFO_TYPE = new AccountInfoType(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return AccountInfoTypeRecord.class; + } + + /** + * The column public.account_info_type.id. + */ + public final TableField ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); + + /** + * The column public.account_info_type.name. + */ + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(255).nullable(false), this, ""); + + /** + * The column public.account_info_type.enabled. + */ + public final TableField ENABLED = createField(DSL.name("enabled"), SQLDataType.BOOLEAN.defaultValue(DSL.field("false", SQLDataType.BOOLEAN)), this, ""); + + /** + * The column public.account_info_type.created_at. + */ + public final TableField CREATED_AT = createField(DSL.name("created_at"), SQLDataType.LOCALDATETIME(6), this, ""); + + /** + * The column public.account_info_type.updated_at. + */ + public final TableField UPDATED_AT = createField(DSL.name("updated_at"), SQLDataType.LOCALDATETIME(6), this, ""); + + /** + * The column public.account_info_type.deleted_at. + */ + public final TableField DELETED_AT = createField(DSL.name("deleted_at"), SQLDataType.LOCALDATETIME(6), this, ""); + + private AccountInfoType(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private AccountInfoType(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); + } + + /** + * Create an aliased public.account_info_type table reference + */ + public AccountInfoType(String alias) { + this(DSL.name(alias), ACCOUNT_INFO_TYPE); + } + + /** + * Create an aliased public.account_info_type table reference + */ + public AccountInfoType(Name alias) { + this(alias, ACCOUNT_INFO_TYPE); + } + + /** + * Create a public.account_info_type table reference + */ + public AccountInfoType() { + this(DSL.name("account_info_type"), null); + } + + public AccountInfoType(Table child, ForeignKey key) { + super(child, key, ACCOUNT_INFO_TYPE); + } + + @Override + public Schema getSchema() { + return aliased() ? null : Public.PUBLIC; + } + + @Override + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.ACCOUNT_INFO_TYPE_PKEY; + } + + @Override + public AccountInfoType as(String alias) { + return new AccountInfoType(DSL.name(alias), this); + } + + @Override + public AccountInfoType as(Name alias) { + return new AccountInfoType(alias, this); + } + + /** + * Rename this table + */ + @Override + public AccountInfoType rename(String name) { + return new AccountInfoType(DSL.name(name), null); + } + + /** + * Rename this table + */ + @Override + public AccountInfoType rename(Name name) { + return new AccountInfoType(name, null); + } + + // ------------------------------------------------------------------------- + // Row6 type methods + // ------------------------------------------------------------------------- + + @Override + public Row6 fieldsRow() { + return (Row6) super.fieldsRow(); + } +} diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountInfoRecord.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountInfoRecord.java new file mode 100644 index 0000000..292e473 --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountInfoRecord.java @@ -0,0 +1,332 @@ +/* + * This file is generated by jOOQ. + */ +package twopm.tech.ormbench.jooq.tables.records; + + +import java.time.LocalDateTime; +import java.util.UUID; + +import org.jooq.Field; +import org.jooq.Record1; +import org.jooq.Record7; +import org.jooq.Row7; +import org.jooq.impl.UpdatableRecordImpl; + +import twopm.tech.ormbench.jooq.tables.AccountInfo; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class AccountInfoRecord extends UpdatableRecordImpl implements Record7 { + + private static final long serialVersionUID = 1L; + + /** + * Setter for public.account_info.id. + */ + public void setId(UUID value) { + set(0, value); + } + + /** + * Getter for public.account_info.id. + */ + public UUID getId() { + return (UUID) get(0); + } + + /** + * Setter for public.account_info.account_id. + */ + public void setAccountId(UUID value) { + set(1, value); + } + + /** + * Getter for public.account_info.account_id. + */ + public UUID getAccountId() { + return (UUID) get(1); + } + + /** + * Setter for public.account_info.account_info_type_id. + */ + public void setAccountInfoTypeId(Long value) { + set(2, value); + } + + /** + * Getter for public.account_info.account_info_type_id. + */ + public Long getAccountInfoTypeId() { + return (Long) get(2); + } + + /** + * Setter for public.account_info.value. + */ + public void setValue(String value) { + set(3, value); + } + + /** + * Getter for public.account_info.value. + */ + public String getValue() { + return (String) get(3); + } + + /** + * Setter for public.account_info.created_at. + */ + public void setCreatedAt(LocalDateTime value) { + set(4, value); + } + + /** + * Getter for public.account_info.created_at. + */ + public LocalDateTime getCreatedAt() { + return (LocalDateTime) get(4); + } + + /** + * Setter for public.account_info.updated_at. + */ + public void setUpdatedAt(LocalDateTime value) { + set(5, value); + } + + /** + * Getter for public.account_info.updated_at. + */ + public LocalDateTime getUpdatedAt() { + return (LocalDateTime) get(5); + } + + /** + * Setter for public.account_info.deleted_at. + */ + public void setDeletedAt(LocalDateTime value) { + set(6, value); + } + + /** + * Getter for public.account_info.deleted_at. + */ + public LocalDateTime getDeletedAt() { + return (LocalDateTime) get(6); + } + + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + + // ------------------------------------------------------------------------- + // Record7 type implementation + // ------------------------------------------------------------------------- + + @Override + public Row7 fieldsRow() { + return (Row7) super.fieldsRow(); + } + + @Override + public Row7 valuesRow() { + return (Row7) super.valuesRow(); + } + + @Override + public Field field1() { + return AccountInfo.ACCOUNT_INFO.ID; + } + + @Override + public Field field2() { + return AccountInfo.ACCOUNT_INFO.ACCOUNT_ID; + } + + @Override + public Field field3() { + return AccountInfo.ACCOUNT_INFO.ACCOUNT_INFO_TYPE_ID; + } + + @Override + public Field field4() { + return AccountInfo.ACCOUNT_INFO.VALUE; + } + + @Override + public Field field5() { + return AccountInfo.ACCOUNT_INFO.CREATED_AT; + } + + @Override + public Field field6() { + return AccountInfo.ACCOUNT_INFO.UPDATED_AT; + } + + @Override + public Field field7() { + return AccountInfo.ACCOUNT_INFO.DELETED_AT; + } + + @Override + public UUID component1() { + return getId(); + } + + @Override + public UUID component2() { + return getAccountId(); + } + + @Override + public Long component3() { + return getAccountInfoTypeId(); + } + + @Override + public String component4() { + return getValue(); + } + + @Override + public LocalDateTime component5() { + return getCreatedAt(); + } + + @Override + public LocalDateTime component6() { + return getUpdatedAt(); + } + + @Override + public LocalDateTime component7() { + return getDeletedAt(); + } + + @Override + public UUID value1() { + return getId(); + } + + @Override + public UUID value2() { + return getAccountId(); + } + + @Override + public Long value3() { + return getAccountInfoTypeId(); + } + + @Override + public String value4() { + return getValue(); + } + + @Override + public LocalDateTime value5() { + return getCreatedAt(); + } + + @Override + public LocalDateTime value6() { + return getUpdatedAt(); + } + + @Override + public LocalDateTime value7() { + return getDeletedAt(); + } + + @Override + public AccountInfoRecord value1(UUID value) { + setId(value); + return this; + } + + @Override + public AccountInfoRecord value2(UUID value) { + setAccountId(value); + return this; + } + + @Override + public AccountInfoRecord value3(Long value) { + setAccountInfoTypeId(value); + return this; + } + + @Override + public AccountInfoRecord value4(String value) { + setValue(value); + return this; + } + + @Override + public AccountInfoRecord value5(LocalDateTime value) { + setCreatedAt(value); + return this; + } + + @Override + public AccountInfoRecord value6(LocalDateTime value) { + setUpdatedAt(value); + return this; + } + + @Override + public AccountInfoRecord value7(LocalDateTime value) { + setDeletedAt(value); + return this; + } + + @Override + public AccountInfoRecord values(UUID value1, UUID value2, Long value3, String value4, LocalDateTime value5, LocalDateTime value6, LocalDateTime value7) { + value1(value1); + value2(value2); + value3(value3); + value4(value4); + value5(value5); + value6(value6); + value7(value7); + return this; + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + /** + * Create a detached AccountInfoRecord + */ + public AccountInfoRecord() { + super(AccountInfo.ACCOUNT_INFO); + } + + /** + * Create a detached, initialised AccountInfoRecord + */ + public AccountInfoRecord(UUID id, UUID accountId, Long accountInfoTypeId, String value, LocalDateTime createdAt, LocalDateTime updatedAt, LocalDateTime deletedAt) { + super(AccountInfo.ACCOUNT_INFO); + + setId(id); + setAccountId(accountId); + setAccountInfoTypeId(accountInfoTypeId); + setValue(value); + setCreatedAt(createdAt); + setUpdatedAt(updatedAt); + setDeletedAt(deletedAt); + } +} diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountInfoTypeRecord.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountInfoTypeRecord.java new file mode 100644 index 0000000..8ea0da5 --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountInfoTypeRecord.java @@ -0,0 +1,294 @@ +/* + * This file is generated by jOOQ. + */ +package twopm.tech.ormbench.jooq.tables.records; + + +import java.time.LocalDateTime; + +import org.jooq.Field; +import org.jooq.Record1; +import org.jooq.Record6; +import org.jooq.Row6; +import org.jooq.impl.UpdatableRecordImpl; + +import twopm.tech.ormbench.jooq.tables.AccountInfoType; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class AccountInfoTypeRecord extends UpdatableRecordImpl implements Record6 { + + private static final long serialVersionUID = 1L; + + /** + * Setter for public.account_info_type.id. + */ + public void setId(Integer value) { + set(0, value); + } + + /** + * Getter for public.account_info_type.id. + */ + public Integer getId() { + return (Integer) get(0); + } + + /** + * Setter for public.account_info_type.name. + */ + public void setName(String value) { + set(1, value); + } + + /** + * Getter for public.account_info_type.name. + */ + public String getName() { + return (String) get(1); + } + + /** + * Setter for public.account_info_type.enabled. + */ + public void setEnabled(Boolean value) { + set(2, value); + } + + /** + * Getter for public.account_info_type.enabled. + */ + public Boolean getEnabled() { + return (Boolean) get(2); + } + + /** + * Setter for public.account_info_type.created_at. + */ + public void setCreatedAt(LocalDateTime value) { + set(3, value); + } + + /** + * Getter for public.account_info_type.created_at. + */ + public LocalDateTime getCreatedAt() { + return (LocalDateTime) get(3); + } + + /** + * Setter for public.account_info_type.updated_at. + */ + public void setUpdatedAt(LocalDateTime value) { + set(4, value); + } + + /** + * Getter for public.account_info_type.updated_at. + */ + public LocalDateTime getUpdatedAt() { + return (LocalDateTime) get(4); + } + + /** + * Setter for public.account_info_type.deleted_at. + */ + public void setDeletedAt(LocalDateTime value) { + set(5, value); + } + + /** + * Getter for public.account_info_type.deleted_at. + */ + public LocalDateTime getDeletedAt() { + return (LocalDateTime) get(5); + } + + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + + // ------------------------------------------------------------------------- + // Record6 type implementation + // ------------------------------------------------------------------------- + + @Override + public Row6 fieldsRow() { + return (Row6) super.fieldsRow(); + } + + @Override + public Row6 valuesRow() { + return (Row6) super.valuesRow(); + } + + @Override + public Field field1() { + return AccountInfoType.ACCOUNT_INFO_TYPE.ID; + } + + @Override + public Field field2() { + return AccountInfoType.ACCOUNT_INFO_TYPE.NAME; + } + + @Override + public Field field3() { + return AccountInfoType.ACCOUNT_INFO_TYPE.ENABLED; + } + + @Override + public Field field4() { + return AccountInfoType.ACCOUNT_INFO_TYPE.CREATED_AT; + } + + @Override + public Field field5() { + return AccountInfoType.ACCOUNT_INFO_TYPE.UPDATED_AT; + } + + @Override + public Field field6() { + return AccountInfoType.ACCOUNT_INFO_TYPE.DELETED_AT; + } + + @Override + public Integer component1() { + return getId(); + } + + @Override + public String component2() { + return getName(); + } + + @Override + public Boolean component3() { + return getEnabled(); + } + + @Override + public LocalDateTime component4() { + return getCreatedAt(); + } + + @Override + public LocalDateTime component5() { + return getUpdatedAt(); + } + + @Override + public LocalDateTime component6() { + return getDeletedAt(); + } + + @Override + public Integer value1() { + return getId(); + } + + @Override + public String value2() { + return getName(); + } + + @Override + public Boolean value3() { + return getEnabled(); + } + + @Override + public LocalDateTime value4() { + return getCreatedAt(); + } + + @Override + public LocalDateTime value5() { + return getUpdatedAt(); + } + + @Override + public LocalDateTime value6() { + return getDeletedAt(); + } + + @Override + public AccountInfoTypeRecord value1(Integer value) { + setId(value); + return this; + } + + @Override + public AccountInfoTypeRecord value2(String value) { + setName(value); + return this; + } + + @Override + public AccountInfoTypeRecord value3(Boolean value) { + setEnabled(value); + return this; + } + + @Override + public AccountInfoTypeRecord value4(LocalDateTime value) { + setCreatedAt(value); + return this; + } + + @Override + public AccountInfoTypeRecord value5(LocalDateTime value) { + setUpdatedAt(value); + return this; + } + + @Override + public AccountInfoTypeRecord value6(LocalDateTime value) { + setDeletedAt(value); + return this; + } + + @Override + public AccountInfoTypeRecord values(Integer value1, String value2, Boolean value3, LocalDateTime value4, LocalDateTime value5, LocalDateTime value6) { + value1(value1); + value2(value2); + value3(value3); + value4(value4); + value5(value5); + value6(value6); + return this; + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + /** + * Create a detached AccountInfoTypeRecord + */ + public AccountInfoTypeRecord() { + super(AccountInfoType.ACCOUNT_INFO_TYPE); + } + + /** + * Create a detached, initialised AccountInfoTypeRecord + */ + public AccountInfoTypeRecord(Integer id, String name, Boolean enabled, LocalDateTime createdAt, LocalDateTime updatedAt, LocalDateTime deletedAt) { + super(AccountInfoType.ACCOUNT_INFO_TYPE); + + setId(id); + setName(name); + setEnabled(enabled); + setCreatedAt(createdAt); + setUpdatedAt(updatedAt); + setDeletedAt(deletedAt); + } +} diff --git a/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountRecord.java b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountRecord.java new file mode 100644 index 0000000..2512010 --- /dev/null +++ b/modules/main-jooq/src/main/java/twopm/tech/ormbench/jooq/tables/records/AccountRecord.java @@ -0,0 +1,295 @@ +/* + * This file is generated by jOOQ. + */ +package twopm.tech.ormbench.jooq.tables.records; + + +import java.time.LocalDateTime; +import java.util.UUID; + +import org.jooq.Field; +import org.jooq.Record1; +import org.jooq.Record6; +import org.jooq.Row6; +import org.jooq.impl.UpdatableRecordImpl; + +import twopm.tech.ormbench.jooq.tables.Account; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class AccountRecord extends UpdatableRecordImpl implements Record6 { + + private static final long serialVersionUID = 1L; + + /** + * Setter for public.account.id. + */ + public void setId(UUID value) { + set(0, value); + } + + /** + * Getter for public.account.id. + */ + public UUID getId() { + return (UUID) get(0); + } + + /** + * Setter for public.account.hash. + */ + public void setHash(String value) { + set(1, value); + } + + /** + * Getter for public.account.hash. + */ + public String getHash() { + return (String) get(1); + } + + /** + * Setter for public.account.salt. + */ + public void setSalt(String value) { + set(2, value); + } + + /** + * Getter for public.account.salt. + */ + public String getSalt() { + return (String) get(2); + } + + /** + * Setter for public.account.created_at. + */ + public void setCreatedAt(LocalDateTime value) { + set(3, value); + } + + /** + * Getter for public.account.created_at. + */ + public LocalDateTime getCreatedAt() { + return (LocalDateTime) get(3); + } + + /** + * Setter for public.account.updated_at. + */ + public void setUpdatedAt(LocalDateTime value) { + set(4, value); + } + + /** + * Getter for public.account.updated_at. + */ + public LocalDateTime getUpdatedAt() { + return (LocalDateTime) get(4); + } + + /** + * Setter for public.account.deleted_at. + */ + public void setDeletedAt(LocalDateTime value) { + set(5, value); + } + + /** + * Getter for public.account.deleted_at. + */ + public LocalDateTime getDeletedAt() { + return (LocalDateTime) get(5); + } + + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + + // ------------------------------------------------------------------------- + // Record6 type implementation + // ------------------------------------------------------------------------- + + @Override + public Row6 fieldsRow() { + return (Row6) super.fieldsRow(); + } + + @Override + public Row6 valuesRow() { + return (Row6) super.valuesRow(); + } + + @Override + public Field field1() { + return Account.ACCOUNT.ID; + } + + @Override + public Field field2() { + return Account.ACCOUNT.HASH; + } + + @Override + public Field field3() { + return Account.ACCOUNT.SALT; + } + + @Override + public Field field4() { + return Account.ACCOUNT.CREATED_AT; + } + + @Override + public Field field5() { + return Account.ACCOUNT.UPDATED_AT; + } + + @Override + public Field field6() { + return Account.ACCOUNT.DELETED_AT; + } + + @Override + public UUID component1() { + return getId(); + } + + @Override + public String component2() { + return getHash(); + } + + @Override + public String component3() { + return getSalt(); + } + + @Override + public LocalDateTime component4() { + return getCreatedAt(); + } + + @Override + public LocalDateTime component5() { + return getUpdatedAt(); + } + + @Override + public LocalDateTime component6() { + return getDeletedAt(); + } + + @Override + public UUID value1() { + return getId(); + } + + @Override + public String value2() { + return getHash(); + } + + @Override + public String value3() { + return getSalt(); + } + + @Override + public LocalDateTime value4() { + return getCreatedAt(); + } + + @Override + public LocalDateTime value5() { + return getUpdatedAt(); + } + + @Override + public LocalDateTime value6() { + return getDeletedAt(); + } + + @Override + public AccountRecord value1(UUID value) { + setId(value); + return this; + } + + @Override + public AccountRecord value2(String value) { + setHash(value); + return this; + } + + @Override + public AccountRecord value3(String value) { + setSalt(value); + return this; + } + + @Override + public AccountRecord value4(LocalDateTime value) { + setCreatedAt(value); + return this; + } + + @Override + public AccountRecord value5(LocalDateTime value) { + setUpdatedAt(value); + return this; + } + + @Override + public AccountRecord value6(LocalDateTime value) { + setDeletedAt(value); + return this; + } + + @Override + public AccountRecord values(UUID value1, String value2, String value3, LocalDateTime value4, LocalDateTime value5, LocalDateTime value6) { + value1(value1); + value2(value2); + value3(value3); + value4(value4); + value5(value5); + value6(value6); + return this; + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + /** + * Create a detached AccountRecord + */ + public AccountRecord() { + super(Account.ACCOUNT); + } + + /** + * Create a detached, initialised AccountRecord + */ + public AccountRecord(UUID id, String hash, String salt, LocalDateTime createdAt, LocalDateTime updatedAt, LocalDateTime deletedAt) { + super(Account.ACCOUNT); + + setId(id); + setHash(hash); + setSalt(salt); + setCreatedAt(createdAt); + setUpdatedAt(updatedAt); + setDeletedAt(deletedAt); + } +} diff --git a/modules/main-speedment/pom.xml b/modules/main-speedment/pom.xml new file mode 100644 index 0000000..3a39819 --- /dev/null +++ b/modules/main-speedment/pom.xml @@ -0,0 +1,81 @@ + + + + 4.0.0 + + twopm.tech.orm-bench + bom + 1.0-SNAPSHOT + ../../pom.xml + + + main-speedment + jar + + + UTF-8 + 11 + 11 + 42.2.9 + 3.2.6 + + + + + org.postgresql + postgresql + ${postgresql.version} + runtime + + + + com.speedment + runtime + ${speedment.version} + pom + + + + com.speedment.plugins + json-stream + ${speedment.version} + + + + + + + + com.speedment + speedment-maven-plugin + ${speedment.version} + + + + com.speedment.plugins.enums.EnumGeneratorBundle + + ${project.artifactId} + ${project.groupId} + + + + + org.postgresql + postgresql + ${postgresql.version} + runtime + + + + + + maven-compiler-plugin + + 3.8.1 + + + + + \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/module-info.java b/modules/main-speedment/src/main/java/module-info.java new file mode 100644 index 0000000..0f8684c --- /dev/null +++ b/modules/main-speedment/src/main/java/module-info.java @@ -0,0 +1,8 @@ +module mymodule { +// requires com.speedment.enterprise.plugins.enums; +// requires com.speedment.enterprise.plugins.json; + requires com.speedment.runtime.application; + requires com.speedment.runtime.connector.postgres; + requires com.speedment.runtime.join; +// requires org.postgresql.jdbc; +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/Bench.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/Bench.java new file mode 100644 index 0000000..3f899bf --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/Bench.java @@ -0,0 +1,30 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package twopm.tech.ormbench; + +import java.sql.SQLException; +import java.util.Optional; +import twopm.tech.ormbench.speedment.BenchApplication; +import twopm.tech.ormbench.speedment.BenchApplicationBuilder; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.Account; + +/** + * + * @author Edward M. Kagan {@literal <}kaganem{@literal @}2pm.tech{@literal >} + */ +public class Bench { + public static void main(String[] args) throws SQLException { + BenchApplication app = new BenchApplicationBuilder() + .withUsername("alloc-test") + .withPassword("alloc-test") + .build(); + + Optional get = app.get(Account.class); + + + app.stop(); + } +} diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplication.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplication.java.md5 new file mode 100644 index 0000000..6d80412 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplication.java.md5 @@ -0,0 +1 @@ +1a3d3b446676bdbf7346acf48e7ae6c4 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplicationBuilder.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplicationBuilder.java.md5 new file mode 100644 index 0000000..17cb562 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplicationBuilder.java.md5 @@ -0,0 +1 @@ +89ecb77bcffc1da75467e6b6b486f805 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplicationImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplicationImpl.java.md5 new file mode 100644 index 0000000..5aa469d --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchApplicationImpl.java.md5 @@ -0,0 +1 @@ +3115d4d9b071f865deeea4536d0409b0 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchInjectorProxy.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchInjectorProxy.java.md5 new file mode 100644 index 0000000..363189b --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/.speedment/.BenchInjectorProxy.java.md5 @@ -0,0 +1 @@ +9fa97222f8fd7632d74179e523bd9eb3 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplication.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplication.java new file mode 100644 index 0000000..4ab8b5e --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplication.java @@ -0,0 +1,13 @@ +package twopm.tech.ormbench.speedment; + +import twopm.tech.ormbench.speedment.generated.GeneratedBenchApplication; + +/** + * An {@link com.speedment.runtime.core.ApplicationBuilder} interface for the + * {@link com.speedment.runtime.config.Project} named public. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public interface BenchApplication extends GeneratedBenchApplication {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplicationBuilder.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplicationBuilder.java new file mode 100644 index 0000000..eef8949 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplicationBuilder.java @@ -0,0 +1,14 @@ +package twopm.tech.ormbench.speedment; + +import twopm.tech.ormbench.speedment.generated.GeneratedBenchApplicationBuilder; + +/** + * The default {@link com.speedment.runtime.core.ApplicationBuilder} + * implementation class for the {@link com.speedment.runtime.config.Project} + * named public. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public final class BenchApplicationBuilder extends GeneratedBenchApplicationBuilder {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplicationImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplicationImpl.java new file mode 100644 index 0000000..997d35b --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchApplicationImpl.java @@ -0,0 +1,15 @@ +package twopm.tech.ormbench.speedment; + +import twopm.tech.ormbench.speedment.generated.GeneratedBenchApplicationImpl; + +/** + * The default {@link com.speedment.runtime.core.Speedment} implementation class + * for the {@link com.speedment.runtime.config.Project} named public. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public final class BenchApplicationImpl +extends GeneratedBenchApplicationImpl +implements BenchApplication {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchInjectorProxy.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchInjectorProxy.java new file mode 100644 index 0000000..81c9bf6 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/BenchInjectorProxy.java @@ -0,0 +1,49 @@ +package twopm.tech.ormbench.speedment; + +import com.speedment.common.injector.InjectorProxy; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +/** + * The default {@link com.speedment.common.injector.InjectorProxy} + * implementation class for the {@link com.speedment.runtime.config.Project} + * named public. + *

+ * An InjectorProxy is used to reduce the required number of {@code exports} in + * the module-info.java file for a Speedment project + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public final class BenchInjectorProxy implements InjectorProxy { + + @Override + public boolean isApplicable(Class clazz) { + return InjectorProxy.samePackageOrBelow(BenchInjectorProxy.class).test(clazz); + } + + @Override + public void set( + Field field, + Object instance, + Object value) throws IllegalAccessException { + field.set(instance, value); + } + + @Override + public T newInstance(Constructor constructor, Object... args) throws InstantiationException, InvocationTargetException, IllegalAccessException { + return constructor.newInstance(args); + } + + @Override + public Object invoke( + Method method, + Object obj, + Object... args) throws IllegalArgumentException, InvocationTargetException, IllegalAccessException { + return method.invoke(obj, args); + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.Account.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.Account.java.md5 new file mode 100644 index 0000000..360ea26 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.Account.java.md5 @@ -0,0 +1 @@ +c93ffffbe6473520dd3f4c9d856743cf \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountImpl.java.md5 new file mode 100644 index 0000000..225d0c7 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountImpl.java.md5 @@ -0,0 +1 @@ +b8b1b1b32c435aa045b5c0d6b2a350d7 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountManager.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountManager.java.md5 new file mode 100644 index 0000000..f7fe2eb --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountManager.java.md5 @@ -0,0 +1 @@ +412ec53a1e3f388a0ac88b60d3742799 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountManagerImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountManagerImpl.java.md5 new file mode 100644 index 0000000..cc97ee3 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountManagerImpl.java.md5 @@ -0,0 +1 @@ +0f6be8668fb895ebb4efd76f01963aaa \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountSqlAdapter.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountSqlAdapter.java.md5 new file mode 100644 index 0000000..8defa14 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/.speedment/.AccountSqlAdapter.java.md5 @@ -0,0 +1 @@ +e8f37f4aac254c49cc6bba36008582a1 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/Account.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/Account.java new file mode 100644 index 0000000..b531c22 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/Account.java @@ -0,0 +1,12 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account.generated.GeneratedAccount; + +/** + * The main interface for entities of the {@code account}-table in the database. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public interface Account extends GeneratedAccount {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountImpl.java new file mode 100644 index 0000000..5fa18d8 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountImpl.java @@ -0,0 +1,15 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account.generated.GeneratedAccountImpl; + +/** + * The default implementation of the {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account.Account}-interface. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public final class AccountImpl +extends GeneratedAccountImpl +implements Account {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountManager.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountManager.java new file mode 100644 index 0000000..eafd2d6 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountManager.java @@ -0,0 +1,13 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account.generated.GeneratedAccountManager; + +/** + * The main interface for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account.Account} entity. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public interface AccountManager extends GeneratedAccountManager {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountManagerImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountManagerImpl.java new file mode 100644 index 0000000..642a286 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountManagerImpl.java @@ -0,0 +1,15 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account.generated.GeneratedAccountManagerImpl; + +/** + * The default implementation for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account.Account} entity. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public final class AccountManagerImpl +extends GeneratedAccountManagerImpl +implements AccountManager {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountSqlAdapter.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountSqlAdapter.java new file mode 100644 index 0000000..53aaa02 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/AccountSqlAdapter.java @@ -0,0 +1,13 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account.generated.GeneratedAccountSqlAdapter; + +/** + * The SqlAdapter for every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account.Account} entity. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public class AccountSqlAdapter extends GeneratedAccountSqlAdapter {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccount.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccount.java.md5 new file mode 100644 index 0000000..b5b566b --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccount.java.md5 @@ -0,0 +1 @@ +d1dbe4aa43fba6c27eb5eeecd2185cd1 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountImpl.java.md5 new file mode 100644 index 0000000..b4793bf --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountImpl.java.md5 @@ -0,0 +1 @@ +eed7324e6143d48544d015e14ff1ede2 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountManager.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountManager.java.md5 new file mode 100644 index 0000000..0a42acb --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountManager.java.md5 @@ -0,0 +1 @@ +3f6778cdb50bb02b22596e0724c10891 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountManagerImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountManagerImpl.java.md5 new file mode 100644 index 0000000..0f33507 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountManagerImpl.java.md5 @@ -0,0 +1 @@ +12bd268f0a5bd9c76e49ab2318392f54 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountSqlAdapter.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountSqlAdapter.java.md5 new file mode 100644 index 0000000..6605d05 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/.speedment/.GeneratedAccountSqlAdapter.java.md5 @@ -0,0 +1 @@ +a5439f1e8e7d00c890403e3095894231 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccount.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccount.java new file mode 100644 index 0000000..435cb3a --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccount.java @@ -0,0 +1,242 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.ColumnIdentifier; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.util.OptionalUtil; +import com.speedment.runtime.field.ComparableField; +import com.speedment.runtime.field.StringField; +import com.speedment.runtime.typemapper.TypeMapper; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.Account; + +import java.sql.Timestamp; +import java.util.Optional; +import java.util.UUID; + +/** + * The generated base for the {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account.Account}-interface + * representing entities of the {@code account}-table in the database. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public interface GeneratedAccount { + + /** + * This Field corresponds to the {@link Account} field that can be obtained + * using the {@link Account#getId()} method. + */ + ComparableField ID = ComparableField.create( + Identifier.ID, + Account::getId, + Account::setId, + TypeMapper.identity(), + true + ); + /** + * This Field corresponds to the {@link Account} field that can be obtained + * using the {@link Account#getHash()} method. + */ + StringField HASH = StringField.create( + Identifier.HASH, + Account::getHash, + Account::setHash, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link Account} field that can be obtained + * using the {@link Account#getSalt()} method. + */ + StringField SALT = StringField.create( + Identifier.SALT, + Account::getSalt, + Account::setSalt, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link Account} field that can be obtained + * using the {@link Account#getCreatedAt()} method. + */ + ComparableField CREATED_AT = ComparableField.create( + Identifier.CREATED_AT, + o -> OptionalUtil.unwrap(o.getCreatedAt()), + Account::setCreatedAt, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link Account} field that can be obtained + * using the {@link Account#getUpdatedAt()} method. + */ + ComparableField UPDATED_AT = ComparableField.create( + Identifier.UPDATED_AT, + o -> OptionalUtil.unwrap(o.getUpdatedAt()), + Account::setUpdatedAt, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link Account} field that can be obtained + * using the {@link Account#getDeletedAt()} method. + */ + ComparableField DELETED_AT = ComparableField.create( + Identifier.DELETED_AT, + o -> OptionalUtil.unwrap(o.getDeletedAt()), + Account::setDeletedAt, + TypeMapper.identity(), + false + ); + + /** + * Returns the id of this Account. The id field corresponds to the database + * column alloc-test.public.account.id. + * + * @return the id of this Account + */ + UUID getId(); + + /** + * Returns the hash of this Account. The hash field corresponds to the + * database column alloc-test.public.account.hash. + * + * @return the hash of this Account + */ + String getHash(); + + /** + * Returns the salt of this Account. The salt field corresponds to the + * database column alloc-test.public.account.salt. + * + * @return the salt of this Account + */ + String getSalt(); + + /** + * Returns the createdAt of this Account. The createdAt field corresponds to + * the database column alloc-test.public.account.created_at. + * + * @return the createdAt of this Account + */ + Optional getCreatedAt(); + + /** + * Returns the updatedAt of this Account. The updatedAt field corresponds to + * the database column alloc-test.public.account.updated_at. + * + * @return the updatedAt of this Account + */ + Optional getUpdatedAt(); + + /** + * Returns the deletedAt of this Account. The deletedAt field corresponds to + * the database column alloc-test.public.account.deleted_at. + * + * @return the deletedAt of this Account + */ + Optional getDeletedAt(); + + /** + * Sets the id of this Account. The id field corresponds to the database + * column alloc-test.public.account.id. + * + * @param id to set of this Account + * @return this Account instance + */ + Account setId(UUID id); + + /** + * Sets the hash of this Account. The hash field corresponds to the database + * column alloc-test.public.account.hash. + * + * @param hash to set of this Account + * @return this Account instance + */ + Account setHash(String hash); + + /** + * Sets the salt of this Account. The salt field corresponds to the database + * column alloc-test.public.account.salt. + * + * @param salt to set of this Account + * @return this Account instance + */ + Account setSalt(String salt); + + /** + * Sets the createdAt of this Account. The createdAt field corresponds to + * the database column alloc-test.public.account.created_at. + * + * @param createdAt to set of this Account + * @return this Account instance + */ + Account setCreatedAt(Timestamp createdAt); + + /** + * Sets the updatedAt of this Account. The updatedAt field corresponds to + * the database column alloc-test.public.account.updated_at. + * + * @param updatedAt to set of this Account + * @return this Account instance + */ + Account setUpdatedAt(Timestamp updatedAt); + + /** + * Sets the deletedAt of this Account. The deletedAt field corresponds to + * the database column alloc-test.public.account.deleted_at. + * + * @param deletedAt to set of this Account + * @return this Account instance + */ + Account setDeletedAt(Timestamp deletedAt); + + enum Identifier implements ColumnIdentifier { + + ID ("id"), + HASH ("hash"), + SALT ("salt"), + CREATED_AT ("created_at"), + UPDATED_AT ("updated_at"), + DELETED_AT ("deleted_at"); + + private final String columnId; + private final TableIdentifier tableIdentifier; + + Identifier(String columnId) { + this.columnId = columnId; + this.tableIdentifier = TableIdentifier.of( getDbmsId(), + getSchemaId(), + getTableId()); + } + + @Override + public String getDbmsId() { + return "alloc-test"; + } + + @Override + public String getSchemaId() { + return "public"; + } + + @Override + public String getTableId() { + return "account"; + } + + @Override + public String getColumnId() { + return this.columnId; + } + + @Override + public TableIdentifier asTableIdentifier() { + return this.tableIdentifier; + } + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountImpl.java new file mode 100644 index 0000000..ba88505 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountImpl.java @@ -0,0 +1,137 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.core.util.OptionalUtil; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.Account; + +import java.sql.Timestamp; +import java.util.Objects; +import java.util.Optional; +import java.util.StringJoiner; +import java.util.UUID; + +/** + * The generated base implementation of the {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account.Account}-interface. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public abstract class GeneratedAccountImpl implements Account { + + private UUID id; + private String hash; + private String salt; + private Timestamp createdAt; + private Timestamp updatedAt; + private Timestamp deletedAt; + + protected GeneratedAccountImpl() {} + + @Override + public UUID getId() { + return id; + } + + @Override + public String getHash() { + return hash; + } + + @Override + public String getSalt() { + return salt; + } + + @Override + public Optional getCreatedAt() { + return Optional.ofNullable(createdAt); + } + + @Override + public Optional getUpdatedAt() { + return Optional.ofNullable(updatedAt); + } + + @Override + public Optional getDeletedAt() { + return Optional.ofNullable(deletedAt); + } + + @Override + public Account setId(UUID id) { + this.id = id; + return this; + } + + @Override + public Account setHash(String hash) { + this.hash = hash; + return this; + } + + @Override + public Account setSalt(String salt) { + this.salt = salt; + return this; + } + + @Override + public Account setCreatedAt(Timestamp createdAt) { + this.createdAt = createdAt; + return this; + } + + @Override + public Account setUpdatedAt(Timestamp updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + @Override + public Account setDeletedAt(Timestamp deletedAt) { + this.deletedAt = deletedAt; + return this; + } + + @Override + public String toString() { + final StringJoiner sj = new StringJoiner(", ", "{ ", " }"); + sj.add("id = " + Objects.toString(getId())); + sj.add("hash = " + Objects.toString(getHash())); + sj.add("salt = " + Objects.toString(getSalt())); + sj.add("createdAt = " + Objects.toString(OptionalUtil.unwrap(getCreatedAt()))); + sj.add("updatedAt = " + Objects.toString(OptionalUtil.unwrap(getUpdatedAt()))); + sj.add("deletedAt = " + Objects.toString(OptionalUtil.unwrap(getDeletedAt()))); + return "AccountImpl " + sj.toString(); + } + + @Override + public boolean equals(Object that) { + if (this == that) { return true; } + if (!(that instanceof Account)) { return false; } + final Account thatAccount = (Account)that; + if (!Objects.equals(this.getId(), thatAccount.getId())) { return false; } + if (!Objects.equals(this.getHash(), thatAccount.getHash())) { return false; } + if (!Objects.equals(this.getSalt(), thatAccount.getSalt())) { return false; } + if (!Objects.equals(this.getCreatedAt(), thatAccount.getCreatedAt())) { return false; } + if (!Objects.equals(this.getUpdatedAt(), thatAccount.getUpdatedAt())) { return false; } + if (!Objects.equals(this.getDeletedAt(), thatAccount.getDeletedAt())) { return false; } + return true; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 31 * hash + Objects.hashCode(getId()); + hash = 31 * hash + Objects.hashCode(getHash()); + hash = 31 * hash + Objects.hashCode(getSalt()); + hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getCreatedAt())); + hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getUpdatedAt())); + hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getDeletedAt())); + return hash; + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountManager.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountManager.java new file mode 100644 index 0000000..8d79378 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountManager.java @@ -0,0 +1,40 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.manager.Manager; +import com.speedment.runtime.field.Field; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.Account; + +import java.util.List; + +import static java.util.Arrays.asList; +import static java.util.Collections.unmodifiableList; + +/** + * The generated base interface for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account.Account} entity. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public interface GeneratedAccountManager extends Manager { + + TableIdentifier IDENTIFIER = TableIdentifier.of("alloc-test", "public", "account"); + List> FIELDS = unmodifiableList(asList( + Account.ID, + Account.HASH, + Account.SALT, + Account.CREATED_AT, + Account.UPDATED_AT, + Account.DELETED_AT + )); + + @Override + default Class getEntityClass() { + return Account.class; + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountManagerImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountManagerImpl.java new file mode 100644 index 0000000..3a0bd27 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountManagerImpl.java @@ -0,0 +1,54 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.manager.AbstractManager; +import com.speedment.runtime.field.Field; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.Account; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.AccountImpl; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.AccountManager; + +import java.util.stream.Stream; + +/** + * The generated base implementation for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account.Account} entity. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public abstract class GeneratedAccountManagerImpl +extends AbstractManager +implements GeneratedAccountManager { + + private final TableIdentifier tableIdentifier; + + protected GeneratedAccountManagerImpl() { + this.tableIdentifier = TableIdentifier.of("alloc-test", "public", "account"); + } + + @Override + public Account create() { + return new AccountImpl(); + } + + @Override + public TableIdentifier getTableIdentifier() { + return tableIdentifier; + } + + @Override + public Stream> fields() { + return AccountManager.FIELDS.stream(); + } + + @Override + public Stream> primaryKeyFields() { + return Stream.of( + Account.ID + ); + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountSqlAdapter.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountSqlAdapter.java new file mode 100644 index 0000000..7e73b1b --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account/generated/GeneratedAccountSqlAdapter.java @@ -0,0 +1,63 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.component.SqlAdapter; +import com.speedment.runtime.core.db.SqlFunction; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.Account; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.AccountImpl; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import static com.speedment.common.injector.State.RESOLVED; +import java.util.UUID; + +/** + * The generated Sql Adapter for a {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account.Account} entity. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public abstract class GeneratedAccountSqlAdapter implements SqlAdapter { + + private final TableIdentifier tableIdentifier; + + protected GeneratedAccountSqlAdapter() { + this.tableIdentifier = TableIdentifier.of("alloc-test", "public", "account"); + } + + protected Account apply(ResultSet resultSet, int offset) throws SQLException { + return createEntity() + .setId( UUID.fromString(resultSet.getString(1 + offset))) + .setHash( resultSet.getString(2 + offset)) + .setSalt( resultSet.getString(3 + offset)) + .setCreatedAt( resultSet.getTimestamp(4 + offset)) + .setUpdatedAt( resultSet.getTimestamp(5 + offset)) + .setDeletedAt( resultSet.getTimestamp(6 + offset)) + ; + } + + protected AccountImpl createEntity() { + return new AccountImpl(); + } + + @Override + public TableIdentifier identifier() { + return tableIdentifier; + } + + @Override + public SqlFunction entityMapper() { + return entityMapper(0); + } + + @Override + public SqlFunction entityMapper(int offset) { + return rs -> apply(rs, offset); + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfo.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfo.java.md5 new file mode 100644 index 0000000..42d81a8 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfo.java.md5 @@ -0,0 +1 @@ +3fd37aa31c0c2aca4853c61f9d1ae9a6 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoImpl.java.md5 new file mode 100644 index 0000000..efffc2f --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoImpl.java.md5 @@ -0,0 +1 @@ +e65b6305ef9a92ff7bcb5c6ebf110653 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoManager.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoManager.java.md5 new file mode 100644 index 0000000..c3535be --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoManager.java.md5 @@ -0,0 +1 @@ +19452f23e4ef405b15fe0ac95c8b7554 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoManagerImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoManagerImpl.java.md5 new file mode 100644 index 0000000..19b58f9 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoManagerImpl.java.md5 @@ -0,0 +1 @@ +5f35eb8bfc265e30f16a7e18b355d397 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoSqlAdapter.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoSqlAdapter.java.md5 new file mode 100644 index 0000000..d039daa --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/.speedment/.AccountInfoSqlAdapter.java.md5 @@ -0,0 +1 @@ +70c40c6f57faf427ac2c22ab117eb612 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfo.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfo.java new file mode 100644 index 0000000..f4bd404 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfo.java @@ -0,0 +1,13 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.generated.GeneratedAccountInfo; + +/** + * The main interface for entities of the {@code account_info}-table in the + * database. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public interface AccountInfo extends GeneratedAccountInfo {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoImpl.java new file mode 100644 index 0000000..5b65914 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoImpl.java @@ -0,0 +1,15 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.generated.GeneratedAccountInfoImpl; + +/** + * The default implementation of the {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo}-interface. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public final class AccountInfoImpl +extends GeneratedAccountInfoImpl +implements AccountInfo {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoManager.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoManager.java new file mode 100644 index 0000000..92cd630 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoManager.java @@ -0,0 +1,14 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.generated.GeneratedAccountInfoManager; + +/** + * The main interface for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo} + * entity. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public interface AccountInfoManager extends GeneratedAccountInfoManager {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoManagerImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoManagerImpl.java new file mode 100644 index 0000000..e20c800 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoManagerImpl.java @@ -0,0 +1,16 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.generated.GeneratedAccountInfoManagerImpl; + +/** + * The default implementation for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo} + * entity. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public final class AccountInfoManagerImpl +extends GeneratedAccountInfoManagerImpl +implements AccountInfoManager {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoSqlAdapter.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoSqlAdapter.java new file mode 100644 index 0000000..0eb7697 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/AccountInfoSqlAdapter.java @@ -0,0 +1,14 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.generated.GeneratedAccountInfoSqlAdapter; + +/** + * The SqlAdapter for every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo} + * entity. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public class AccountInfoSqlAdapter extends GeneratedAccountInfoSqlAdapter {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfo.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfo.java.md5 new file mode 100644 index 0000000..57a05e6 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfo.java.md5 @@ -0,0 +1 @@ +ebe4793b02b50ffca7d7de67e0c89074 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoImpl.java.md5 new file mode 100644 index 0000000..e3f3db3 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoImpl.java.md5 @@ -0,0 +1 @@ +ed8a31054e200369f6fd4d4124a1fdb5 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoManager.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoManager.java.md5 new file mode 100644 index 0000000..1a928f4 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoManager.java.md5 @@ -0,0 +1 @@ +02f9542f2f0d1e1e4b316eac13f7ac0e \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoManagerImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoManagerImpl.java.md5 new file mode 100644 index 0000000..c488e2f --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoManagerImpl.java.md5 @@ -0,0 +1 @@ +0315054bba83228353773bc0b9cb73d2 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoSqlAdapter.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoSqlAdapter.java.md5 new file mode 100644 index 0000000..9fbcc53 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/.speedment/.GeneratedAccountInfoSqlAdapter.java.md5 @@ -0,0 +1 @@ +67d5a5e30ca79a28d014cab4282b6443 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfo.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfo.java new file mode 100644 index 0000000..bd246d9 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfo.java @@ -0,0 +1,303 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.ColumnIdentifier; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.manager.Manager; +import com.speedment.runtime.core.util.OptionalUtil; +import com.speedment.runtime.field.ComparableField; +import com.speedment.runtime.field.ComparableForeignKeyField; +import com.speedment.runtime.field.LongForeignKeyField; +import com.speedment.runtime.field.StringField; +import com.speedment.runtime.typemapper.TypeMapper; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.Account; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType; + +import java.sql.Timestamp; +import java.util.Optional; +import java.util.UUID; + +/** + * The generated base for the {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo}-interface + * representing entities of the {@code account_info}-table in the database. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public interface GeneratedAccountInfo { + + /** + * This Field corresponds to the {@link AccountInfo} field that can be + * obtained using the {@link AccountInfo#getId()} method. + */ + ComparableField ID = ComparableField.create( + Identifier.ID, + AccountInfo::getId, + AccountInfo::setId, + TypeMapper.identity(), + true + ); + /** + * This Field corresponds to the {@link AccountInfo} field that can be + * obtained using the {@link AccountInfo#getAccountId()} method. + */ + ComparableForeignKeyField ACCOUNT_ID = ComparableForeignKeyField.create( + Identifier.ACCOUNT_ID, + AccountInfo::getAccountId, + AccountInfo::setAccountId, + Account.ID, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link AccountInfo} field that can be + * obtained using the {@link AccountInfo#getAccountInfoTypeId()} method. + */ + LongForeignKeyField ACCOUNT_INFO_TYPE_ID = LongForeignKeyField.create( + Identifier.ACCOUNT_INFO_TYPE_ID, + AccountInfo::getAccountInfoTypeId, + AccountInfo::setAccountInfoTypeId, + AccountInfoType.ID, + TypeMapper.primitive(), + false + ); + /** + * This Field corresponds to the {@link AccountInfo} field that can be + * obtained using the {@link AccountInfo#getValue()} method. + */ + StringField VALUE = StringField.create( + Identifier.VALUE, + AccountInfo::getValue, + AccountInfo::setValue, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link AccountInfo} field that can be + * obtained using the {@link AccountInfo#getCreatedAt()} method. + */ + ComparableField CREATED_AT = ComparableField.create( + Identifier.CREATED_AT, + o -> OptionalUtil.unwrap(o.getCreatedAt()), + AccountInfo::setCreatedAt, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link AccountInfo} field that can be + * obtained using the {@link AccountInfo#getUpdatedAt()} method. + */ + ComparableField UPDATED_AT = ComparableField.create( + Identifier.UPDATED_AT, + o -> OptionalUtil.unwrap(o.getUpdatedAt()), + AccountInfo::setUpdatedAt, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link AccountInfo} field that can be + * obtained using the {@link AccountInfo#getDeletedAt()} method. + */ + ComparableField DELETED_AT = ComparableField.create( + Identifier.DELETED_AT, + o -> OptionalUtil.unwrap(o.getDeletedAt()), + AccountInfo::setDeletedAt, + TypeMapper.identity(), + false + ); + + /** + * Returns the id of this AccountInfo. The id field corresponds to the + * database column alloc-test.public.account_info.id. + * + * @return the id of this AccountInfo + */ + UUID getId(); + + /** + * Returns the accountId of this AccountInfo. The accountId field + * corresponds to the database column + * alloc-test.public.account_info.account_id. + * + * @return the accountId of this AccountInfo + */ + UUID getAccountId(); + + /** + * Returns the accountInfoTypeId of this AccountInfo. The accountInfoTypeId + * field corresponds to the database column + * alloc-test.public.account_info.account_info_type_id. + * + * @return the accountInfoTypeId of this AccountInfo + */ + long getAccountInfoTypeId(); + + /** + * Returns the value of this AccountInfo. The value field corresponds to the + * database column alloc-test.public.account_info.value. + * + * @return the value of this AccountInfo + */ + String getValue(); + + /** + * Returns the createdAt of this AccountInfo. The createdAt field + * corresponds to the database column + * alloc-test.public.account_info.created_at. + * + * @return the createdAt of this AccountInfo + */ + Optional getCreatedAt(); + + /** + * Returns the updatedAt of this AccountInfo. The updatedAt field + * corresponds to the database column + * alloc-test.public.account_info.updated_at. + * + * @return the updatedAt of this AccountInfo + */ + Optional getUpdatedAt(); + + /** + * Returns the deletedAt of this AccountInfo. The deletedAt field + * corresponds to the database column + * alloc-test.public.account_info.deleted_at. + * + * @return the deletedAt of this AccountInfo + */ + Optional getDeletedAt(); + + /** + * Sets the id of this AccountInfo. The id field corresponds to the database + * column alloc-test.public.account_info.id. + * + * @param id to set of this AccountInfo + * @return this AccountInfo instance + */ + AccountInfo setId(UUID id); + + /** + * Sets the accountId of this AccountInfo. The accountId field corresponds + * to the database column alloc-test.public.account_info.account_id. + * + * @param accountId to set of this AccountInfo + * @return this AccountInfo instance + */ + AccountInfo setAccountId(UUID accountId); + + /** + * Sets the accountInfoTypeId of this AccountInfo. The accountInfoTypeId + * field corresponds to the database column + * alloc-test.public.account_info.account_info_type_id. + * + * @param accountInfoTypeId to set of this AccountInfo + * @return this AccountInfo instance + */ + AccountInfo setAccountInfoTypeId(long accountInfoTypeId); + + /** + * Sets the value of this AccountInfo. The value field corresponds to the + * database column alloc-test.public.account_info.value. + * + * @param value to set of this AccountInfo + * @return this AccountInfo instance + */ + AccountInfo setValue(String value); + + /** + * Sets the createdAt of this AccountInfo. The createdAt field corresponds + * to the database column alloc-test.public.account_info.created_at. + * + * @param createdAt to set of this AccountInfo + * @return this AccountInfo instance + */ + AccountInfo setCreatedAt(Timestamp createdAt); + + /** + * Sets the updatedAt of this AccountInfo. The updatedAt field corresponds + * to the database column alloc-test.public.account_info.updated_at. + * + * @param updatedAt to set of this AccountInfo + * @return this AccountInfo instance + */ + AccountInfo setUpdatedAt(Timestamp updatedAt); + + /** + * Sets the deletedAt of this AccountInfo. The deletedAt field corresponds + * to the database column alloc-test.public.account_info.deleted_at. + * + * @param deletedAt to set of this AccountInfo + * @return this AccountInfo instance + */ + AccountInfo setDeletedAt(Timestamp deletedAt); + + /** + * Queries the specified manager for the referenced Account. If no such + * Account exists, an {@code NullPointerException} will be thrown. + * + * @param foreignManager the manager to query for the entity + * @return the foreign entity referenced + */ + Account findAccountId(Manager foreignManager); + + /** + * Queries the specified manager for the referenced AccountInfoType. If no + * such AccountInfoType exists, an {@code NullPointerException} will be + * thrown. + * + * @param foreignManager the manager to query for the entity + * @return the foreign entity referenced + */ + AccountInfoType findAccountInfoTypeId(Manager foreignManager); + + enum Identifier implements ColumnIdentifier { + + ID ("id"), + ACCOUNT_ID ("account_id"), + ACCOUNT_INFO_TYPE_ID ("account_info_type_id"), + VALUE ("value"), + CREATED_AT ("created_at"), + UPDATED_AT ("updated_at"), + DELETED_AT ("deleted_at"); + + private final String columnId; + private final TableIdentifier tableIdentifier; + + Identifier(String columnId) { + this.columnId = columnId; + this.tableIdentifier = TableIdentifier.of( getDbmsId(), + getSchemaId(), + getTableId()); + } + + @Override + public String getDbmsId() { + return "alloc-test"; + } + + @Override + public String getSchemaId() { + return "public"; + } + + @Override + public String getTableId() { + return "account_info"; + } + + @Override + public String getColumnId() { + return this.columnId; + } + + @Override + public TableIdentifier asTableIdentifier() { + return this.tableIdentifier; + } + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoImpl.java new file mode 100644 index 0000000..19a350a --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoImpl.java @@ -0,0 +1,165 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.core.manager.Manager; +import com.speedment.runtime.core.util.OptionalUtil; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.Account; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType; + +import java.sql.Timestamp; +import java.util.Objects; +import java.util.Optional; +import java.util.StringJoiner; +import java.util.UUID; + +/** + * The generated base implementation of the {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo}-interface. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public abstract class GeneratedAccountInfoImpl implements AccountInfo { + + private UUID id; + private UUID accountId; + private long accountInfoTypeId; + private String value; + private Timestamp createdAt; + private Timestamp updatedAt; + private Timestamp deletedAt; + + protected GeneratedAccountInfoImpl() {} + + @Override + public UUID getId() { + return id; + } + + @Override + public UUID getAccountId() { + return accountId; + } + + @Override + public long getAccountInfoTypeId() { + return accountInfoTypeId; + } + + @Override + public String getValue() { + return value; + } + + @Override + public Optional getCreatedAt() { + return Optional.ofNullable(createdAt); + } + + @Override + public Optional getUpdatedAt() { + return Optional.ofNullable(updatedAt); + } + + @Override + public Optional getDeletedAt() { + return Optional.ofNullable(deletedAt); + } + + @Override + public AccountInfo setId(UUID id) { + this.id = id; + return this; + } + + @Override + public AccountInfo setAccountId(UUID accountId) { + this.accountId = accountId; + return this; + } + + @Override + public AccountInfo setAccountInfoTypeId(long accountInfoTypeId) { + this.accountInfoTypeId = accountInfoTypeId; + return this; + } + + @Override + public AccountInfo setValue(String value) { + this.value = value; + return this; + } + + @Override + public AccountInfo setCreatedAt(Timestamp createdAt) { + this.createdAt = createdAt; + return this; + } + + @Override + public AccountInfo setUpdatedAt(Timestamp updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + @Override + public AccountInfo setDeletedAt(Timestamp deletedAt) { + this.deletedAt = deletedAt; + return this; + } + + @Override + public Account findAccountId(Manager foreignManager) { + return foreignManager.stream().filter(Account.ID.equal(getAccountId())).findAny().orElse(null); + } + + @Override + public AccountInfoType findAccountInfoTypeId(Manager foreignManager) { + return foreignManager.stream().filter(AccountInfoType.ID.equal(getAccountInfoTypeId())).findAny().orElse(null); + } + + @Override + public String toString() { + final StringJoiner sj = new StringJoiner(", ", "{ ", " }"); + sj.add("id = " + Objects.toString(getId())); + sj.add("accountId = " + Objects.toString(getAccountId())); + sj.add("accountInfoTypeId = " + Objects.toString(getAccountInfoTypeId())); + sj.add("value = " + Objects.toString(getValue())); + sj.add("createdAt = " + Objects.toString(OptionalUtil.unwrap(getCreatedAt()))); + sj.add("updatedAt = " + Objects.toString(OptionalUtil.unwrap(getUpdatedAt()))); + sj.add("deletedAt = " + Objects.toString(OptionalUtil.unwrap(getDeletedAt()))); + return "AccountInfoImpl " + sj.toString(); + } + + @Override + public boolean equals(Object that) { + if (this == that) { return true; } + if (!(that instanceof AccountInfo)) { return false; } + final AccountInfo thatAccountInfo = (AccountInfo)that; + if (!Objects.equals(this.getId(), thatAccountInfo.getId())) { return false; } + if (!Objects.equals(this.getAccountId(), thatAccountInfo.getAccountId())) { return false; } + if (this.getAccountInfoTypeId() != thatAccountInfo.getAccountInfoTypeId()) { return false; } + if (!Objects.equals(this.getValue(), thatAccountInfo.getValue())) { return false; } + if (!Objects.equals(this.getCreatedAt(), thatAccountInfo.getCreatedAt())) { return false; } + if (!Objects.equals(this.getUpdatedAt(), thatAccountInfo.getUpdatedAt())) { return false; } + if (!Objects.equals(this.getDeletedAt(), thatAccountInfo.getDeletedAt())) { return false; } + return true; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 31 * hash + Objects.hashCode(getId()); + hash = 31 * hash + Objects.hashCode(getAccountId()); + hash = 31 * hash + Long.hashCode(getAccountInfoTypeId()); + hash = 31 * hash + Objects.hashCode(getValue()); + hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getCreatedAt())); + hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getUpdatedAt())); + hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getDeletedAt())); + return hash; + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoManager.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoManager.java new file mode 100644 index 0000000..34827ed --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoManager.java @@ -0,0 +1,42 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.manager.Manager; +import com.speedment.runtime.field.Field; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo; + +import java.util.List; + +import static java.util.Arrays.asList; +import static java.util.Collections.unmodifiableList; + +/** + * The generated base interface for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo} + * entity. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public interface GeneratedAccountInfoManager extends Manager { + + TableIdentifier IDENTIFIER = TableIdentifier.of("alloc-test", "public", "account_info"); + List> FIELDS = unmodifiableList(asList( + AccountInfo.ID, + AccountInfo.ACCOUNT_ID, + AccountInfo.ACCOUNT_INFO_TYPE_ID, + AccountInfo.VALUE, + AccountInfo.CREATED_AT, + AccountInfo.UPDATED_AT, + AccountInfo.DELETED_AT + )); + + @Override + default Class getEntityClass() { + return AccountInfo.class; + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoManagerImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoManagerImpl.java new file mode 100644 index 0000000..744a978 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoManagerImpl.java @@ -0,0 +1,55 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.manager.AbstractManager; +import com.speedment.runtime.field.Field; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfoImpl; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfoManager; + +import java.util.stream.Stream; + +/** + * The generated base implementation for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo} + * entity. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public abstract class GeneratedAccountInfoManagerImpl +extends AbstractManager +implements GeneratedAccountInfoManager { + + private final TableIdentifier tableIdentifier; + + protected GeneratedAccountInfoManagerImpl() { + this.tableIdentifier = TableIdentifier.of("alloc-test", "public", "account_info"); + } + + @Override + public AccountInfo create() { + return new AccountInfoImpl(); + } + + @Override + public TableIdentifier getTableIdentifier() { + return tableIdentifier; + } + + @Override + public Stream> fields() { + return AccountInfoManager.FIELDS.stream(); + } + + @Override + public Stream> primaryKeyFields() { + return Stream.of( + AccountInfo.ID + ); + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoSqlAdapter.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoSqlAdapter.java new file mode 100644 index 0000000..a0f0cbc --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info/generated/GeneratedAccountInfoSqlAdapter.java @@ -0,0 +1,65 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.component.SqlAdapter; +import com.speedment.runtime.core.db.SqlFunction; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfoImpl; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import static com.speedment.common.injector.State.RESOLVED; +import java.util.UUID; + +/** + * The generated Sql Adapter for a {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfo} + * entity. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public abstract class GeneratedAccountInfoSqlAdapter implements SqlAdapter { + + private final TableIdentifier tableIdentifier; + + protected GeneratedAccountInfoSqlAdapter() { + this.tableIdentifier = TableIdentifier.of("alloc-test", "public", "account_info"); + } + + protected AccountInfo apply(ResultSet resultSet, int offset) throws SQLException { + return createEntity() + .setId( UUID.fromString(resultSet.getString(1 + offset))) + .setAccountId( UUID.fromString(resultSet.getString(2 + offset))) + .setAccountInfoTypeId( resultSet.getLong(3 + offset)) + .setValue( resultSet.getString(4 + offset)) + .setCreatedAt( resultSet.getTimestamp(5 + offset)) + .setUpdatedAt( resultSet.getTimestamp(6 + offset)) + .setDeletedAt( resultSet.getTimestamp(7 + offset)) + ; + } + + protected AccountInfoImpl createEntity() { + return new AccountInfoImpl(); + } + + @Override + public TableIdentifier identifier() { + return tableIdentifier; + } + + @Override + public SqlFunction entityMapper() { + return entityMapper(0); + } + + @Override + public SqlFunction entityMapper(int offset) { + return rs -> apply(rs, offset); + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoType.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoType.java.md5 new file mode 100644 index 0000000..38bbd11 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoType.java.md5 @@ -0,0 +1 @@ +4ba357f34c6cfcc44440133a32f06910 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeImpl.java.md5 new file mode 100644 index 0000000..34e2984 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeImpl.java.md5 @@ -0,0 +1 @@ +b841843767360c24d16dfcf8326a0010 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeManager.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeManager.java.md5 new file mode 100644 index 0000000..625a5e7 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeManager.java.md5 @@ -0,0 +1 @@ +9fae88e52a53c0a4b5558be26fd7437b \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeManagerImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeManagerImpl.java.md5 new file mode 100644 index 0000000..b7bb83f --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeManagerImpl.java.md5 @@ -0,0 +1 @@ +faff1cda934769fe761ffd5da51b76fb \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeSqlAdapter.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeSqlAdapter.java.md5 new file mode 100644 index 0000000..d845f76 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/.speedment/.AccountInfoTypeSqlAdapter.java.md5 @@ -0,0 +1 @@ +b44219f30507f96428bd60d3417dd869 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoType.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoType.java new file mode 100644 index 0000000..32c0896 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoType.java @@ -0,0 +1,13 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.generated.GeneratedAccountInfoType; + +/** + * The main interface for entities of the {@code account_info_type}-table in the + * database. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public interface AccountInfoType extends GeneratedAccountInfoType {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeImpl.java new file mode 100644 index 0000000..bedcbe0 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeImpl.java @@ -0,0 +1,15 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.generated.GeneratedAccountInfoTypeImpl; + +/** + * The default implementation of the {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType}-interface. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public final class AccountInfoTypeImpl +extends GeneratedAccountInfoTypeImpl +implements AccountInfoType {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeManager.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeManager.java new file mode 100644 index 0000000..2075c8c --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeManager.java @@ -0,0 +1,14 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.generated.GeneratedAccountInfoTypeManager; + +/** + * The main interface for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType} + * entity. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public interface AccountInfoTypeManager extends GeneratedAccountInfoTypeManager {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeManagerImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeManagerImpl.java new file mode 100644 index 0000000..50302a1 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeManagerImpl.java @@ -0,0 +1,16 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.generated.GeneratedAccountInfoTypeManagerImpl; + +/** + * The default implementation for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType} + * entity. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public final class AccountInfoTypeManagerImpl +extends GeneratedAccountInfoTypeManagerImpl +implements AccountInfoTypeManager {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeSqlAdapter.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeSqlAdapter.java new file mode 100644 index 0000000..eb306f2 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/AccountInfoTypeSqlAdapter.java @@ -0,0 +1,14 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type; + +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.generated.GeneratedAccountInfoTypeSqlAdapter; + +/** + * The SqlAdapter for every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType} + * entity. + *

+ * This file is safe to edit. It will not be overwritten by the code generator. + * + * @author 2pm.tech + */ +public class AccountInfoTypeSqlAdapter extends GeneratedAccountInfoTypeSqlAdapter {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoType.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoType.java.md5 new file mode 100644 index 0000000..e874c72 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoType.java.md5 @@ -0,0 +1 @@ +716560f62b3daecc7519eb52c1c7aaaa \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeImpl.java.md5 new file mode 100644 index 0000000..86e730e --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeImpl.java.md5 @@ -0,0 +1 @@ +e7c4a93c72e0938dcde002af9b573570 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeManager.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeManager.java.md5 new file mode 100644 index 0000000..0cf7650 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeManager.java.md5 @@ -0,0 +1 @@ +976706c1bd09ecb6ccd06e0401b488a4 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeManagerImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeManagerImpl.java.md5 new file mode 100644 index 0000000..cd08b92 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeManagerImpl.java.md5 @@ -0,0 +1 @@ +9416ab43cfbd711e1b7a4629f04761f6 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeSqlAdapter.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeSqlAdapter.java.md5 new file mode 100644 index 0000000..725531d --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/.speedment/.GeneratedAccountInfoTypeSqlAdapter.java.md5 @@ -0,0 +1 @@ +ad2f35aa592bf85e882e7606eda6c42c \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoType.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoType.java new file mode 100644 index 0000000..83de94c --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoType.java @@ -0,0 +1,250 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.common.function.OptionalBoolean; +import com.speedment.runtime.config.identifier.ColumnIdentifier; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.util.OptionalUtil; +import com.speedment.runtime.field.ComparableField; +import com.speedment.runtime.field.LongField; +import com.speedment.runtime.field.StringField; +import com.speedment.runtime.typemapper.TypeMapper; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType; + +import java.sql.Timestamp; +import java.util.Optional; + +/** + * The generated base for the {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType}-interface + * representing entities of the {@code account_info_type}-table in the database. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public interface GeneratedAccountInfoType { + + /** + * This Field corresponds to the {@link AccountInfoType} field that can be + * obtained using the {@link AccountInfoType#getId()} method. + */ + LongField ID = LongField.create( + Identifier.ID, + AccountInfoType::getId, + AccountInfoType::setId, + TypeMapper.primitive(), + true + ); + /** + * This Field corresponds to the {@link AccountInfoType} field that can be + * obtained using the {@link AccountInfoType#getName()} method. + */ + StringField NAME = StringField.create( + Identifier.NAME, + AccountInfoType::getName, + AccountInfoType::setName, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link AccountInfoType} field that can be + * obtained using the {@link AccountInfoType#getEnabled()} method. + */ + ComparableField ENABLED = ComparableField.create( + Identifier.ENABLED, + o -> OptionalUtil.unwrap(o.getEnabled()), + AccountInfoType::setEnabled, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link AccountInfoType} field that can be + * obtained using the {@link AccountInfoType#getCreatedAt()} method. + */ + ComparableField CREATED_AT = ComparableField.create( + Identifier.CREATED_AT, + o -> OptionalUtil.unwrap(o.getCreatedAt()), + AccountInfoType::setCreatedAt, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link AccountInfoType} field that can be + * obtained using the {@link AccountInfoType#getUpdatedAt()} method. + */ + ComparableField UPDATED_AT = ComparableField.create( + Identifier.UPDATED_AT, + o -> OptionalUtil.unwrap(o.getUpdatedAt()), + AccountInfoType::setUpdatedAt, + TypeMapper.identity(), + false + ); + /** + * This Field corresponds to the {@link AccountInfoType} field that can be + * obtained using the {@link AccountInfoType#getDeletedAt()} method. + */ + ComparableField DELETED_AT = ComparableField.create( + Identifier.DELETED_AT, + o -> OptionalUtil.unwrap(o.getDeletedAt()), + AccountInfoType::setDeletedAt, + TypeMapper.identity(), + false + ); + + /** + * Returns the id of this AccountInfoType. The id field corresponds to the + * database column alloc-test.public.account_info_type.id. + * + * @return the id of this AccountInfoType + */ + long getId(); + + /** + * Returns the name of this AccountInfoType. The name field corresponds to + * the database column alloc-test.public.account_info_type.name. + * + * @return the name of this AccountInfoType + */ + String getName(); + + /** + * Returns the enabled of this AccountInfoType. The enabled field + * corresponds to the database column + * alloc-test.public.account_info_type.enabled. + * + * @return the enabled of this AccountInfoType + */ + OptionalBoolean getEnabled(); + + /** + * Returns the createdAt of this AccountInfoType. The createdAt field + * corresponds to the database column + * alloc-test.public.account_info_type.created_at. + * + * @return the createdAt of this AccountInfoType + */ + Optional getCreatedAt(); + + /** + * Returns the updatedAt of this AccountInfoType. The updatedAt field + * corresponds to the database column + * alloc-test.public.account_info_type.updated_at. + * + * @return the updatedAt of this AccountInfoType + */ + Optional getUpdatedAt(); + + /** + * Returns the deletedAt of this AccountInfoType. The deletedAt field + * corresponds to the database column + * alloc-test.public.account_info_type.deleted_at. + * + * @return the deletedAt of this AccountInfoType + */ + Optional getDeletedAt(); + + /** + * Sets the id of this AccountInfoType. The id field corresponds to the + * database column alloc-test.public.account_info_type.id. + * + * @param id to set of this AccountInfoType + * @return this AccountInfoType instance + */ + AccountInfoType setId(long id); + + /** + * Sets the name of this AccountInfoType. The name field corresponds to the + * database column alloc-test.public.account_info_type.name. + * + * @param name to set of this AccountInfoType + * @return this AccountInfoType instance + */ + AccountInfoType setName(String name); + + /** + * Sets the enabled of this AccountInfoType. The enabled field corresponds + * to the database column alloc-test.public.account_info_type.enabled. + * + * @param enabled to set of this AccountInfoType + * @return this AccountInfoType instance + */ + AccountInfoType setEnabled(Boolean enabled); + + /** + * Sets the createdAt of this AccountInfoType. The createdAt field + * corresponds to the database column + * alloc-test.public.account_info_type.created_at. + * + * @param createdAt to set of this AccountInfoType + * @return this AccountInfoType instance + */ + AccountInfoType setCreatedAt(Timestamp createdAt); + + /** + * Sets the updatedAt of this AccountInfoType. The updatedAt field + * corresponds to the database column + * alloc-test.public.account_info_type.updated_at. + * + * @param updatedAt to set of this AccountInfoType + * @return this AccountInfoType instance + */ + AccountInfoType setUpdatedAt(Timestamp updatedAt); + + /** + * Sets the deletedAt of this AccountInfoType. The deletedAt field + * corresponds to the database column + * alloc-test.public.account_info_type.deleted_at. + * + * @param deletedAt to set of this AccountInfoType + * @return this AccountInfoType instance + */ + AccountInfoType setDeletedAt(Timestamp deletedAt); + + enum Identifier implements ColumnIdentifier { + + ID ("id"), + NAME ("name"), + ENABLED ("enabled"), + CREATED_AT ("created_at"), + UPDATED_AT ("updated_at"), + DELETED_AT ("deleted_at"); + + private final String columnId; + private final TableIdentifier tableIdentifier; + + Identifier(String columnId) { + this.columnId = columnId; + this.tableIdentifier = TableIdentifier.of( getDbmsId(), + getSchemaId(), + getTableId()); + } + + @Override + public String getDbmsId() { + return "alloc-test"; + } + + @Override + public String getSchemaId() { + return "public"; + } + + @Override + public String getTableId() { + return "account_info_type"; + } + + @Override + public String getColumnId() { + return this.columnId; + } + + @Override + public TableIdentifier asTableIdentifier() { + return this.tableIdentifier; + } + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeImpl.java new file mode 100644 index 0000000..5805b15 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeImpl.java @@ -0,0 +1,137 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.common.function.OptionalBoolean; +import com.speedment.runtime.core.util.OptionalUtil; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType; + +import java.sql.Timestamp; +import java.util.Objects; +import java.util.Optional; +import java.util.StringJoiner; + +/** + * The generated base implementation of the {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType}-interface. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public abstract class GeneratedAccountInfoTypeImpl implements AccountInfoType { + + private long id; + private String name; + private Boolean enabled; + private Timestamp createdAt; + private Timestamp updatedAt; + private Timestamp deletedAt; + + protected GeneratedAccountInfoTypeImpl() {} + + @Override + public long getId() { + return id; + } + + @Override + public String getName() { + return name; + } + + @Override + public OptionalBoolean getEnabled() { + return OptionalUtil.ofNullable(enabled); + } + + @Override + public Optional getCreatedAt() { + return Optional.ofNullable(createdAt); + } + + @Override + public Optional getUpdatedAt() { + return Optional.ofNullable(updatedAt); + } + + @Override + public Optional getDeletedAt() { + return Optional.ofNullable(deletedAt); + } + + @Override + public AccountInfoType setId(long id) { + this.id = id; + return this; + } + + @Override + public AccountInfoType setName(String name) { + this.name = name; + return this; + } + + @Override + public AccountInfoType setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + @Override + public AccountInfoType setCreatedAt(Timestamp createdAt) { + this.createdAt = createdAt; + return this; + } + + @Override + public AccountInfoType setUpdatedAt(Timestamp updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + @Override + public AccountInfoType setDeletedAt(Timestamp deletedAt) { + this.deletedAt = deletedAt; + return this; + } + + @Override + public String toString() { + final StringJoiner sj = new StringJoiner(", ", "{ ", " }"); + sj.add("id = " + Objects.toString(getId())); + sj.add("name = " + Objects.toString(getName())); + sj.add("enabled = " + Objects.toString(OptionalUtil.unwrap(getEnabled()))); + sj.add("createdAt = " + Objects.toString(OptionalUtil.unwrap(getCreatedAt()))); + sj.add("updatedAt = " + Objects.toString(OptionalUtil.unwrap(getUpdatedAt()))); + sj.add("deletedAt = " + Objects.toString(OptionalUtil.unwrap(getDeletedAt()))); + return "AccountInfoTypeImpl " + sj.toString(); + } + + @Override + public boolean equals(Object that) { + if (this == that) { return true; } + if (!(that instanceof AccountInfoType)) { return false; } + final AccountInfoType thatAccountInfoType = (AccountInfoType)that; + if (this.getId() != thatAccountInfoType.getId()) { return false; } + if (!Objects.equals(this.getName(), thatAccountInfoType.getName())) { return false; } + if (!Objects.equals(this.getEnabled(), thatAccountInfoType.getEnabled())) { return false; } + if (!Objects.equals(this.getCreatedAt(), thatAccountInfoType.getCreatedAt())) { return false; } + if (!Objects.equals(this.getUpdatedAt(), thatAccountInfoType.getUpdatedAt())) { return false; } + if (!Objects.equals(this.getDeletedAt(), thatAccountInfoType.getDeletedAt())) { return false; } + return true; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 31 * hash + Long.hashCode(getId()); + hash = 31 * hash + Objects.hashCode(getName()); + hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getEnabled())); + hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getCreatedAt())); + hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getUpdatedAt())); + hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getDeletedAt())); + return hash; + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeManager.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeManager.java new file mode 100644 index 0000000..4afa8b7 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeManager.java @@ -0,0 +1,41 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.manager.Manager; +import com.speedment.runtime.field.Field; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType; + +import java.util.List; + +import static java.util.Arrays.asList; +import static java.util.Collections.unmodifiableList; + +/** + * The generated base interface for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType} + * entity. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public interface GeneratedAccountInfoTypeManager extends Manager { + + TableIdentifier IDENTIFIER = TableIdentifier.of("alloc-test", "public", "account_info_type"); + List> FIELDS = unmodifiableList(asList( + AccountInfoType.ID, + AccountInfoType.NAME, + AccountInfoType.ENABLED, + AccountInfoType.CREATED_AT, + AccountInfoType.UPDATED_AT, + AccountInfoType.DELETED_AT + )); + + @Override + default Class getEntityClass() { + return AccountInfoType.class; + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeManagerImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeManagerImpl.java new file mode 100644 index 0000000..38990e8 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeManagerImpl.java @@ -0,0 +1,55 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.manager.AbstractManager; +import com.speedment.runtime.field.Field; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoTypeImpl; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoTypeManager; + +import java.util.stream.Stream; + +/** + * The generated base implementation for the manager of every {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType} + * entity. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public abstract class GeneratedAccountInfoTypeManagerImpl +extends AbstractManager +implements GeneratedAccountInfoTypeManager { + + private final TableIdentifier tableIdentifier; + + protected GeneratedAccountInfoTypeManagerImpl() { + this.tableIdentifier = TableIdentifier.of("alloc-test", "public", "account_info_type"); + } + + @Override + public AccountInfoType create() { + return new AccountInfoTypeImpl(); + } + + @Override + public TableIdentifier getTableIdentifier() { + return tableIdentifier; + } + + @Override + public Stream> fields() { + return AccountInfoTypeManager.FIELDS.stream(); + } + + @Override + public Stream> primaryKeyFields() { + return Stream.of( + AccountInfoType.ID + ); + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeSqlAdapter.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeSqlAdapter.java new file mode 100644 index 0000000..039ebe1 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/alloc_test/public_/account_info_type/generated/GeneratedAccountInfoTypeSqlAdapter.java @@ -0,0 +1,64 @@ +package twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.config.identifier.TableIdentifier; +import com.speedment.runtime.core.component.SqlAdapter; +import com.speedment.runtime.core.db.SqlFunction; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoTypeImpl; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import static com.speedment.common.injector.State.RESOLVED; +import static com.speedment.runtime.core.util.ResultSetUtil.*; + +/** + * The generated Sql Adapter for a {@link + * twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoType} + * entity. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public abstract class GeneratedAccountInfoTypeSqlAdapter implements SqlAdapter { + + private final TableIdentifier tableIdentifier; + + protected GeneratedAccountInfoTypeSqlAdapter() { + this.tableIdentifier = TableIdentifier.of("alloc-test", "public", "account_info_type"); + } + + protected AccountInfoType apply(ResultSet resultSet, int offset) throws SQLException { + return createEntity() + .setId( resultSet.getLong(1 + offset)) + .setName( resultSet.getString(2 + offset)) + .setEnabled( getBoolean(resultSet, 3 + offset)) + .setCreatedAt( resultSet.getTimestamp(4 + offset)) + .setUpdatedAt( resultSet.getTimestamp(5 + offset)) + .setDeletedAt( resultSet.getTimestamp(6 + offset)) + ; + } + + protected AccountInfoTypeImpl createEntity() { + return new AccountInfoTypeImpl(); + } + + @Override + public TableIdentifier identifier() { + return tableIdentifier; + } + + @Override + public SqlFunction entityMapper() { + return entityMapper(0); + } + + @Override + public SqlFunction entityMapper(int offset) { + return rs -> apply(rs, offset); + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplication.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplication.java.md5 new file mode 100644 index 0000000..57f74fd --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplication.java.md5 @@ -0,0 +1 @@ +f2110fa55aea73dae88dab942d9954f7 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplicationBuilder.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplicationBuilder.java.md5 new file mode 100644 index 0000000..d37ad9e --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplicationBuilder.java.md5 @@ -0,0 +1 @@ +675f9e41eb0f46402f29c8455e4082db \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplicationImpl.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplicationImpl.java.md5 new file mode 100644 index 0000000..46d746c --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchApplicationImpl.java.md5 @@ -0,0 +1 @@ +cda683f295701b4b170fe9c10970f4a3 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchMetadata.java.md5 b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchMetadata.java.md5 new file mode 100644 index 0000000..5801b8f --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/.speedment/.GeneratedBenchMetadata.java.md5 @@ -0,0 +1 @@ +1e71552a7228b5676d3ba11c24b6ca78 \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplication.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplication.java new file mode 100644 index 0000000..6c3fa26 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplication.java @@ -0,0 +1,17 @@ +package twopm.tech.ormbench.speedment.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.core.Speedment; + +/** + * The generated {@link + * com.speedment.runtime.application.AbstractApplicationBuilder} application + * interface for the {@link com.speedment.runtime.config.Project} named public. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public interface GeneratedBenchApplication extends Speedment {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplicationBuilder.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplicationBuilder.java new file mode 100644 index 0000000..3bc10cd --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplicationBuilder.java @@ -0,0 +1,47 @@ +package twopm.tech.ormbench.speedment.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.common.injector.Injector; +import com.speedment.runtime.application.AbstractApplicationBuilder; +import com.speedment.runtime.connector.postgres.PostgresBundle; +import twopm.tech.ormbench.speedment.BenchApplication; +import twopm.tech.ormbench.speedment.BenchApplicationBuilder; +import twopm.tech.ormbench.speedment.BenchApplicationImpl; +import twopm.tech.ormbench.speedment.BenchInjectorProxy; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.AccountManagerImpl; +import twopm.tech.ormbench.speedment.alloc_test.public_.account.AccountSqlAdapter; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfoManagerImpl; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info.AccountInfoSqlAdapter; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoTypeManagerImpl; +import twopm.tech.ormbench.speedment.alloc_test.public_.account_info_type.AccountInfoTypeSqlAdapter; + +/** + * A generated base {@link + * com.speedment.runtime.application.AbstractApplicationBuilder} class for the + * {@link com.speedment.runtime.config.Project} named public. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public abstract class GeneratedBenchApplicationBuilder extends AbstractApplicationBuilder { + + protected GeneratedBenchApplicationBuilder() { + super(BenchApplicationImpl.class, GeneratedBenchMetadata.class); + withManager(AccountManagerImpl.class); + withManager(AccountInfoManagerImpl.class); + withManager(AccountInfoTypeManagerImpl.class); + withComponent(AccountSqlAdapter.class); + withComponent(AccountInfoSqlAdapter.class); + withComponent(AccountInfoTypeSqlAdapter.class); + withBundle(PostgresBundle.class); + withInjectorProxy(new BenchInjectorProxy()); + } + + @Override + public BenchApplication build(Injector injector) { + return injector.getOrThrow(BenchApplication.class); + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplicationImpl.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplicationImpl.java new file mode 100644 index 0000000..7af2f2e --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchApplicationImpl.java @@ -0,0 +1,19 @@ +package twopm.tech.ormbench.speedment.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.application.AbstractSpeedment; + +/** + * The generated {@link + * com.speedment.runtime.application.AbstractApplicationBuilder} implementation + * class for the {@link com.speedment.runtime.config.Project} named public. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public class GeneratedBenchApplicationImpl +extends AbstractSpeedment +implements GeneratedBenchApplication {} \ No newline at end of file diff --git a/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchMetadata.java b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchMetadata.java new file mode 100644 index 0000000..6419d87 --- /dev/null +++ b/modules/main-speedment/src/main/java/twopm/tech/ormbench/speedment/generated/GeneratedBenchMetadata.java @@ -0,0 +1,423 @@ +package twopm.tech.ormbench.speedment.generated; + +import com.speedment.common.annotation.GeneratedCode; +import com.speedment.runtime.application.AbstractApplicationMetadata; + +import java.util.Optional; +import java.util.stream.Stream; + +/** + * A {@link com.speedment.runtime.core.ApplicationMetadata} class for the {@link + * com.speedment.runtime.config.Project} named public. This class contains the + * meta data present at code generation time. + *

+ * This file has been automatically generated by Speedment. Any changes made to + * it will be overwritten. + * + * @author Speedment + */ +@GeneratedCode("Speedment") +public class GeneratedBenchMetadata extends AbstractApplicationMetadata { + + private static final String METADATA = init(); + + private static String init() { + final StringBuilder sb = new StringBuilder(); + initPart0(sb); + initPart1(sb); + initPart2(sb); + initPart3(sb); + return sb.toString(); + } + + @Override + protected Optional getMetadata() { + return Optional.of(METADATA); + } + + private static void initPart0(StringBuilder sb) { + Stream.of( + "{", + " \"config\" : {", + " \"appId\" : \"19bf361a-501a-40c0-bdca-fe63d4f07518\",", + " \"companyName\" : \"2pm.tech\",", + " \"dbmses\" : [", + " {", + " \"connectionUrl\" : \"jdbc:postgresql://127.0.0.1:6543/alloc-test\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"alloc-test\",", + " \"ipAddress\" : \"127.0.0.1\",", + " \"name\" : \"alloc-test\",", + " \"nameProtected\" : true,", + " \"port\" : 6543,", + " \"schemas\" : [", + " {", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"public\",", + " \"name\" : \"public\",", + " \"nameProtected\" : true,", + " \"tables\" : [", + " {", + " \"columns\" : [", + " {", + " \"databaseType\" : \"java.util.UUID\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"id\",", + " \"name\" : \"id\",", + " \"nullable\" : false,", + " \"ordinalPosition\" : 1", + " },", + " {", + " \"databaseType\" : \"java.lang.String\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"hash\",", + " \"name\" : \"hash\",", + " \"nullable\" : false,", + " \"ordinalPosition\" : 2", + " },", + " {", + " \"databaseType\" : \"java.lang.String\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"salt\",", + " \"name\" : \"salt\",", + " \"nullable\" : false,", + " \"ordinalPosition\" : 3", + " },", + " {", + " \"databaseType\" : \"java.sql.Timestamp\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"created_at\",", + " \"name\" : \"created_at\",", + " \"nullable\" : true,", + " \"ordinalPosition\" : 4", + " },", + " {", + " \"databaseType\" : \"java.sql.Timestamp\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"updated_at\",", + " \"name\" : \"updated_at\",", + " \"nullable\" : true,", + " \"ordinalPosition\" : 5", + " },", + " {", + " \"databaseType\" : \"java.sql.Timestamp\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"deleted_at\",", + " \"name\" : \"deleted_at\",", + " \"nullable\" : true,", + " \"ordinalPosition\" : 6", + " }", + " ],", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"account\",", + " \"indexes\" : [", + " {", + " \"enabled\" : true,", + " \"expanded\" : false,", + " \"id\" : \"account_pkey\",", + " \"indexColumns\" : [", + " {", + " \"expanded\" : true,", + " \"id\" : \"id\",", + " \"name\" : \"id\",", + " \"orderType\" : \"ASC\",", + " \"ordinalPosition\" : 1", + " }", + " ],", + " \"name\" : \"account_pkey\",", + " \"unique\" : true", + " }", + " ],", + " \"isView\" : false," + ).forEachOrdered(sb::append); + } + + private static void initPart1(StringBuilder sb) { + Stream.of( + " \"name\" : \"account\",", + " \"nameProtected\" : true,", + " \"primaryKeyColumns\" : [", + " {", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"id\",", + " \"name\" : \"id\",", + " \"ordinalPosition\" : 1", + " }", + " ]", + " },", + " {", + " \"columns\" : [", + " {", + " \"autoIncrement\" : false,", + " \"databaseType\" : \"java.util.UUID\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"id\",", + " \"name\" : \"id\",", + " \"nameProtected\" : true,", + " \"nullable\" : false,", + " \"nullableImplementation\" : \"OPTIONAL\",", + " \"ordinalPosition\" : 1", + " },", + " {", + " \"databaseType\" : \"java.util.UUID\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"account_id\",", + " \"name\" : \"account_id\",", + " \"nullable\" : false,", + " \"ordinalPosition\" : 2", + " },", + " {", + " \"databaseType\" : \"java.lang.Long\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"account_info_type_id\",", + " \"name\" : \"account_info_type_id\",", + " \"nullable\" : false,", + " \"ordinalPosition\" : 3,", + " \"typeMapper\" : \"com.speedment.runtime.typemapper.primitive.PrimitiveTypeMapper\"", + " },", + " {", + " \"databaseType\" : \"java.lang.String\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"value\",", + " \"name\" : \"value\",", + " \"nullable\" : false,", + " \"ordinalPosition\" : 4", + " },", + " {", + " \"databaseType\" : \"java.sql.Timestamp\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"created_at\",", + " \"name\" : \"created_at\",", + " \"nullable\" : true,", + " \"ordinalPosition\" : 5", + " },", + " {", + " \"databaseType\" : \"java.sql.Timestamp\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"updated_at\",", + " \"name\" : \"updated_at\",", + " \"nullable\" : true,", + " \"ordinalPosition\" : 6", + " },", + " {", + " \"databaseType\" : \"java.sql.Timestamp\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"deleted_at\",", + " \"name\" : \"deleted_at\",", + " \"nullable\" : true,", + " \"ordinalPosition\" : 7", + " }", + " ],", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"foreignKeys\" : [", + " {", + " \"enabled\" : true,", + " \"expanded\" : false,", + " \"foreignKeyColumns\" : [", + " {", + " \"expanded\" : true,", + " \"foreignColumnName\" : \"id\",", + " \"foreignDatabaseName\" : \"alloc-test\",", + " \"foreignSchemaName\" : \"public\",", + " \"foreignTableName\" : \"account\",", + " \"id\" : \"account_id\",", + " \"name\" : \"account_id\",", + " \"ordinalPosition\" : 1", + " }", + " ],", + " \"id\" : \"fk_account_info_2_account\"," + ).forEachOrdered(sb::append); + } + + private static void initPart2(StringBuilder sb) { + Stream.of( + " \"name\" : \"fk_account_info_2_account\"", + " },", + " {", + " \"enabled\" : true,", + " \"expanded\" : false,", + " \"foreignKeyColumns\" : [", + " {", + " \"expanded\" : true,", + " \"foreignColumnName\" : \"id\",", + " \"foreignDatabaseName\" : \"alloc-test\",", + " \"foreignSchemaName\" : \"public\",", + " \"foreignTableName\" : \"account_info_type\",", + " \"id\" : \"account_info_type_id\",", + " \"name\" : \"account_info_type_id\",", + " \"ordinalPosition\" : 1", + " }", + " ],", + " \"id\" : \"fk_account_info_type_2_account\",", + " \"name\" : \"fk_account_info_type_2_account\"", + " }", + " ],", + " \"id\" : \"account_info\",", + " \"indexes\" : [", + " {", + " \"enabled\" : true,", + " \"expanded\" : false,", + " \"id\" : \"account_info_pkey\",", + " \"indexColumns\" : [", + " {", + " \"expanded\" : true,", + " \"id\" : \"id\",", + " \"name\" : \"id\",", + " \"orderType\" : \"ASC\",", + " \"ordinalPosition\" : 1", + " }", + " ],", + " \"name\" : \"account_info_pkey\",", + " \"nameProtected\" : true,", + " \"unique\" : true", + " }", + " ],", + " \"isView\" : false,", + " \"name\" : \"account_info\",", + " \"primaryKeyColumns\" : [", + " {", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"id\",", + " \"name\" : \"id\",", + " \"ordinalPosition\" : 1", + " }", + " ]", + " },", + " {", + " \"columns\" : [", + " {", + " \"autoIncrement\" : true,", + " \"databaseType\" : \"java.lang.Long\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"id\",", + " \"name\" : \"id\",", + " \"nameProtected\" : true,", + " \"nullable\" : false,", + " \"nullableImplementation\" : \"OPTIONAL\",", + " \"ordinalPosition\" : 1,", + " \"typeMapper\" : \"com.speedment.runtime.typemapper.primitive.PrimitiveTypeMapper\"", + " },", + " {", + " \"databaseType\" : \"java.lang.String\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"name\",", + " \"name\" : \"name\",", + " \"nullable\" : false,", + " \"ordinalPosition\" : 2", + " },", + " {", + " \"databaseType\" : \"java.lang.Boolean\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"enabled\",", + " \"name\" : \"enabled\",", + " \"nullable\" : true,", + " \"ordinalPosition\" : 3", + " },", + " {", + " \"databaseType\" : \"java.sql.Timestamp\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"created_at\",", + " \"name\" : \"created_at\",", + " \"nullable\" : true,", + " \"ordinalPosition\" : 4", + " },", + " {", + " \"databaseType\" : \"java.sql.Timestamp\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"updated_at\",", + " \"name\" : \"updated_at\"," + ).forEachOrdered(sb::append); + } + + private static void initPart3(StringBuilder sb) { + Stream.of( + " \"nullable\" : true,", + " \"ordinalPosition\" : 5", + " },", + " {", + " \"databaseType\" : \"java.sql.Timestamp\",", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"deleted_at\",", + " \"name\" : \"deleted_at\",", + " \"nullable\" : true,", + " \"ordinalPosition\" : 6", + " }", + " ],", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"account_info_type\",", + " \"indexes\" : [", + " {", + " \"enabled\" : true,", + " \"expanded\" : false,", + " \"id\" : \"account_info_type_pkey\",", + " \"indexColumns\" : [", + " {", + " \"expanded\" : true,", + " \"id\" : \"id\",", + " \"name\" : \"id\",", + " \"orderType\" : \"ASC\",", + " \"ordinalPosition\" : 1", + " }", + " ],", + " \"name\" : \"account_info_type_pkey\",", + " \"unique\" : true", + " }", + " ],", + " \"isView\" : false,", + " \"name\" : \"account_info_type\",", + " \"primaryKeyColumns\" : [", + " {", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"id\",", + " \"name\" : \"id\",", + " \"ordinalPosition\" : 1", + " }", + " ]", + " }", + " ]", + " }", + " ],", + " \"typeName\" : \"PostgreSQL\",", + " \"username\" : \"alloc-test\"", + " }", + " ],", + " \"enabled\" : true,", + " \"expanded\" : true,", + " \"id\" : \"public\",", + " \"name\" : \"bench\",", + " \"nameProtected\" : false,", + " \"packageLocation\" : \"src/main/java/\",", + " \"packageName\" : \"twopm.tech.ormbench.speedment\",", + " \"speedmentVersion\" : \"Speedment:3.2.6\"", + " }", + "}" + ).forEachOrdered(sb::append); + } +} \ No newline at end of file diff --git a/modules/main-speedment/src/main/json/speedment.json b/modules/main-speedment/src/main/json/speedment.json new file mode 100644 index 0000000..694e510 --- /dev/null +++ b/modules/main-speedment/src/main/json/speedment.json @@ -0,0 +1,366 @@ +{ + "config" : { + "speedmentVersion" : "Speedment:3.2.6", + "nameProtected" : false, + "expanded" : true, + "appId" : "19bf361a-501a-40c0-bdca-fe63d4f07518", + "companyName" : "2pm.tech", + "name" : "bench", + "packageLocation" : "src/main/java/", + "id" : "public", + "packageName" : "twopm.tech.ormbench.speedment", + "dbmses" : [ + { + "nameProtected" : true, + "expanded" : true, + "port" : 6543, + "schemas" : [ + { + "nameProtected" : true, + "expanded" : true, + "tables" : [ + { + "nameProtected" : true, + "expanded" : true, + "primaryKeyColumns" : [ + { + "expanded" : true, + "name" : "id", + "id" : "id", + "ordinalPosition" : 1, + "enabled" : true + } + ], + "indexes" : [ + { + "expanded" : false, + "unique" : true, + "name" : "account_pkey", + "indexColumns" : [ + { + "orderType" : "ASC", + "expanded" : true, + "name" : "id", + "id" : "id", + "ordinalPosition" : 1 + } + ], + "id" : "account_pkey", + "enabled" : true + } + ], + "isView" : false, + "columns" : [ + { + "databaseType" : "java.util.UUID", + "expanded" : true, + "nullable" : false, + "name" : "id", + "id" : "id", + "ordinalPosition" : 1, + "enabled" : true + }, + { + "databaseType" : "java.lang.String", + "expanded" : true, + "nullable" : false, + "name" : "hash", + "id" : "hash", + "ordinalPosition" : 2, + "enabled" : true + }, + { + "databaseType" : "java.lang.String", + "expanded" : true, + "nullable" : false, + "name" : "salt", + "id" : "salt", + "ordinalPosition" : 3, + "enabled" : true + }, + { + "databaseType" : "java.sql.Timestamp", + "expanded" : true, + "nullable" : true, + "name" : "created_at", + "id" : "created_at", + "ordinalPosition" : 4, + "enabled" : true + }, + { + "databaseType" : "java.sql.Timestamp", + "expanded" : true, + "nullable" : true, + "name" : "updated_at", + "id" : "updated_at", + "ordinalPosition" : 5, + "enabled" : true + }, + { + "databaseType" : "java.sql.Timestamp", + "expanded" : true, + "nullable" : true, + "name" : "deleted_at", + "id" : "deleted_at", + "ordinalPosition" : 6, + "enabled" : true + } + ], + "name" : "account", + "id" : "account", + "enabled" : true + }, + { + "expanded" : true, + "foreignKeys" : [ + { + "expanded" : false, + "foreignKeyColumns" : [ + { + "foreignDatabaseName" : "alloc-test", + "foreignSchemaName" : "public", + "expanded" : true, + "name" : "account_id", + "foreignColumnName" : "id", + "id" : "account_id", + "foreignTableName" : "account", + "ordinalPosition" : 1 + } + ], + "name" : "fk_account_info_2_account", + "id" : "fk_account_info_2_account", + "enabled" : true + }, + { + "expanded" : false, + "foreignKeyColumns" : [ + { + "foreignDatabaseName" : "alloc-test", + "foreignSchemaName" : "public", + "expanded" : true, + "name" : "account_info_type_id", + "foreignColumnName" : "id", + "id" : "account_info_type_id", + "foreignTableName" : "account_info_type", + "ordinalPosition" : 1 + } + ], + "name" : "fk_account_info_type_2_account", + "id" : "fk_account_info_type_2_account", + "enabled" : true + } + ], + "primaryKeyColumns" : [ + { + "expanded" : true, + "name" : "id", + "id" : "id", + "ordinalPosition" : 1, + "enabled" : true + } + ], + "indexes" : [ + { + "nameProtected" : true, + "expanded" : false, + "unique" : true, + "name" : "account_info_pkey", + "indexColumns" : [ + { + "orderType" : "ASC", + "expanded" : true, + "name" : "id", + "id" : "id", + "ordinalPosition" : 1 + } + ], + "id" : "account_info_pkey", + "enabled" : true + } + ], + "isView" : false, + "columns" : [ + { + "databaseType" : "java.util.UUID", + "nameProtected" : true, + "expanded" : true, + "nullable" : false, + "autoIncrement" : false, + "name" : "id", + "nullableImplementation" : "OPTIONAL", + "id" : "id", + "ordinalPosition" : 1, + "enabled" : true + }, + { + "databaseType" : "java.util.UUID", + "expanded" : true, + "nullable" : false, + "name" : "account_id", + "id" : "account_id", + "ordinalPosition" : 2, + "enabled" : true + }, + { + "databaseType" : "java.lang.Long", + "expanded" : true, + "typeMapper" : "com.speedment.runtime.typemapper.primitive.PrimitiveTypeMapper", + "nullable" : false, + "name" : "account_info_type_id", + "id" : "account_info_type_id", + "ordinalPosition" : 3, + "enabled" : true + }, + { + "databaseType" : "java.lang.String", + "expanded" : true, + "nullable" : false, + "name" : "value", + "id" : "value", + "ordinalPosition" : 4, + "enabled" : true + }, + { + "databaseType" : "java.sql.Timestamp", + "expanded" : true, + "nullable" : true, + "name" : "created_at", + "id" : "created_at", + "ordinalPosition" : 5, + "enabled" : true + }, + { + "databaseType" : "java.sql.Timestamp", + "expanded" : true, + "nullable" : true, + "name" : "updated_at", + "id" : "updated_at", + "ordinalPosition" : 6, + "enabled" : true + }, + { + "databaseType" : "java.sql.Timestamp", + "expanded" : true, + "nullable" : true, + "name" : "deleted_at", + "id" : "deleted_at", + "ordinalPosition" : 7, + "enabled" : true + } + ], + "name" : "account_info", + "id" : "account_info", + "enabled" : true + }, + { + "expanded" : true, + "primaryKeyColumns" : [ + { + "expanded" : true, + "name" : "id", + "id" : "id", + "ordinalPosition" : 1, + "enabled" : true + } + ], + "indexes" : [ + { + "expanded" : false, + "unique" : true, + "name" : "account_info_type_pkey", + "indexColumns" : [ + { + "orderType" : "ASC", + "expanded" : true, + "name" : "id", + "id" : "id", + "ordinalPosition" : 1 + } + ], + "id" : "account_info_type_pkey", + "enabled" : true + } + ], + "isView" : false, + "columns" : [ + { + "databaseType" : "java.lang.Long", + "nameProtected" : true, + "expanded" : true, + "typeMapper" : "com.speedment.runtime.typemapper.primitive.PrimitiveTypeMapper", + "nullable" : false, + "autoIncrement" : true, + "name" : "id", + "nullableImplementation" : "OPTIONAL", + "id" : "id", + "ordinalPosition" : 1, + "enabled" : true + }, + { + "databaseType" : "java.lang.String", + "expanded" : true, + "nullable" : false, + "name" : "name", + "id" : "name", + "ordinalPosition" : 2, + "enabled" : true + }, + { + "databaseType" : "java.lang.Boolean", + "expanded" : true, + "nullable" : true, + "name" : "enabled", + "id" : "enabled", + "ordinalPosition" : 3, + "enabled" : true + }, + { + "databaseType" : "java.sql.Timestamp", + "expanded" : true, + "nullable" : true, + "name" : "created_at", + "id" : "created_at", + "ordinalPosition" : 4, + "enabled" : true + }, + { + "databaseType" : "java.sql.Timestamp", + "expanded" : true, + "nullable" : true, + "name" : "updated_at", + "id" : "updated_at", + "ordinalPosition" : 5, + "enabled" : true + }, + { + "databaseType" : "java.sql.Timestamp", + "expanded" : true, + "nullable" : true, + "name" : "deleted_at", + "id" : "deleted_at", + "ordinalPosition" : 6, + "enabled" : true + } + ], + "name" : "account_info_type", + "id" : "account_info_type", + "enabled" : true + } + ], + "name" : "public", + "id" : "public", + "enabled" : true + } + ], + "typeName" : "PostgreSQL", + "ipAddress" : "127.0.0.1", + "name" : "alloc-test", + "connectionUrl" : "jdbc:postgresql://127.0.0.1:6543/alloc-test", + "id" : "alloc-test", + "enabled" : true, + "username" : "alloc-test" + } + ], + "enabled" : true + } +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 478bf10..d7816e8 100644 --- a/pom.xml +++ b/pom.xml @@ -7,6 +7,9 @@ pom modules/vertx-postgresql-reactive + modules/main-jooq + + modules/main-speedment 11 diff --git a/readme.md b/readme.md index 50f5c9f..3841e53 100644 --- a/readme.md +++ b/readme.md @@ -54,27 +54,42 @@ Good to see if: ## Requests plan -- search - - random get by id - - find by integer equals - - find by string equals - - find by date equals - - find by integer more X & less Y - - find by float more X & less Y - - find by date after X & before Y - + - random by id (single) + - by criteria (batch) ## Documentation analysis -**MyBatis** out of competitions, due to ass-whipping-xml notation. +- **MyBatis** - out of competitions, due to ass-whipping-xml notation. + +## Initial project setup analysis + +- **speedment** - cool-looking streaming API, but it's way of from common SQL-like syntax & failes to work with UUID columns corectly, also they wanna' our money, dude if we need something not straightly mapped. Out of competition. +- **jOOQ** - enterprise style peace of ..., but still in. +- + +- [Apache Cayenne](https://github.com/apache/cayenne) +- [Ebean](https://github.com/ebean-orm/ebean) +- [ORMLite Core](https://github.com/j256/ormlite-core) +- [EclipseLink](https://github.com/eclipse-ee4j/eclipselink) +- [Querydsl](https://github.com/querydsl/querydsl) +- [Hibernate](https://github.com/hibernate/hibernate-orm) (as JPA representative - zero mark) diff --git a/sql/00-setup.sql b/sql/00-setup.sql new file mode 100644 index 0000000..c380b8e --- /dev/null +++ b/sql/00-setup.sql @@ -0,0 +1,38 @@ +CREATE TABLE account ( + id uuid DEFAULT gen_random_uuid(), + hash varchar(64) NOT NULL, + salt varchar(16) NOT NULL, + created_at timestamp default NULL, + updated_at timestamp default NULL, + deleted_at timestamp default NULL, + PRIMARY KEY(id) +); + +CREATE TABLE account_info_type ( + id BIGSERIAL, + name varchar(255) NOT NULL, + enabled boolean default false, + created_at timestamp default NULL, + updated_at timestamp default NULL, + deleted_at timestamp default NULL, + PRIMARY KEY(id) +); + +CREATE TABLE account_info ( + id uuid DEFAULT gen_random_uuid(), + account_id uuid NOT NULL, + account_info_type_id bigint NOT NULL, + value varchar(255) NOT NULL, + created_at timestamp default NULL, + updated_at timestamp default NULL, + deleted_at timestamp default NULL, + CONSTRAINT fk_account_info_2_account + FOREIGN KEY(account_id) + REFERENCES account(id) + ON DELETE CASCADE, + CONSTRAINT fk_account_info_type_2_account + FOREIGN KEY(account_info_type_id) + REFERENCES account_info_type(id) + ON DELETE CASCADE, + PRIMARY KEY(id) +); \ No newline at end of file