/* * This file is generated by jOOQ. */ package de.jottyfan.bico.db.tables; import de.jottyfan.bico.db.Public; import de.jottyfan.bico.db.tables.records.VCalendarRecord; import java.time.LocalDate; import java.util.Collection; import org.jooq.Condition; import org.jooq.Field; import org.jooq.Name; import org.jooq.PlainSQL; import org.jooq.QueryPart; import org.jooq.SQL; import org.jooq.Schema; import org.jooq.Select; import org.jooq.Stringly; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; 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", "this-escape" }) public class VCalendar extends TableImpl { private static final long serialVersionUID = 1L; /** * The reference instance of public.v_calendar */ public static final VCalendar V_CALENDAR = new VCalendar(); /** * The class holding records for this type */ @Override public Class getRecordType() { return VCalendarRecord.class; } /** * The column public.v_calendar.slot_day. */ public final TableField SLOT_DAY = createField(DSL.name("slot_day"), SQLDataType.LOCALDATE, this, ""); /** * The column public.v_calendar.fullname. */ public final TableField FULLNAME = createField(DSL.name("fullname"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.abbreviation. */ public final TableField ABBREVIATION = createField(DSL.name("abbreviation"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.source_name. */ public final TableField SOURCE_NAME = createField(DSL.name("source_name"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.theme. */ public final TableField THEME = createField(DSL.name("theme"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.subtheme. */ public final TableField SUBTHEME = createField(DSL.name("subtheme"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.book_pages. */ public final TableField BOOK_PAGES = createField(DSL.name("book_pages"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.worksheets. */ public final TableField WORKSHEETS = createField(DSL.name("worksheets"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.bibleverse. */ public final TableField BIBLEVERSE = createField(DSL.name("bibleverse"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.subject_notes. */ public final TableField SUBJECT_NOTES = createField(DSL.name("subject_notes"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.lesson_notes. */ public final TableField LESSON_NOTES = createField(DSL.name("lesson_notes"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.slot_notes. */ public final TableField SLOT_NOTES = createField(DSL.name("slot_notes"), SQLDataType.CLOB, this, ""); /** * The column public.v_calendar.pk_slot. */ public final TableField PK_SLOT = createField(DSL.name("pk_slot"), SQLDataType.INTEGER, this, ""); /** * The column public.v_calendar.pk_lesson. */ public final TableField PK_LESSON = createField(DSL.name("pk_lesson"), SQLDataType.INTEGER, this, ""); /** * The column public.v_calendar.pk_lesson_subject. */ public final TableField PK_LESSON_SUBJECT = createField(DSL.name("pk_lesson_subject"), SQLDataType.INTEGER, this, ""); /** * The column public.v_calendar.pk_person. */ public final TableField PK_PERSON = createField(DSL.name("pk_person"), SQLDataType.INTEGER, this, ""); /** * The column public.v_calendar.pk_subject. */ public final TableField PK_SUBJECT = createField(DSL.name("pk_subject"), SQLDataType.INTEGER, this, ""); /** * The column public.v_calendar.pk_source. */ public final TableField PK_SOURCE = createField(DSL.name("pk_source"), SQLDataType.INTEGER, this, ""); /** * The column public.v_calendar.bibleclass. */ public final TableField BIBLECLASS = createField(DSL.name("bibleclass"), SQLDataType.BOOLEAN, this, ""); /** * The column public.v_calendar.youthgroup. */ public final TableField YOUTHGROUP = createField(DSL.name("youthgroup"), SQLDataType.BOOLEAN, this, ""); private VCalendar(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); } private VCalendar(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" CREATE VIEW "v_calendar" AS SELECT d.slot_day, ((p.forename || ' '::text) || p.surname) AS fullname, p.abbreviation, o.name AS source_name, s.theme, s.subtheme, s.book_pages, s.worksheets, s.bibleverse, s.notes AS subject_notes, l.notes AS lesson_notes, d.note AS slot_notes, d.pk_slot, l.pk_lesson, ls.pk_lesson_subject, p.pk_person, s.pk_subject, o.pk_source, (d.groupname = 'bibleclass'::enum_groupname) AS bibleclass, (d.groupname = 'youthgroup'::enum_groupname) AS youthgroup FROM (((((t_slot d LEFT JOIN t_lesson l ON ((l.fk_slot = d.pk_slot))) LEFT JOIN t_lesson_subject ls ON ((ls.fk_lesson = l.pk_lesson))) LEFT JOIN t_person p ON ((p.pk_person = l.fk_person))) LEFT JOIN t_subject s ON ((s.pk_subject = ls.fk_subject))) LEFT JOIN t_source o ON ((o.pk_source = s.fk_source))); """), where); } /** * Create an aliased public.v_calendar table reference */ public VCalendar(String alias) { this(DSL.name(alias), V_CALENDAR); } /** * Create an aliased public.v_calendar table reference */ public VCalendar(Name alias) { this(alias, V_CALENDAR); } /** * Create a public.v_calendar table reference */ public VCalendar() { this(DSL.name("v_calendar"), null); } @Override public Schema getSchema() { return aliased() ? null : Public.PUBLIC; } @Override public VCalendar as(String alias) { return new VCalendar(DSL.name(alias), this); } @Override public VCalendar as(Name alias) { return new VCalendar(alias, this); } @Override public VCalendar as(Table alias) { return new VCalendar(alias.getQualifiedName(), this); } /** * Rename this table */ @Override public VCalendar rename(String name) { return new VCalendar(DSL.name(name), null); } /** * Rename this table */ @Override public VCalendar rename(Name name) { return new VCalendar(name, null); } /** * Rename this table */ @Override public VCalendar rename(Table name) { return new VCalendar(name.getQualifiedName(), null); } /** * Create an inline derived table from this table */ @Override public VCalendar where(Condition condition) { return new VCalendar(getQualifiedName(), aliased() ? this : null, null, condition); } /** * Create an inline derived table from this table */ @Override public VCalendar where(Collection conditions) { return where(DSL.and(conditions)); } /** * Create an inline derived table from this table */ @Override public VCalendar where(Condition... conditions) { return where(DSL.and(conditions)); } /** * Create an inline derived table from this table */ @Override public VCalendar where(Field condition) { return where(DSL.condition(condition)); } /** * Create an inline derived table from this table */ @Override @PlainSQL public VCalendar where(SQL condition) { return where(DSL.condition(condition)); } /** * Create an inline derived table from this table */ @Override @PlainSQL public VCalendar where(@Stringly.SQL String condition) { return where(DSL.condition(condition)); } /** * Create an inline derived table from this table */ @Override @PlainSQL public VCalendar where(@Stringly.SQL String condition, Object... binds) { return where(DSL.condition(condition, binds)); } /** * Create an inline derived table from this table */ @Override @PlainSQL public VCalendar where(@Stringly.SQL String condition, QueryPart... parts) { return where(DSL.condition(condition, parts)); } /** * Create an inline derived table from this table */ @Override public VCalendar whereExists(Select select) { return where(DSL.exists(select)); } /** * Create an inline derived table from this table */ @Override public VCalendar whereNotExists(Select select) { return where(DSL.notExists(select)); } }