Files
bicolib/src/main/java/de/jottyfan/bico/db/tables/VCalendar.java
2025-12-14 16:52:26 +01:00

335 lines
10 KiB
Java

/*
* 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<VCalendarRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>public.v_calendar</code>
*/
public static final VCalendar V_CALENDAR = new VCalendar();
/**
* The class holding records for this type
*/
@Override
public Class<VCalendarRecord> getRecordType() {
return VCalendarRecord.class;
}
/**
* The column <code>public.v_calendar.slot_day</code>.
*/
public final TableField<VCalendarRecord, LocalDate> SLOT_DAY = createField(DSL.name("slot_day"), SQLDataType.LOCALDATE, this, "");
/**
* The column <code>public.v_calendar.fullname</code>.
*/
public final TableField<VCalendarRecord, String> FULLNAME = createField(DSL.name("fullname"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.abbreviation</code>.
*/
public final TableField<VCalendarRecord, String> ABBREVIATION = createField(DSL.name("abbreviation"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.source_name</code>.
*/
public final TableField<VCalendarRecord, String> SOURCE_NAME = createField(DSL.name("source_name"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.theme</code>.
*/
public final TableField<VCalendarRecord, String> THEME = createField(DSL.name("theme"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.subtheme</code>.
*/
public final TableField<VCalendarRecord, String> SUBTHEME = createField(DSL.name("subtheme"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.book_pages</code>.
*/
public final TableField<VCalendarRecord, String> BOOK_PAGES = createField(DSL.name("book_pages"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.worksheets</code>.
*/
public final TableField<VCalendarRecord, String> WORKSHEETS = createField(DSL.name("worksheets"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.bibleverse</code>.
*/
public final TableField<VCalendarRecord, String> BIBLEVERSE = createField(DSL.name("bibleverse"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.subject_notes</code>.
*/
public final TableField<VCalendarRecord, String> SUBJECT_NOTES = createField(DSL.name("subject_notes"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.lesson_notes</code>.
*/
public final TableField<VCalendarRecord, String> LESSON_NOTES = createField(DSL.name("lesson_notes"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.slot_notes</code>.
*/
public final TableField<VCalendarRecord, String> SLOT_NOTES = createField(DSL.name("slot_notes"), SQLDataType.CLOB, this, "");
/**
* The column <code>public.v_calendar.pk_slot</code>.
*/
public final TableField<VCalendarRecord, Integer> PK_SLOT = createField(DSL.name("pk_slot"), SQLDataType.INTEGER, this, "");
/**
* The column <code>public.v_calendar.pk_lesson</code>.
*/
public final TableField<VCalendarRecord, Integer> PK_LESSON = createField(DSL.name("pk_lesson"), SQLDataType.INTEGER, this, "");
/**
* The column <code>public.v_calendar.pk_lesson_subject</code>.
*/
public final TableField<VCalendarRecord, Integer> PK_LESSON_SUBJECT = createField(DSL.name("pk_lesson_subject"), SQLDataType.INTEGER, this, "");
/**
* The column <code>public.v_calendar.pk_person</code>.
*/
public final TableField<VCalendarRecord, Integer> PK_PERSON = createField(DSL.name("pk_person"), SQLDataType.INTEGER, this, "");
/**
* The column <code>public.v_calendar.pk_subject</code>.
*/
public final TableField<VCalendarRecord, Integer> PK_SUBJECT = createField(DSL.name("pk_subject"), SQLDataType.INTEGER, this, "");
/**
* The column <code>public.v_calendar.pk_source</code>.
*/
public final TableField<VCalendarRecord, Integer> PK_SOURCE = createField(DSL.name("pk_source"), SQLDataType.INTEGER, this, "");
/**
* The column <code>public.v_calendar.bibleclass</code>.
*/
public final TableField<VCalendarRecord, Boolean> BIBLECLASS = createField(DSL.name("bibleclass"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>public.v_calendar.youthgroup</code>.
*/
public final TableField<VCalendarRecord, Boolean> YOUTHGROUP = createField(DSL.name("youthgroup"), SQLDataType.BOOLEAN, this, "");
private VCalendar(Name alias, Table<VCalendarRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}
private VCalendar(Name alias, Table<VCalendarRecord> 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 <code>public.v_calendar</code> table reference
*/
public VCalendar(String alias) {
this(DSL.name(alias), V_CALENDAR);
}
/**
* Create an aliased <code>public.v_calendar</code> table reference
*/
public VCalendar(Name alias) {
this(alias, V_CALENDAR);
}
/**
* Create a <code>public.v_calendar</code> 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<? extends Condition> 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<Boolean> 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));
}
}