dev.bannmann.anansi.postgresql.generated.tables.IncidentData Maven / Gradle / Ivy
The newest version!
/*
* This file is generated by jOOQ.
*/
package dev.bannmann.anansi.postgresql.generated.tables;
import dev.bannmann.anansi.postgresql.generated.DefaultSchema;
import dev.bannmann.anansi.postgresql.generated.Keys;
import dev.bannmann.anansi.postgresql.generated.tables.records.IncidentDataRecord;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Function3;
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 IncidentData extends TableImpl {
private static final long serialVersionUID = 1L;
/**
* The reference instance of incident_data
*/
public static final IncidentData INCIDENT_DATA = new IncidentData();
/**
* The class holding records for this type
*/
@Override
public Class getRecordType() {
return IncidentDataRecord.class;
}
/**
* The column incident_data.incident_id
.
*/
public final TableField INCIDENT_ID = createField(DSL.name("incident_id"), SQLDataType.VARCHAR(32).nullable(false), this, "");
/**
* The column incident_data.key
.
*/
public final TableField KEY = createField(DSL.name("key"), SQLDataType.VARCHAR(64).nullable(false), this, "");
/**
* The column incident_data.value
.
*/
public final TableField VALUE = createField(DSL.name("value"), SQLDataType.VARCHAR(16384).nullable(false), this, "");
private IncidentData(Name alias, Table aliased) {
this(alias, aliased, null);
}
private IncidentData(Name alias, Table aliased, Field>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
}
/**
* Create an aliased incident_data
table reference
*/
public IncidentData(String alias) {
this(DSL.name(alias), INCIDENT_DATA);
}
/**
* Create an aliased incident_data
table reference
*/
public IncidentData(Name alias) {
this(alias, INCIDENT_DATA);
}
/**
* Create a incident_data
table reference
*/
public IncidentData() {
this(DSL.name("incident_data"), null);
}
public IncidentData(Table child, ForeignKey key) {
super(child, key, INCIDENT_DATA);
}
@Override
public Schema getSchema() {
return aliased() ? null : DefaultSchema.DEFAULT_SCHEMA;
}
@Override
public UniqueKey getPrimaryKey() {
return Keys.INCIDENTDATA_PK;
}
@Override
public List> getReferences() {
return Arrays.asList(Keys.INCIDENTDATA_FK_INCIDENTID);
}
private transient Incident _incident;
/**
* Get the implicit join path to the PUBLIC.incident
table.
*/
public Incident incident() {
if (_incident == null)
_incident = new Incident(this, Keys.INCIDENTDATA_FK_INCIDENTID);
return _incident;
}
@Override
public IncidentData as(String alias) {
return new IncidentData(DSL.name(alias), this);
}
@Override
public IncidentData as(Name alias) {
return new IncidentData(alias, this);
}
@Override
public IncidentData as(Table> alias) {
return new IncidentData(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public IncidentData rename(String name) {
return new IncidentData(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public IncidentData rename(Name name) {
return new IncidentData(name, null);
}
/**
* Rename this table
*/
@Override
public IncidentData rename(Table> name) {
return new IncidentData(name.getQualifiedName(), null);
}
// -------------------------------------------------------------------------
// Row3 type methods
// -------------------------------------------------------------------------
@Override
public Row3 fieldsRow() {
return (Row3) super.fieldsRow();
}
/**
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
*/
public SelectField mapping(Function3 super String, ? super String, ? super String, ? extends U> from) {
return convertFrom(Records.mapping(from));
}
/**
* Convenience mapping calling {@link SelectField#convertFrom(Class,
* Function)}.
*/
public SelectField mapping(Class toType, Function3 super String, ? super String, ? super String, ? extends U> from) {
return convertFrom(toType, Records.mapping(from));
}
}