Drop 101 - initial projet setup tests for Jooq & Speedment.
parent
97a42861b2
commit
a5ce73138f
@ -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
|
||||||
|
|
||||||
@ -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
|
||||||
|
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>twopm.tech.orm-bench</groupId>
|
||||||
|
<artifactId>bom</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<artifactId>main-jooq</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jooq</groupId>
|
||||||
|
<artifactId>jooq</artifactId>
|
||||||
|
<version>3.15.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jooq</groupId>
|
||||||
|
<artifactId>jooq-meta</artifactId>
|
||||||
|
<version>3.15.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jooq</groupId>
|
||||||
|
<artifactId>jooq-codegen</artifactId>
|
||||||
|
<version>3.15.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>42.3.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jooq</groupId>
|
||||||
|
<artifactId>jooq-codegen-maven</artifactId>
|
||||||
|
<version>3.15.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>generate</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>42.3.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<configuration>
|
||||||
|
<jdbc>
|
||||||
|
<driver>org.postgresql.Driver</driver>
|
||||||
|
<url>jdbc:postgresql://localhost:6543/alloc-test</url>
|
||||||
|
<user>alloc-test</user>
|
||||||
|
<password>alloc-test</password>
|
||||||
|
</jdbc>
|
||||||
|
<generator>
|
||||||
|
<database>
|
||||||
|
<name>org.jooq.meta.postgres.PostgresDatabase</name>
|
||||||
|
<includes>.*</includes>
|
||||||
|
<excludes></excludes>
|
||||||
|
<inputSchema>public</inputSchema>
|
||||||
|
</database>
|
||||||
|
<target>
|
||||||
|
<packageName>twopm.tech.ormbench.jooq</packageName>
|
||||||
|
<directory>src/main/java</directory>
|
||||||
|
</target>
|
||||||
|
</generator>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@ -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<Record> result = dsl.select().from(ACCOUNT).fetch();
|
||||||
|
for (Iterator<Record> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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 <code>DEFAULT_CATALOG</code>
|
||||||
|
*/
|
||||||
|
public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The schema <code>public</code>.
|
||||||
|
*/
|
||||||
|
public final Public PUBLIC = Public.PUBLIC;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* No further instances allowed
|
||||||
|
*/
|
||||||
|
private DefaultCatalog() {
|
||||||
|
super("");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final List<Schema> getSchemas() {
|
||||||
|
return Arrays.asList(
|
||||||
|
Public.PUBLIC
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<AccountRecord> ACCOUNT_PKEY = Internal.createUniqueKey(Account.ACCOUNT, DSL.name("account_pkey"), new TableField[] { Account.ACCOUNT.ID }, true);
|
||||||
|
public static final UniqueKey<AccountInfoRecord> ACCOUNT_INFO_PKEY = Internal.createUniqueKey(AccountInfo.ACCOUNT_INFO, DSL.name("account_info_pkey"), new TableField[] { AccountInfo.ACCOUNT_INFO.ID }, true);
|
||||||
|
public static final UniqueKey<AccountInfoTypeRecord> 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<AccountInfoRecord, AccountRecord> 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<AccountInfoRecord, AccountInfoTypeRecord> 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);
|
||||||
|
}
|
||||||
@ -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 <code>public</code>
|
||||||
|
*/
|
||||||
|
public static final Public PUBLIC = new Public();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>public.account</code>.
|
||||||
|
*/
|
||||||
|
public final Account ACCOUNT = Account.ACCOUNT;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>public.account_info</code>.
|
||||||
|
*/
|
||||||
|
public final AccountInfo ACCOUNT_INFO = AccountInfo.ACCOUNT_INFO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>public.account_info_type</code>.
|
||||||
|
*/
|
||||||
|
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<Table<?>> getTables() {
|
||||||
|
return Arrays.asList(
|
||||||
|
Account.ACCOUNT,
|
||||||
|
AccountInfo.ACCOUNT_INFO,
|
||||||
|
AccountInfoType.ACCOUNT_INFO_TYPE
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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 <code>public.account</code>.
|
||||||
|
*/
|
||||||
|
public static final Account ACCOUNT = Account.ACCOUNT;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>public.account_info</code>.
|
||||||
|
*/
|
||||||
|
public static final AccountInfo ACCOUNT_INFO = AccountInfo.ACCOUNT_INFO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>public.account_info_type</code>.
|
||||||
|
*/
|
||||||
|
public static final AccountInfoType ACCOUNT_INFO_TYPE = AccountInfoType.ACCOUNT_INFO_TYPE;
|
||||||
|
}
|
||||||
@ -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<AccountRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>public.account</code>
|
||||||
|
*/
|
||||||
|
public static final Account ACCOUNT = new Account();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<AccountRecord> getRecordType() {
|
||||||
|
return AccountRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account.id</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountRecord, UUID> ID = createField(DSL.name("id"), SQLDataType.UUID.nullable(false).defaultValue(DSL.field("gen_random_uuid()", SQLDataType.UUID)), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account.hash</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountRecord, String> HASH = createField(DSL.name("hash"), SQLDataType.VARCHAR(64).nullable(false), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account.salt</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountRecord, String> SALT = createField(DSL.name("salt"), SQLDataType.VARCHAR(16).nullable(false), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account.created_at</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountRecord, LocalDateTime> CREATED_AT = createField(DSL.name("created_at"), SQLDataType.LOCALDATETIME(6), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account.updated_at</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountRecord, LocalDateTime> UPDATED_AT = createField(DSL.name("updated_at"), SQLDataType.LOCALDATETIME(6), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account.deleted_at</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountRecord, LocalDateTime> DELETED_AT = createField(DSL.name("deleted_at"), SQLDataType.LOCALDATETIME(6), this, "");
|
||||||
|
|
||||||
|
private Account(Name alias, Table<AccountRecord> aliased) {
|
||||||
|
this(alias, aliased, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Account(Name alias, Table<AccountRecord> aliased, Field<?>[] parameters) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>public.account</code> table reference
|
||||||
|
*/
|
||||||
|
public Account(String alias) {
|
||||||
|
this(DSL.name(alias), ACCOUNT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>public.account</code> table reference
|
||||||
|
*/
|
||||||
|
public Account(Name alias) {
|
||||||
|
this(alias, ACCOUNT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>public.account</code> table reference
|
||||||
|
*/
|
||||||
|
public Account() {
|
||||||
|
this(DSL.name("account"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public <O extends Record> Account(Table<O> child, ForeignKey<O, AccountRecord> key) {
|
||||||
|
super(child, key, ACCOUNT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : Public.PUBLIC;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UniqueKey<AccountRecord> 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<UUID, String, String, LocalDateTime, LocalDateTime, LocalDateTime> fieldsRow() {
|
||||||
|
return (Row6) super.fieldsRow();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<AccountInfoRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>public.account_info</code>
|
||||||
|
*/
|
||||||
|
public static final AccountInfo ACCOUNT_INFO = new AccountInfo();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<AccountInfoRecord> getRecordType() {
|
||||||
|
return AccountInfoRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info.id</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoRecord, UUID> ID = createField(DSL.name("id"), SQLDataType.UUID.nullable(false).defaultValue(DSL.field("gen_random_uuid()", SQLDataType.UUID)), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info.account_id</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoRecord, UUID> ACCOUNT_ID = createField(DSL.name("account_id"), SQLDataType.UUID.nullable(false), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info.account_info_type_id</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoRecord, Long> ACCOUNT_INFO_TYPE_ID = createField(DSL.name("account_info_type_id"), SQLDataType.BIGINT.nullable(false), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info.value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoRecord, String> VALUE = createField(DSL.name("value"), SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info.created_at</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoRecord, LocalDateTime> CREATED_AT = createField(DSL.name("created_at"), SQLDataType.LOCALDATETIME(6), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info.updated_at</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoRecord, LocalDateTime> UPDATED_AT = createField(DSL.name("updated_at"), SQLDataType.LOCALDATETIME(6), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info.deleted_at</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoRecord, LocalDateTime> DELETED_AT = createField(DSL.name("deleted_at"), SQLDataType.LOCALDATETIME(6), this, "");
|
||||||
|
|
||||||
|
private AccountInfo(Name alias, Table<AccountInfoRecord> aliased) {
|
||||||
|
this(alias, aliased, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private AccountInfo(Name alias, Table<AccountInfoRecord> aliased, Field<?>[] parameters) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>public.account_info</code> table reference
|
||||||
|
*/
|
||||||
|
public AccountInfo(String alias) {
|
||||||
|
this(DSL.name(alias), ACCOUNT_INFO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>public.account_info</code> table reference
|
||||||
|
*/
|
||||||
|
public AccountInfo(Name alias) {
|
||||||
|
this(alias, ACCOUNT_INFO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>public.account_info</code> table reference
|
||||||
|
*/
|
||||||
|
public AccountInfo() {
|
||||||
|
this(DSL.name("account_info"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public <O extends Record> AccountInfo(Table<O> child, ForeignKey<O, AccountInfoRecord> key) {
|
||||||
|
super(child, key, ACCOUNT_INFO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : Public.PUBLIC;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UniqueKey<AccountInfoRecord> getPrimaryKey() {
|
||||||
|
return Keys.ACCOUNT_INFO_PKEY;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ForeignKey<AccountInfoRecord, ?>> 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<UUID, UUID, Long, String, LocalDateTime, LocalDateTime, LocalDateTime> fieldsRow() {
|
||||||
|
return (Row7) super.fieldsRow();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<AccountInfoTypeRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>public.account_info_type</code>
|
||||||
|
*/
|
||||||
|
public static final AccountInfoType ACCOUNT_INFO_TYPE = new AccountInfoType();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<AccountInfoTypeRecord> getRecordType() {
|
||||||
|
return AccountInfoTypeRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info_type.id</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoTypeRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info_type.name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoTypeRecord, String> NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info_type.enabled</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoTypeRecord, Boolean> ENABLED = createField(DSL.name("enabled"), SQLDataType.BOOLEAN.defaultValue(DSL.field("false", SQLDataType.BOOLEAN)), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info_type.created_at</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoTypeRecord, LocalDateTime> CREATED_AT = createField(DSL.name("created_at"), SQLDataType.LOCALDATETIME(6), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info_type.updated_at</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoTypeRecord, LocalDateTime> UPDATED_AT = createField(DSL.name("updated_at"), SQLDataType.LOCALDATETIME(6), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>public.account_info_type.deleted_at</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AccountInfoTypeRecord, LocalDateTime> DELETED_AT = createField(DSL.name("deleted_at"), SQLDataType.LOCALDATETIME(6), this, "");
|
||||||
|
|
||||||
|
private AccountInfoType(Name alias, Table<AccountInfoTypeRecord> aliased) {
|
||||||
|
this(alias, aliased, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private AccountInfoType(Name alias, Table<AccountInfoTypeRecord> aliased, Field<?>[] parameters) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>public.account_info_type</code> table reference
|
||||||
|
*/
|
||||||
|
public AccountInfoType(String alias) {
|
||||||
|
this(DSL.name(alias), ACCOUNT_INFO_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>public.account_info_type</code> table reference
|
||||||
|
*/
|
||||||
|
public AccountInfoType(Name alias) {
|
||||||
|
this(alias, ACCOUNT_INFO_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>public.account_info_type</code> table reference
|
||||||
|
*/
|
||||||
|
public AccountInfoType() {
|
||||||
|
this(DSL.name("account_info_type"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public <O extends Record> AccountInfoType(Table<O> child, ForeignKey<O, AccountInfoTypeRecord> key) {
|
||||||
|
super(child, key, ACCOUNT_INFO_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : Public.PUBLIC;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Identity<AccountInfoTypeRecord, Integer> getIdentity() {
|
||||||
|
return (Identity<AccountInfoTypeRecord, Integer>) super.getIdentity();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UniqueKey<AccountInfoTypeRecord> 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<Integer, String, Boolean, LocalDateTime, LocalDateTime, LocalDateTime> fieldsRow() {
|
||||||
|
return (Row6) super.fieldsRow();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<AccountInfoRecord> implements Record7<UUID, UUID, Long, String, LocalDateTime, LocalDateTime, LocalDateTime> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info.id</code>.
|
||||||
|
*/
|
||||||
|
public void setId(UUID value) {
|
||||||
|
set(0, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info.id</code>.
|
||||||
|
*/
|
||||||
|
public UUID getId() {
|
||||||
|
return (UUID) get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info.account_id</code>.
|
||||||
|
*/
|
||||||
|
public void setAccountId(UUID value) {
|
||||||
|
set(1, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info.account_id</code>.
|
||||||
|
*/
|
||||||
|
public UUID getAccountId() {
|
||||||
|
return (UUID) get(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info.account_info_type_id</code>.
|
||||||
|
*/
|
||||||
|
public void setAccountInfoTypeId(Long value) {
|
||||||
|
set(2, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info.account_info_type_id</code>.
|
||||||
|
*/
|
||||||
|
public Long getAccountInfoTypeId() {
|
||||||
|
return (Long) get(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info.value</code>.
|
||||||
|
*/
|
||||||
|
public void setValue(String value) {
|
||||||
|
set(3, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info.value</code>.
|
||||||
|
*/
|
||||||
|
public String getValue() {
|
||||||
|
return (String) get(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info.created_at</code>.
|
||||||
|
*/
|
||||||
|
public void setCreatedAt(LocalDateTime value) {
|
||||||
|
set(4, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info.created_at</code>.
|
||||||
|
*/
|
||||||
|
public LocalDateTime getCreatedAt() {
|
||||||
|
return (LocalDateTime) get(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info.updated_at</code>.
|
||||||
|
*/
|
||||||
|
public void setUpdatedAt(LocalDateTime value) {
|
||||||
|
set(5, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info.updated_at</code>.
|
||||||
|
*/
|
||||||
|
public LocalDateTime getUpdatedAt() {
|
||||||
|
return (LocalDateTime) get(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info.deleted_at</code>.
|
||||||
|
*/
|
||||||
|
public void setDeletedAt(LocalDateTime value) {
|
||||||
|
set(6, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info.deleted_at</code>.
|
||||||
|
*/
|
||||||
|
public LocalDateTime getDeletedAt() {
|
||||||
|
return (LocalDateTime) get(6);
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Primary key information
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Record1<UUID> key() {
|
||||||
|
return (Record1) super.key();
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Record7 type implementation
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Row7<UUID, UUID, Long, String, LocalDateTime, LocalDateTime, LocalDateTime> fieldsRow() {
|
||||||
|
return (Row7) super.fieldsRow();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Row7<UUID, UUID, Long, String, LocalDateTime, LocalDateTime, LocalDateTime> valuesRow() {
|
||||||
|
return (Row7) super.valuesRow();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<UUID> field1() {
|
||||||
|
return AccountInfo.ACCOUNT_INFO.ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<UUID> field2() {
|
||||||
|
return AccountInfo.ACCOUNT_INFO.ACCOUNT_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<Long> field3() {
|
||||||
|
return AccountInfo.ACCOUNT_INFO.ACCOUNT_INFO_TYPE_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<String> field4() {
|
||||||
|
return AccountInfo.ACCOUNT_INFO.VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<LocalDateTime> field5() {
|
||||||
|
return AccountInfo.ACCOUNT_INFO.CREATED_AT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<LocalDateTime> field6() {
|
||||||
|
return AccountInfo.ACCOUNT_INFO.UPDATED_AT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<LocalDateTime> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<AccountInfoTypeRecord> implements Record6<Integer, String, Boolean, LocalDateTime, LocalDateTime, LocalDateTime> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info_type.id</code>.
|
||||||
|
*/
|
||||||
|
public void setId(Integer value) {
|
||||||
|
set(0, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info_type.id</code>.
|
||||||
|
*/
|
||||||
|
public Integer getId() {
|
||||||
|
return (Integer) get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info_type.name</code>.
|
||||||
|
*/
|
||||||
|
public void setName(String value) {
|
||||||
|
set(1, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info_type.name</code>.
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return (String) get(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info_type.enabled</code>.
|
||||||
|
*/
|
||||||
|
public void setEnabled(Boolean value) {
|
||||||
|
set(2, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info_type.enabled</code>.
|
||||||
|
*/
|
||||||
|
public Boolean getEnabled() {
|
||||||
|
return (Boolean) get(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info_type.created_at</code>.
|
||||||
|
*/
|
||||||
|
public void setCreatedAt(LocalDateTime value) {
|
||||||
|
set(3, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info_type.created_at</code>.
|
||||||
|
*/
|
||||||
|
public LocalDateTime getCreatedAt() {
|
||||||
|
return (LocalDateTime) get(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info_type.updated_at</code>.
|
||||||
|
*/
|
||||||
|
public void setUpdatedAt(LocalDateTime value) {
|
||||||
|
set(4, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info_type.updated_at</code>.
|
||||||
|
*/
|
||||||
|
public LocalDateTime getUpdatedAt() {
|
||||||
|
return (LocalDateTime) get(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account_info_type.deleted_at</code>.
|
||||||
|
*/
|
||||||
|
public void setDeletedAt(LocalDateTime value) {
|
||||||
|
set(5, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account_info_type.deleted_at</code>.
|
||||||
|
*/
|
||||||
|
public LocalDateTime getDeletedAt() {
|
||||||
|
return (LocalDateTime) get(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Primary key information
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Record1<Integer> key() {
|
||||||
|
return (Record1) super.key();
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Record6 type implementation
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Row6<Integer, String, Boolean, LocalDateTime, LocalDateTime, LocalDateTime> fieldsRow() {
|
||||||
|
return (Row6) super.fieldsRow();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Row6<Integer, String, Boolean, LocalDateTime, LocalDateTime, LocalDateTime> valuesRow() {
|
||||||
|
return (Row6) super.valuesRow();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<Integer> field1() {
|
||||||
|
return AccountInfoType.ACCOUNT_INFO_TYPE.ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<String> field2() {
|
||||||
|
return AccountInfoType.ACCOUNT_INFO_TYPE.NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<Boolean> field3() {
|
||||||
|
return AccountInfoType.ACCOUNT_INFO_TYPE.ENABLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<LocalDateTime> field4() {
|
||||||
|
return AccountInfoType.ACCOUNT_INFO_TYPE.CREATED_AT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<LocalDateTime> field5() {
|
||||||
|
return AccountInfoType.ACCOUNT_INFO_TYPE.UPDATED_AT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<LocalDateTime> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<AccountRecord> implements Record6<UUID, String, String, LocalDateTime, LocalDateTime, LocalDateTime> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account.id</code>.
|
||||||
|
*/
|
||||||
|
public void setId(UUID value) {
|
||||||
|
set(0, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account.id</code>.
|
||||||
|
*/
|
||||||
|
public UUID getId() {
|
||||||
|
return (UUID) get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account.hash</code>.
|
||||||
|
*/
|
||||||
|
public void setHash(String value) {
|
||||||
|
set(1, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account.hash</code>.
|
||||||
|
*/
|
||||||
|
public String getHash() {
|
||||||
|
return (String) get(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account.salt</code>.
|
||||||
|
*/
|
||||||
|
public void setSalt(String value) {
|
||||||
|
set(2, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account.salt</code>.
|
||||||
|
*/
|
||||||
|
public String getSalt() {
|
||||||
|
return (String) get(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account.created_at</code>.
|
||||||
|
*/
|
||||||
|
public void setCreatedAt(LocalDateTime value) {
|
||||||
|
set(3, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account.created_at</code>.
|
||||||
|
*/
|
||||||
|
public LocalDateTime getCreatedAt() {
|
||||||
|
return (LocalDateTime) get(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account.updated_at</code>.
|
||||||
|
*/
|
||||||
|
public void setUpdatedAt(LocalDateTime value) {
|
||||||
|
set(4, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account.updated_at</code>.
|
||||||
|
*/
|
||||||
|
public LocalDateTime getUpdatedAt() {
|
||||||
|
return (LocalDateTime) get(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for <code>public.account.deleted_at</code>.
|
||||||
|
*/
|
||||||
|
public void setDeletedAt(LocalDateTime value) {
|
||||||
|
set(5, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for <code>public.account.deleted_at</code>.
|
||||||
|
*/
|
||||||
|
public LocalDateTime getDeletedAt() {
|
||||||
|
return (LocalDateTime) get(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Primary key information
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Record1<UUID> key() {
|
||||||
|
return (Record1) super.key();
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Record6 type implementation
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Row6<UUID, String, String, LocalDateTime, LocalDateTime, LocalDateTime> fieldsRow() {
|
||||||
|
return (Row6) super.fieldsRow();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Row6<UUID, String, String, LocalDateTime, LocalDateTime, LocalDateTime> valuesRow() {
|
||||||
|
return (Row6) super.valuesRow();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<UUID> field1() {
|
||||||
|
return Account.ACCOUNT.ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<String> field2() {
|
||||||
|
return Account.ACCOUNT.HASH;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<String> field3() {
|
||||||
|
return Account.ACCOUNT.SALT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<LocalDateTime> field4() {
|
||||||
|
return Account.ACCOUNT.CREATED_AT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<LocalDateTime> field5() {
|
||||||
|
return Account.ACCOUNT.UPDATED_AT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Field<LocalDateTime> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>twopm.tech.orm-bench</groupId>
|
||||||
|
<artifactId>bom</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>main-speedment</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>11</maven.compiler.source>
|
||||||
|
<maven.compiler.target>11</maven.compiler.target>
|
||||||
|
<postgresql.version>42.2.9</postgresql.version>
|
||||||
|
<speedment.version>3.2.6</speedment.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>${postgresql.version}</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.speedment</groupId>
|
||||||
|
<artifactId>runtime</artifactId>
|
||||||
|
<version>${speedment.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.speedment.plugins</groupId>
|
||||||
|
<artifactId>json-stream</artifactId>
|
||||||
|
<version>${speedment.version}</version>
|
||||||
|
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.speedment</groupId>
|
||||||
|
<artifactId>speedment-maven-plugin</artifactId>
|
||||||
|
<version>${speedment.version}</version>
|
||||||
|
|
||||||
|
<configuration>
|
||||||
|
<components>
|
||||||
|
<component>com.speedment.plugins.enums.EnumGeneratorBundle</component>
|
||||||
|
</components>
|
||||||
|
<appName>${project.artifactId}</appName>
|
||||||
|
<packageName>${project.groupId}</packageName>
|
||||||
|
</configuration>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>${postgresql.version}</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
|
||||||
|
<version>3.8.1</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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<Account> get = app.get(Account.class);
|
||||||
|
|
||||||
|
|
||||||
|
app.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
1a3d3b446676bdbf7346acf48e7ae6c4
|
||||||
@ -0,0 +1 @@
|
|||||||
|
89ecb77bcffc1da75467e6b6b486f805
|
||||||
@ -0,0 +1 @@
|
|||||||
|
3115d4d9b071f865deeea4536d0409b0
|
||||||
@ -0,0 +1 @@
|
|||||||
|
9fa97222f8fd7632d74179e523bd9eb3
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public interface BenchApplication extends GeneratedBenchApplication {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public final class BenchApplicationBuilder extends GeneratedBenchApplicationBuilder {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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 {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* An InjectorProxy is used to reduce the required number of {@code exports} in
|
||||||
|
* the module-info.java file for a Speedment project
|
||||||
|
* <p>
|
||||||
|
* 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> T newInstance(Constructor<T> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
c93ffffbe6473520dd3f4c9d856743cf
|
||||||
@ -0,0 +1 @@
|
|||||||
|
b8b1b1b32c435aa045b5c0d6b2a350d7
|
||||||
@ -0,0 +1 @@
|
|||||||
|
412ec53a1e3f388a0ac88b60d3742799
|
||||||
@ -0,0 +1 @@
|
|||||||
|
0f6be8668fb895ebb4efd76f01963aaa
|
||||||
@ -0,0 +1 @@
|
|||||||
|
e8f37f4aac254c49cc6bba36008582a1
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public interface Account extends GeneratedAccount {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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 {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public interface AccountManager extends GeneratedAccountManager {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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 {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public class AccountSqlAdapter extends GeneratedAccountSqlAdapter {}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
d1dbe4aa43fba6c27eb5eeecd2185cd1
|
||||||
@ -0,0 +1 @@
|
|||||||
|
eed7324e6143d48544d015e14ff1ede2
|
||||||
@ -0,0 +1 @@
|
|||||||
|
3f6778cdb50bb02b22596e0724c10891
|
||||||
@ -0,0 +1 @@
|
|||||||
|
12bd268f0a5bd9c76e49ab2318392f54
|
||||||
@ -0,0 +1 @@
|
|||||||
|
a5439f1e8e7d00c890403e3095894231
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<Account, UUID, UUID> 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<Account, String> 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<Account, String> 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<Account, Timestamp, Timestamp> 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<Account, Timestamp, Timestamp> 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<Account, Timestamp, Timestamp> 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<Timestamp> 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<Timestamp> 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<Timestamp> 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<Account> {
|
||||||
|
|
||||||
|
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<Account> 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<Account> asTableIdentifier() {
|
||||||
|
return this.tableIdentifier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<Timestamp> getCreatedAt() {
|
||||||
|
return Optional.ofNullable(createdAt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<Timestamp> getUpdatedAt() {
|
||||||
|
return Optional.ofNullable(updatedAt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<Timestamp> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<Account> {
|
||||||
|
|
||||||
|
TableIdentifier<Account> IDENTIFIER = TableIdentifier.of("alloc-test", "public", "account");
|
||||||
|
List<Field<Account>> FIELDS = unmodifiableList(asList(
|
||||||
|
Account.ID,
|
||||||
|
Account.HASH,
|
||||||
|
Account.SALT,
|
||||||
|
Account.CREATED_AT,
|
||||||
|
Account.UPDATED_AT,
|
||||||
|
Account.DELETED_AT
|
||||||
|
));
|
||||||
|
|
||||||
|
@Override
|
||||||
|
default Class<Account> getEntityClass() {
|
||||||
|
return Account.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<Account>
|
||||||
|
implements GeneratedAccountManager {
|
||||||
|
|
||||||
|
private final TableIdentifier<Account> tableIdentifier;
|
||||||
|
|
||||||
|
protected GeneratedAccountManagerImpl() {
|
||||||
|
this.tableIdentifier = TableIdentifier.of("alloc-test", "public", "account");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Account create() {
|
||||||
|
return new AccountImpl();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableIdentifier<Account> getTableIdentifier() {
|
||||||
|
return tableIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Stream<Field<Account>> fields() {
|
||||||
|
return AccountManager.FIELDS.stream();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Stream<Field<Account>> primaryKeyFields() {
|
||||||
|
return Stream.of(
|
||||||
|
Account.ID
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<Account> {
|
||||||
|
|
||||||
|
private final TableIdentifier<Account> 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<Account> identifier() {
|
||||||
|
return tableIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlFunction<ResultSet, Account> entityMapper() {
|
||||||
|
return entityMapper(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlFunction<ResultSet, Account> entityMapper(int offset) {
|
||||||
|
return rs -> apply(rs, offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
3fd37aa31c0c2aca4853c61f9d1ae9a6
|
||||||
@ -0,0 +1 @@
|
|||||||
|
e65b6305ef9a92ff7bcb5c6ebf110653
|
||||||
@ -0,0 +1 @@
|
|||||||
|
19452f23e4ef405b15fe0ac95c8b7554
|
||||||
@ -0,0 +1 @@
|
|||||||
|
5f35eb8bfc265e30f16a7e18b355d397
|
||||||
@ -0,0 +1 @@
|
|||||||
|
70c40c6f57faf427ac2c22ab117eb612
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public interface AccountInfo extends GeneratedAccountInfo {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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 {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public interface AccountInfoManager extends GeneratedAccountInfoManager {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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 {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public class AccountInfoSqlAdapter extends GeneratedAccountInfoSqlAdapter {}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ebe4793b02b50ffca7d7de67e0c89074
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ed8a31054e200369f6fd4d4124a1fdb5
|
||||||
@ -0,0 +1 @@
|
|||||||
|
02f9542f2f0d1e1e4b316eac13f7ac0e
|
||||||
@ -0,0 +1 @@
|
|||||||
|
0315054bba83228353773bc0b9cb73d2
|
||||||
@ -0,0 +1 @@
|
|||||||
|
67d5a5e30ca79a28d014cab4282b6443
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<AccountInfo, UUID, UUID> 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<AccountInfo, UUID, UUID, Account> 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<AccountInfo, Long, AccountInfoType> 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<AccountInfo, String> 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<AccountInfo, Timestamp, Timestamp> 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<AccountInfo, Timestamp, Timestamp> 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<AccountInfo, Timestamp, Timestamp> 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<Timestamp> 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<Timestamp> 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<Timestamp> 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<Account> 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<AccountInfoType> foreignManager);
|
||||||
|
|
||||||
|
enum Identifier implements ColumnIdentifier<AccountInfo> {
|
||||||
|
|
||||||
|
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<AccountInfo> 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<AccountInfo> asTableIdentifier() {
|
||||||
|
return this.tableIdentifier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<Timestamp> getCreatedAt() {
|
||||||
|
return Optional.ofNullable(createdAt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<Timestamp> getUpdatedAt() {
|
||||||
|
return Optional.ofNullable(updatedAt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<Timestamp> 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<Account> foreignManager) {
|
||||||
|
return foreignManager.stream().filter(Account.ID.equal(getAccountId())).findAny().orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AccountInfoType findAccountInfoTypeId(Manager<AccountInfoType> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<AccountInfo> {
|
||||||
|
|
||||||
|
TableIdentifier<AccountInfo> IDENTIFIER = TableIdentifier.of("alloc-test", "public", "account_info");
|
||||||
|
List<Field<AccountInfo>> 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<AccountInfo> getEntityClass() {
|
||||||
|
return AccountInfo.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<AccountInfo>
|
||||||
|
implements GeneratedAccountInfoManager {
|
||||||
|
|
||||||
|
private final TableIdentifier<AccountInfo> tableIdentifier;
|
||||||
|
|
||||||
|
protected GeneratedAccountInfoManagerImpl() {
|
||||||
|
this.tableIdentifier = TableIdentifier.of("alloc-test", "public", "account_info");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AccountInfo create() {
|
||||||
|
return new AccountInfoImpl();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableIdentifier<AccountInfo> getTableIdentifier() {
|
||||||
|
return tableIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Stream<Field<AccountInfo>> fields() {
|
||||||
|
return AccountInfoManager.FIELDS.stream();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Stream<Field<AccountInfo>> primaryKeyFields() {
|
||||||
|
return Stream.of(
|
||||||
|
AccountInfo.ID
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<AccountInfo> {
|
||||||
|
|
||||||
|
private final TableIdentifier<AccountInfo> 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<AccountInfo> identifier() {
|
||||||
|
return tableIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlFunction<ResultSet, AccountInfo> entityMapper() {
|
||||||
|
return entityMapper(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlFunction<ResultSet, AccountInfo> entityMapper(int offset) {
|
||||||
|
return rs -> apply(rs, offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
4ba357f34c6cfcc44440133a32f06910
|
||||||
@ -0,0 +1 @@
|
|||||||
|
b841843767360c24d16dfcf8326a0010
|
||||||
@ -0,0 +1 @@
|
|||||||
|
9fae88e52a53c0a4b5558be26fd7437b
|
||||||
@ -0,0 +1 @@
|
|||||||
|
faff1cda934769fe761ffd5da51b76fb
|
||||||
@ -0,0 +1 @@
|
|||||||
|
b44219f30507f96428bd60d3417dd869
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public interface AccountInfoType extends GeneratedAccountInfoType {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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 {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public interface AccountInfoTypeManager extends GeneratedAccountInfoTypeManager {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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 {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* This file is safe to edit. It will not be overwritten by the code generator.
|
||||||
|
*
|
||||||
|
* @author 2pm.tech
|
||||||
|
*/
|
||||||
|
public class AccountInfoTypeSqlAdapter extends GeneratedAccountInfoTypeSqlAdapter {}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
716560f62b3daecc7519eb52c1c7aaaa
|
||||||
@ -0,0 +1 @@
|
|||||||
|
e7c4a93c72e0938dcde002af9b573570
|
||||||
@ -0,0 +1 @@
|
|||||||
|
976706c1bd09ecb6ccd06e0401b488a4
|
||||||
@ -0,0 +1 @@
|
|||||||
|
9416ab43cfbd711e1b7a4629f04761f6
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ad2f35aa592bf85e882e7606eda6c42c
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<AccountInfoType, Long> 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<AccountInfoType, String> 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<AccountInfoType, Boolean, Boolean> 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<AccountInfoType, Timestamp, Timestamp> 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<AccountInfoType, Timestamp, Timestamp> 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<AccountInfoType, Timestamp, Timestamp> 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<Timestamp> 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<Timestamp> 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<Timestamp> 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<AccountInfoType> {
|
||||||
|
|
||||||
|
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<AccountInfoType> 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<AccountInfoType> asTableIdentifier() {
|
||||||
|
return this.tableIdentifier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<Timestamp> getCreatedAt() {
|
||||||
|
return Optional.ofNullable(createdAt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<Timestamp> getUpdatedAt() {
|
||||||
|
return Optional.ofNullable(updatedAt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<Timestamp> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<AccountInfoType> {
|
||||||
|
|
||||||
|
TableIdentifier<AccountInfoType> IDENTIFIER = TableIdentifier.of("alloc-test", "public", "account_info_type");
|
||||||
|
List<Field<AccountInfoType>> FIELDS = unmodifiableList(asList(
|
||||||
|
AccountInfoType.ID,
|
||||||
|
AccountInfoType.NAME,
|
||||||
|
AccountInfoType.ENABLED,
|
||||||
|
AccountInfoType.CREATED_AT,
|
||||||
|
AccountInfoType.UPDATED_AT,
|
||||||
|
AccountInfoType.DELETED_AT
|
||||||
|
));
|
||||||
|
|
||||||
|
@Override
|
||||||
|
default Class<AccountInfoType> getEntityClass() {
|
||||||
|
return AccountInfoType.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<AccountInfoType>
|
||||||
|
implements GeneratedAccountInfoTypeManager {
|
||||||
|
|
||||||
|
private final TableIdentifier<AccountInfoType> tableIdentifier;
|
||||||
|
|
||||||
|
protected GeneratedAccountInfoTypeManagerImpl() {
|
||||||
|
this.tableIdentifier = TableIdentifier.of("alloc-test", "public", "account_info_type");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AccountInfoType create() {
|
||||||
|
return new AccountInfoTypeImpl();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableIdentifier<AccountInfoType> getTableIdentifier() {
|
||||||
|
return tableIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Stream<Field<AccountInfoType>> fields() {
|
||||||
|
return AccountInfoTypeManager.FIELDS.stream();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Stream<Field<AccountInfoType>> primaryKeyFields() {
|
||||||
|
return Stream.of(
|
||||||
|
AccountInfoType.ID
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<AccountInfoType> {
|
||||||
|
|
||||||
|
private final TableIdentifier<AccountInfoType> 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<AccountInfoType> identifier() {
|
||||||
|
return tableIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlFunction<ResultSet, AccountInfoType> entityMapper() {
|
||||||
|
return entityMapper(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlFunction<ResultSet, AccountInfoType> entityMapper(int offset) {
|
||||||
|
return rs -> apply(rs, offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
f2110fa55aea73dae88dab942d9954f7
|
||||||
@ -0,0 +1 @@
|
|||||||
|
675f9e41eb0f46402f29c8455e4082db
|
||||||
@ -0,0 +1 @@
|
|||||||
|
cda683f295701b4b170fe9c10970f4a3
|
||||||
@ -0,0 +1 @@
|
|||||||
|
1e71552a7228b5676d3ba11c24b6ca78
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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 {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<BenchApplication, BenchApplicationBuilder> {
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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 {}
|
||||||
@ -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.
|
||||||
|
* <p>
|
||||||
|
* 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<String> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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)
|
||||||
|
);
|
||||||
Loading…
Reference in New Issue