Bans.java
/*
* This file is generated by jOOQ.
*/
package com.io7m.idstore.database.postgres.internal.tables;
import com.io7m.idstore.database.postgres.internal.DefaultSchema;
import com.io7m.idstore.database.postgres.internal.Keys;
import com.io7m.idstore.database.postgres.internal.tables.records.BansRecord;
import java.time.OffsetDateTime;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.function.Function;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Function3;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Records;
import org.jooq.Row3;
import org.jooq.Schema;
import org.jooq.SelectField;
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;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Bans extends TableImpl<BansRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>BANS</code>
*/
public static final Bans BANS = new Bans();
/**
* The class holding records for this type
*/
@Override
public Class<BansRecord> getRecordType() {
return BansRecord.class;
}
/**
* The column <code>BANS.USER_ID</code>.
*/
public final TableField<BansRecord, UUID> USER_ID = createField(DSL.name("USER_ID"), SQLDataType.UUID.nullable(false), this, "");
/**
* The column <code>BANS.REASON</code>.
*/
public final TableField<BansRecord, String> REASON = createField(DSL.name("REASON"), SQLDataType.VARCHAR(1000000).nullable(false), this, "");
/**
* The column <code>BANS.EXPIRES</code>.
*/
public final TableField<BansRecord, OffsetDateTime> EXPIRES = createField(DSL.name("EXPIRES"), SQLDataType.TIMESTAMPWITHTIMEZONE(6), this, "");
private Bans(Name alias, Table<BansRecord> aliased) {
this(alias, aliased, null);
}
private Bans(Name alias, Table<BansRecord> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
}
/**
* Create an aliased <code>BANS</code> table reference
*/
public Bans(String alias) {
this(DSL.name(alias), BANS);
}
/**
* Create an aliased <code>BANS</code> table reference
*/
public Bans(Name alias) {
this(alias, BANS);
}
/**
* Create a <code>BANS</code> table reference
*/
public Bans() {
this(DSL.name("BANS"), null);
}
public <O extends Record> Bans(Table<O> child, ForeignKey<O, BansRecord> key) {
super(child, key, BANS);
}
@Override
public Schema getSchema() {
return aliased() ? null : DefaultSchema.DEFAULT_SCHEMA;
}
@Override
public UniqueKey<BansRecord> getPrimaryKey() {
return Keys.CONSTRAINT_1E;
}
@Override
public List<ForeignKey<BansRecord, ?>> getReferences() {
return Arrays.asList(Keys.CONSTRAINT_1EF);
}
private transient UserIds _userIds;
/**
* Get the implicit join path to the <code>PUBLIC.USER_IDS</code> table.
*/
public UserIds userIds() {
if (_userIds == null)
_userIds = new UserIds(this, Keys.CONSTRAINT_1EF);
return _userIds;
}
@Override
public Bans as(String alias) {
return new Bans(DSL.name(alias), this);
}
@Override
public Bans as(Name alias) {
return new Bans(alias, this);
}
@Override
public Bans as(Table<?> alias) {
return new Bans(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public Bans rename(String name) {
return new Bans(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public Bans rename(Name name) {
return new Bans(name, null);
}
/**
* Rename this table
*/
@Override
public Bans rename(Table<?> name) {
return new Bans(name.getQualifiedName(), null);
}
// -------------------------------------------------------------------------
// Row3 type methods
// -------------------------------------------------------------------------
@Override
public Row3<UUID, String, OffsetDateTime> fieldsRow() {
return (Row3) super.fieldsRow();
}
/**
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
*/
public <U> SelectField<U> mapping(Function3<? super UUID, ? super String, ? super OffsetDateTime, ? extends U> from) {
return convertFrom(Records.mapping(from));
}
/**
* Convenience mapping calling {@link SelectField#convertFrom(Class,
* Function)}.
*/
public <U> SelectField<U> mapping(Class<U> toType, Function3<? super UUID, ? super String, ? super OffsetDateTime, ? extends U> from) {
return convertFrom(toType, Records.mapping(from));
}
}