added profile
This commit is contained in:
		| @@ -22,7 +22,7 @@ apply plugin: 'java' | |||||||
| apply plugin: 'maven-publish' | apply plugin: 'maven-publish' | ||||||
|  |  | ||||||
| group = 'de.jottyfan' | group = 'de.jottyfan' | ||||||
| version = '1' | version = '2' | ||||||
|  |  | ||||||
| description = """bicolib""" | description = """bicolib""" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -7,12 +7,14 @@ package de.jottyfan.bico.db; | |||||||
| import de.jottyfan.bico.db.tables.TLesson; | import de.jottyfan.bico.db.tables.TLesson; | ||||||
| import de.jottyfan.bico.db.tables.TLessonSubject; | import de.jottyfan.bico.db.tables.TLessonSubject; | ||||||
| import de.jottyfan.bico.db.tables.TPerson; | import de.jottyfan.bico.db.tables.TPerson; | ||||||
|  | import de.jottyfan.bico.db.tables.TProfile; | ||||||
| import de.jottyfan.bico.db.tables.TSlot; | import de.jottyfan.bico.db.tables.TSlot; | ||||||
| import de.jottyfan.bico.db.tables.TSource; | import de.jottyfan.bico.db.tables.TSource; | ||||||
| import de.jottyfan.bico.db.tables.TSubject; | import de.jottyfan.bico.db.tables.TSubject; | ||||||
| import de.jottyfan.bico.db.tables.records.TLessonRecord; | import de.jottyfan.bico.db.tables.records.TLessonRecord; | ||||||
| import de.jottyfan.bico.db.tables.records.TLessonSubjectRecord; | import de.jottyfan.bico.db.tables.records.TLessonSubjectRecord; | ||||||
| import de.jottyfan.bico.db.tables.records.TPersonRecord; | import de.jottyfan.bico.db.tables.records.TPersonRecord; | ||||||
|  | import de.jottyfan.bico.db.tables.records.TProfileRecord; | ||||||
| import de.jottyfan.bico.db.tables.records.TSlotRecord; | import de.jottyfan.bico.db.tables.records.TSlotRecord; | ||||||
| import de.jottyfan.bico.db.tables.records.TSourceRecord; | import de.jottyfan.bico.db.tables.records.TSourceRecord; | ||||||
| import de.jottyfan.bico.db.tables.records.TSubjectRecord; | import de.jottyfan.bico.db.tables.records.TSubjectRecord; | ||||||
| @@ -42,6 +44,8 @@ public class Keys { | |||||||
|     public static final UniqueKey<TPersonRecord> T_PERSON_ABBREVIATION_KEY = Internal.createUniqueKey(TPerson.T_PERSON, DSL.name("t_person_abbreviation_key"), new TableField[] { TPerson.T_PERSON.ABBREVIATION }, true); |     public static final UniqueKey<TPersonRecord> T_PERSON_ABBREVIATION_KEY = Internal.createUniqueKey(TPerson.T_PERSON, DSL.name("t_person_abbreviation_key"), new TableField[] { TPerson.T_PERSON.ABBREVIATION }, true); | ||||||
|     public static final UniqueKey<TPersonRecord> T_PERSON_FORENAME_SURNAME_KEY = Internal.createUniqueKey(TPerson.T_PERSON, DSL.name("t_person_forename_surname_key"), new TableField[] { TPerson.T_PERSON.FORENAME, TPerson.T_PERSON.SURNAME }, true); |     public static final UniqueKey<TPersonRecord> T_PERSON_FORENAME_SURNAME_KEY = Internal.createUniqueKey(TPerson.T_PERSON, DSL.name("t_person_forename_surname_key"), new TableField[] { TPerson.T_PERSON.FORENAME, TPerson.T_PERSON.SURNAME }, true); | ||||||
|     public static final UniqueKey<TPersonRecord> T_PERSON_PKEY = Internal.createUniqueKey(TPerson.T_PERSON, DSL.name("t_person_pkey"), new TableField[] { TPerson.T_PERSON.PK_PERSON }, true); |     public static final UniqueKey<TPersonRecord> T_PERSON_PKEY = Internal.createUniqueKey(TPerson.T_PERSON, DSL.name("t_person_pkey"), new TableField[] { TPerson.T_PERSON.PK_PERSON }, true); | ||||||
|  |     public static final UniqueKey<TProfileRecord> T_PROFILE_PKEY = Internal.createUniqueKey(TProfile.T_PROFILE, DSL.name("t_profile_pkey"), new TableField[] { TProfile.T_PROFILE.ID }, true); | ||||||
|  |     public static final UniqueKey<TProfileRecord> T_PROFILE_USERNAME_KEY = Internal.createUniqueKey(TProfile.T_PROFILE, DSL.name("t_profile_username_key"), new TableField[] { TProfile.T_PROFILE.USERNAME }, true); | ||||||
|     public static final UniqueKey<TSlotRecord> T_LESSONDAY_LESSON_DAY_KEY = Internal.createUniqueKey(TSlot.T_SLOT, DSL.name("t_lessonday_lesson_day_key"), new TableField[] { TSlot.T_SLOT.SLOT_DAY }, true); |     public static final UniqueKey<TSlotRecord> T_LESSONDAY_LESSON_DAY_KEY = Internal.createUniqueKey(TSlot.T_SLOT, DSL.name("t_lessonday_lesson_day_key"), new TableField[] { TSlot.T_SLOT.SLOT_DAY }, true); | ||||||
|     public static final UniqueKey<TSlotRecord> T_LESSONDAY_PKEY = Internal.createUniqueKey(TSlot.T_SLOT, DSL.name("t_lessonday_pkey"), new TableField[] { TSlot.T_SLOT.PK_SLOT }, true); |     public static final UniqueKey<TSlotRecord> T_LESSONDAY_PKEY = Internal.createUniqueKey(TSlot.T_SLOT, DSL.name("t_lessonday_pkey"), new TableField[] { TSlot.T_SLOT.PK_SLOT }, true); | ||||||
|     public static final UniqueKey<TSourceRecord> T_SOURCE_NAME_KEY = Internal.createUniqueKey(TSource.T_SOURCE, DSL.name("t_source_name_key"), new TableField[] { TSource.T_SOURCE.NAME }, true); |     public static final UniqueKey<TSourceRecord> T_SOURCE_NAME_KEY = Internal.createUniqueKey(TSource.T_SOURCE, DSL.name("t_source_name_key"), new TableField[] { TSource.T_SOURCE.NAME }, true); | ||||||
|   | |||||||
| @@ -7,12 +7,14 @@ package de.jottyfan.bico.db; | |||||||
| import de.jottyfan.bico.db.tables.TLesson; | import de.jottyfan.bico.db.tables.TLesson; | ||||||
| import de.jottyfan.bico.db.tables.TLessonSubject; | import de.jottyfan.bico.db.tables.TLessonSubject; | ||||||
| import de.jottyfan.bico.db.tables.TPerson; | import de.jottyfan.bico.db.tables.TPerson; | ||||||
|  | import de.jottyfan.bico.db.tables.TProfile; | ||||||
| import de.jottyfan.bico.db.tables.TSlot; | import de.jottyfan.bico.db.tables.TSlot; | ||||||
| import de.jottyfan.bico.db.tables.TSource; | import de.jottyfan.bico.db.tables.TSource; | ||||||
| import de.jottyfan.bico.db.tables.TSubject; | import de.jottyfan.bico.db.tables.TSubject; | ||||||
| import de.jottyfan.bico.db.tables.VCalendar; | import de.jottyfan.bico.db.tables.VCalendar; | ||||||
| import de.jottyfan.bico.db.tables.VLesson; | import de.jottyfan.bico.db.tables.VLesson; | ||||||
| import de.jottyfan.bico.db.tables.VLessonMissing; | import de.jottyfan.bico.db.tables.VLessonMissing; | ||||||
|  | import de.jottyfan.bico.db.tables.VVersion; | ||||||
|  |  | ||||||
| import java.util.Arrays; | import java.util.Arrays; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| @@ -50,6 +52,11 @@ public class Public extends SchemaImpl { | |||||||
|      */ |      */ | ||||||
|     public final TPerson T_PERSON = TPerson.T_PERSON; |     public final TPerson T_PERSON = TPerson.T_PERSON; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The table <code>public.t_profile</code>. | ||||||
|  |      */ | ||||||
|  |     public final TProfile T_PROFILE = TProfile.T_PROFILE; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * The table <code>public.t_slot</code>. |      * The table <code>public.t_slot</code>. | ||||||
|      */ |      */ | ||||||
| @@ -80,6 +87,11 @@ public class Public extends SchemaImpl { | |||||||
|      */ |      */ | ||||||
|     public final VLessonMissing V_LESSON_MISSING = VLessonMissing.V_LESSON_MISSING; |     public final VLessonMissing V_LESSON_MISSING = VLessonMissing.V_LESSON_MISSING; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The table <code>public.v_version</code>. | ||||||
|  |      */ | ||||||
|  |     public final VVersion V_VERSION = VVersion.V_VERSION; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * No further instances allowed |      * No further instances allowed | ||||||
|      */ |      */ | ||||||
| @@ -99,12 +111,14 @@ public class Public extends SchemaImpl { | |||||||
|             TLesson.T_LESSON, |             TLesson.T_LESSON, | ||||||
|             TLessonSubject.T_LESSON_SUBJECT, |             TLessonSubject.T_LESSON_SUBJECT, | ||||||
|             TPerson.T_PERSON, |             TPerson.T_PERSON, | ||||||
|  |             TProfile.T_PROFILE, | ||||||
|             TSlot.T_SLOT, |             TSlot.T_SLOT, | ||||||
|             TSource.T_SOURCE, |             TSource.T_SOURCE, | ||||||
|             TSubject.T_SUBJECT, |             TSubject.T_SUBJECT, | ||||||
|             VCalendar.V_CALENDAR, |             VCalendar.V_CALENDAR, | ||||||
|             VLesson.V_LESSON, |             VLesson.V_LESSON, | ||||||
|             VLessonMissing.V_LESSON_MISSING |             VLessonMissing.V_LESSON_MISSING, | ||||||
|  |             VVersion.V_VERSION | ||||||
|         ); |         ); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -7,12 +7,14 @@ package de.jottyfan.bico.db; | |||||||
| import de.jottyfan.bico.db.tables.TLesson; | import de.jottyfan.bico.db.tables.TLesson; | ||||||
| import de.jottyfan.bico.db.tables.TLessonSubject; | import de.jottyfan.bico.db.tables.TLessonSubject; | ||||||
| import de.jottyfan.bico.db.tables.TPerson; | import de.jottyfan.bico.db.tables.TPerson; | ||||||
|  | import de.jottyfan.bico.db.tables.TProfile; | ||||||
| import de.jottyfan.bico.db.tables.TSlot; | import de.jottyfan.bico.db.tables.TSlot; | ||||||
| import de.jottyfan.bico.db.tables.TSource; | import de.jottyfan.bico.db.tables.TSource; | ||||||
| import de.jottyfan.bico.db.tables.TSubject; | import de.jottyfan.bico.db.tables.TSubject; | ||||||
| import de.jottyfan.bico.db.tables.VCalendar; | import de.jottyfan.bico.db.tables.VCalendar; | ||||||
| import de.jottyfan.bico.db.tables.VLesson; | import de.jottyfan.bico.db.tables.VLesson; | ||||||
| import de.jottyfan.bico.db.tables.VLessonMissing; | import de.jottyfan.bico.db.tables.VLessonMissing; | ||||||
|  | import de.jottyfan.bico.db.tables.VVersion; | ||||||
|  |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -36,6 +38,11 @@ public class Tables { | |||||||
|      */ |      */ | ||||||
|     public static final TPerson T_PERSON = TPerson.T_PERSON; |     public static final TPerson T_PERSON = TPerson.T_PERSON; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The table <code>public.t_profile</code>. | ||||||
|  |      */ | ||||||
|  |     public static final TProfile T_PROFILE = TProfile.T_PROFILE; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * The table <code>public.t_slot</code>. |      * The table <code>public.t_slot</code>. | ||||||
|      */ |      */ | ||||||
| @@ -65,4 +72,9 @@ public class Tables { | |||||||
|      * The table <code>public.v_lesson_missing</code>. |      * The table <code>public.v_lesson_missing</code>. | ||||||
|      */ |      */ | ||||||
|     public static final VLessonMissing V_LESSON_MISSING = VLessonMissing.V_LESSON_MISSING; |     public static final VLessonMissing V_LESSON_MISSING = VLessonMissing.V_LESSON_MISSING; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The table <code>public.v_version</code>. | ||||||
|  |      */ | ||||||
|  |     public static final VVersion V_VERSION = VVersion.V_VERSION; | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										153
									
								
								src/main/java/de/jottyfan/bico/db/tables/TProfile.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										153
									
								
								src/main/java/de/jottyfan/bico/db/tables/TProfile.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,153 @@ | |||||||
|  | /* | ||||||
|  |  * This file is generated by jOOQ. | ||||||
|  |  */ | ||||||
|  | package de.jottyfan.bico.db.tables; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import de.jottyfan.bico.db.Keys; | ||||||
|  | import de.jottyfan.bico.db.Public; | ||||||
|  | import de.jottyfan.bico.db.tables.records.TProfileRecord; | ||||||
|  |  | ||||||
|  | import java.util.Arrays; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import org.jooq.Field; | ||||||
|  | import org.jooq.ForeignKey; | ||||||
|  | import org.jooq.Identity; | ||||||
|  | import org.jooq.Name; | ||||||
|  | import org.jooq.Record; | ||||||
|  | import org.jooq.Row3; | ||||||
|  | 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; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * This class is generated by jOOQ. | ||||||
|  |  */ | ||||||
|  | @SuppressWarnings({ "all", "unchecked", "rawtypes" }) | ||||||
|  | public class TProfile extends TableImpl<TProfileRecord> { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The reference instance of <code>public.t_profile</code> | ||||||
|  |      */ | ||||||
|  |     public static final TProfile T_PROFILE = new TProfile(); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The class holding records for this type | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Class<TProfileRecord> getRecordType() { | ||||||
|  |         return TProfileRecord.class; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The column <code>public.t_profile.id</code>. | ||||||
|  |      */ | ||||||
|  |     public final TableField<TProfileRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The column <code>public.t_profile.username</code>. | ||||||
|  |      */ | ||||||
|  |     public final TableField<TProfileRecord, String> USERNAME = createField(DSL.name("username"), SQLDataType.CLOB.nullable(false), this, ""); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The column <code>public.t_profile.theme</code>. | ||||||
|  |      */ | ||||||
|  |     public final TableField<TProfileRecord, String> THEME = createField(DSL.name("theme"), SQLDataType.CLOB.defaultValue(DSL.field("'light'::text", SQLDataType.CLOB)), this, ""); | ||||||
|  |  | ||||||
|  |     private TProfile(Name alias, Table<TProfileRecord> aliased) { | ||||||
|  |         this(alias, aliased, null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private TProfile(Name alias, Table<TProfileRecord> aliased, Field<?>[] parameters) { | ||||||
|  |         super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create an aliased <code>public.t_profile</code> table reference | ||||||
|  |      */ | ||||||
|  |     public TProfile(String alias) { | ||||||
|  |         this(DSL.name(alias), T_PROFILE); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create an aliased <code>public.t_profile</code> table reference | ||||||
|  |      */ | ||||||
|  |     public TProfile(Name alias) { | ||||||
|  |         this(alias, T_PROFILE); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create a <code>public.t_profile</code> table reference | ||||||
|  |      */ | ||||||
|  |     public TProfile() { | ||||||
|  |         this(DSL.name("t_profile"), null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public <O extends Record> TProfile(Table<O> child, ForeignKey<O, TProfileRecord> key) { | ||||||
|  |         super(child, key, T_PROFILE); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Schema getSchema() { | ||||||
|  |         return aliased() ? null : Public.PUBLIC; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Identity<TProfileRecord, Integer> getIdentity() { | ||||||
|  |         return (Identity<TProfileRecord, Integer>) super.getIdentity(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public UniqueKey<TProfileRecord> getPrimaryKey() { | ||||||
|  |         return Keys.T_PROFILE_PKEY; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public List<UniqueKey<TProfileRecord>> getUniqueKeys() { | ||||||
|  |         return Arrays.asList(Keys.T_PROFILE_USERNAME_KEY); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public TProfile as(String alias) { | ||||||
|  |         return new TProfile(DSL.name(alias), this); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public TProfile as(Name alias) { | ||||||
|  |         return new TProfile(alias, this); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Rename this table | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TProfile rename(String name) { | ||||||
|  |         return new TProfile(DSL.name(name), null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Rename this table | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TProfile rename(Name name) { | ||||||
|  |         return new TProfile(name, null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |     // Row3 type methods | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Row3<Integer, String, String> fieldsRow() { | ||||||
|  |         return (Row3) super.fieldsRow(); | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										122
									
								
								src/main/java/de/jottyfan/bico/db/tables/VVersion.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										122
									
								
								src/main/java/de/jottyfan/bico/db/tables/VVersion.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,122 @@ | |||||||
|  | /* | ||||||
|  |  * 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.VVersionRecord; | ||||||
|  |  | ||||||
|  | import org.jooq.Field; | ||||||
|  | import org.jooq.ForeignKey; | ||||||
|  | import org.jooq.Name; | ||||||
|  | import org.jooq.Record; | ||||||
|  | import org.jooq.Row1; | ||||||
|  | import org.jooq.Schema; | ||||||
|  | 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" }) | ||||||
|  | public class VVersion extends TableImpl<VVersionRecord> { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The reference instance of <code>public.v_version</code> | ||||||
|  |      */ | ||||||
|  |     public static final VVersion V_VERSION = new VVersion(); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The class holding records for this type | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Class<VVersionRecord> getRecordType() { | ||||||
|  |         return VVersionRecord.class; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * The column <code>public.v_version.version</code>. | ||||||
|  |      */ | ||||||
|  |     public final TableField<VVersionRecord, Integer> VERSION = createField(DSL.name("version"), SQLDataType.INTEGER, this, ""); | ||||||
|  |  | ||||||
|  |     private VVersion(Name alias, Table<VVersionRecord> aliased) { | ||||||
|  |         this(alias, aliased, null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private VVersion(Name alias, Table<VVersionRecord> aliased, Field<?>[] parameters) { | ||||||
|  |         super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create an aliased <code>public.v_version</code> table reference | ||||||
|  |      */ | ||||||
|  |     public VVersion(String alias) { | ||||||
|  |         this(DSL.name(alias), V_VERSION); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create an aliased <code>public.v_version</code> table reference | ||||||
|  |      */ | ||||||
|  |     public VVersion(Name alias) { | ||||||
|  |         this(alias, V_VERSION); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create a <code>public.v_version</code> table reference | ||||||
|  |      */ | ||||||
|  |     public VVersion() { | ||||||
|  |         this(DSL.name("v_version"), null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public <O extends Record> VVersion(Table<O> child, ForeignKey<O, VVersionRecord> key) { | ||||||
|  |         super(child, key, V_VERSION); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Schema getSchema() { | ||||||
|  |         return aliased() ? null : Public.PUBLIC; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public VVersion as(String alias) { | ||||||
|  |         return new VVersion(DSL.name(alias), this); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public VVersion as(Name alias) { | ||||||
|  |         return new VVersion(alias, this); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Rename this table | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public VVersion rename(String name) { | ||||||
|  |         return new VVersion(DSL.name(name), null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Rename this table | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public VVersion rename(Name name) { | ||||||
|  |         return new VVersion(name, null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |     // Row1 type methods | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Row1<Integer> fieldsRow() { | ||||||
|  |         return (Row1) super.fieldsRow(); | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										70
									
								
								src/main/java/de/jottyfan/bico/db/tables/pojos/TProfile.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								src/main/java/de/jottyfan/bico/db/tables/pojos/TProfile.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,70 @@ | |||||||
|  | /* | ||||||
|  |  * This file is generated by jOOQ. | ||||||
|  |  */ | ||||||
|  | package de.jottyfan.bico.db.tables.pojos; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * This class is generated by jOOQ. | ||||||
|  |  */ | ||||||
|  | @SuppressWarnings({ "all", "unchecked", "rawtypes" }) | ||||||
|  | public class TProfile implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     private final Integer id; | ||||||
|  |     private final String  username; | ||||||
|  |     private final String  theme; | ||||||
|  |  | ||||||
|  |     public TProfile(TProfile value) { | ||||||
|  |         this.id = value.id; | ||||||
|  |         this.username = value.username; | ||||||
|  |         this.theme = value.theme; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public TProfile( | ||||||
|  |         Integer id, | ||||||
|  |         String  username, | ||||||
|  |         String  theme | ||||||
|  |     ) { | ||||||
|  |         this.id = id; | ||||||
|  |         this.username = username; | ||||||
|  |         this.theme = theme; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Getter for <code>public.t_profile.id</code>. | ||||||
|  |      */ | ||||||
|  |     public Integer getId() { | ||||||
|  |         return this.id; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Getter for <code>public.t_profile.username</code>. | ||||||
|  |      */ | ||||||
|  |     public String getUsername() { | ||||||
|  |         return this.username; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Getter for <code>public.t_profile.theme</code>. | ||||||
|  |      */ | ||||||
|  |     public String getTheme() { | ||||||
|  |         return this.theme; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public String toString() { | ||||||
|  |         StringBuilder sb = new StringBuilder("TProfile ("); | ||||||
|  |  | ||||||
|  |         sb.append(id); | ||||||
|  |         sb.append(", ").append(username); | ||||||
|  |         sb.append(", ").append(theme); | ||||||
|  |  | ||||||
|  |         sb.append(")"); | ||||||
|  |         return sb.toString(); | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										46
									
								
								src/main/java/de/jottyfan/bico/db/tables/pojos/VVersion.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								src/main/java/de/jottyfan/bico/db/tables/pojos/VVersion.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | |||||||
|  | /* | ||||||
|  |  * This file is generated by jOOQ. | ||||||
|  |  */ | ||||||
|  | package de.jottyfan.bico.db.tables.pojos; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * This class is generated by jOOQ. | ||||||
|  |  */ | ||||||
|  | @SuppressWarnings({ "all", "unchecked", "rawtypes" }) | ||||||
|  | public class VVersion implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     private final Integer version; | ||||||
|  |  | ||||||
|  |     public VVersion(VVersion value) { | ||||||
|  |         this.version = value.version; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public VVersion( | ||||||
|  |         Integer version | ||||||
|  |     ) { | ||||||
|  |         this.version = version; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Getter for <code>public.v_version.version</code>. | ||||||
|  |      */ | ||||||
|  |     public Integer getVersion() { | ||||||
|  |         return this.version; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public String toString() { | ||||||
|  |         StringBuilder sb = new StringBuilder("VVersion ("); | ||||||
|  |  | ||||||
|  |         sb.append(version); | ||||||
|  |  | ||||||
|  |         sb.append(")"); | ||||||
|  |         return sb.toString(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -0,0 +1,197 @@ | |||||||
|  | /* | ||||||
|  |  * This file is generated by jOOQ. | ||||||
|  |  */ | ||||||
|  | package de.jottyfan.bico.db.tables.records; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import de.jottyfan.bico.db.tables.TProfile; | ||||||
|  |  | ||||||
|  | import org.jooq.Field; | ||||||
|  | import org.jooq.Record1; | ||||||
|  | import org.jooq.Record3; | ||||||
|  | import org.jooq.Row3; | ||||||
|  | import org.jooq.impl.UpdatableRecordImpl; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * This class is generated by jOOQ. | ||||||
|  |  */ | ||||||
|  | @SuppressWarnings({ "all", "unchecked", "rawtypes" }) | ||||||
|  | public class TProfileRecord extends UpdatableRecordImpl<TProfileRecord> implements Record3<Integer, String, String> { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Setter for <code>public.t_profile.id</code>. | ||||||
|  |      */ | ||||||
|  |     public TProfileRecord setId(Integer value) { | ||||||
|  |         set(0, value); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Getter for <code>public.t_profile.id</code>. | ||||||
|  |      */ | ||||||
|  |     public Integer getId() { | ||||||
|  |         return (Integer) get(0); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Setter for <code>public.t_profile.username</code>. | ||||||
|  |      */ | ||||||
|  |     public TProfileRecord setUsername(String value) { | ||||||
|  |         set(1, value); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Getter for <code>public.t_profile.username</code>. | ||||||
|  |      */ | ||||||
|  |     public String getUsername() { | ||||||
|  |         return (String) get(1); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Setter for <code>public.t_profile.theme</code>. | ||||||
|  |      */ | ||||||
|  |     public TProfileRecord setTheme(String value) { | ||||||
|  |         set(2, value); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Getter for <code>public.t_profile.theme</code>. | ||||||
|  |      */ | ||||||
|  |     public String getTheme() { | ||||||
|  |         return (String) get(2); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |     // Primary key information | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Record1<Integer> key() { | ||||||
|  |         return (Record1) super.key(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |     // Record3 type implementation | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Row3<Integer, String, String> fieldsRow() { | ||||||
|  |         return (Row3) super.fieldsRow(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Row3<Integer, String, String> valuesRow() { | ||||||
|  |         return (Row3) super.valuesRow(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Field<Integer> field1() { | ||||||
|  |         return TProfile.T_PROFILE.ID; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Field<String> field2() { | ||||||
|  |         return TProfile.T_PROFILE.USERNAME; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Field<String> field3() { | ||||||
|  |         return TProfile.T_PROFILE.THEME; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Integer component1() { | ||||||
|  |         return getId(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public String component2() { | ||||||
|  |         return getUsername(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public String component3() { | ||||||
|  |         return getTheme(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Integer value1() { | ||||||
|  |         return getId(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public String value2() { | ||||||
|  |         return getUsername(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public String value3() { | ||||||
|  |         return getTheme(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public TProfileRecord value1(Integer value) { | ||||||
|  |         setId(value); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public TProfileRecord value2(String value) { | ||||||
|  |         setUsername(value); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public TProfileRecord value3(String value) { | ||||||
|  |         setTheme(value); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public TProfileRecord values(Integer value1, String value2, String value3) { | ||||||
|  |         value1(value1); | ||||||
|  |         value2(value2); | ||||||
|  |         value3(value3); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |     // Constructors | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create a detached TProfileRecord | ||||||
|  |      */ | ||||||
|  |     public TProfileRecord() { | ||||||
|  |         super(TProfile.T_PROFILE); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create a detached, initialised TProfileRecord | ||||||
|  |      */ | ||||||
|  |     public TProfileRecord(Integer id, String username, String theme) { | ||||||
|  |         super(TProfile.T_PROFILE); | ||||||
|  |  | ||||||
|  |         setId(id); | ||||||
|  |         setUsername(username); | ||||||
|  |         setTheme(theme); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create a detached, initialised TProfileRecord | ||||||
|  |      */ | ||||||
|  |     public TProfileRecord(de.jottyfan.bico.db.tables.pojos.TProfile value) { | ||||||
|  |         super(TProfile.T_PROFILE); | ||||||
|  |  | ||||||
|  |         if (value != null) { | ||||||
|  |             setId(value.getId()); | ||||||
|  |             setUsername(value.getUsername()); | ||||||
|  |             setTheme(value.getTheme()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -0,0 +1,109 @@ | |||||||
|  | /* | ||||||
|  |  * This file is generated by jOOQ. | ||||||
|  |  */ | ||||||
|  | package de.jottyfan.bico.db.tables.records; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import de.jottyfan.bico.db.tables.VVersion; | ||||||
|  |  | ||||||
|  | import org.jooq.Field; | ||||||
|  | import org.jooq.Record1; | ||||||
|  | import org.jooq.Row1; | ||||||
|  | import org.jooq.impl.TableRecordImpl; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * This class is generated by jOOQ. | ||||||
|  |  */ | ||||||
|  | @SuppressWarnings({ "all", "unchecked", "rawtypes" }) | ||||||
|  | public class VVersionRecord extends TableRecordImpl<VVersionRecord> implements Record1<Integer> { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Setter for <code>public.v_version.version</code>. | ||||||
|  |      */ | ||||||
|  |     public VVersionRecord setVersion(Integer value) { | ||||||
|  |         set(0, value); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Getter for <code>public.v_version.version</code>. | ||||||
|  |      */ | ||||||
|  |     public Integer getVersion() { | ||||||
|  |         return (Integer) get(0); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |     // Record1 type implementation | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Row1<Integer> fieldsRow() { | ||||||
|  |         return (Row1) super.fieldsRow(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Row1<Integer> valuesRow() { | ||||||
|  |         return (Row1) super.valuesRow(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Field<Integer> field1() { | ||||||
|  |         return VVersion.V_VERSION.VERSION; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Integer component1() { | ||||||
|  |         return getVersion(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public Integer value1() { | ||||||
|  |         return getVersion(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public VVersionRecord value1(Integer value) { | ||||||
|  |         setVersion(value); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public VVersionRecord values(Integer value1) { | ||||||
|  |         value1(value1); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |     // Constructors | ||||||
|  |     // ------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create a detached VVersionRecord | ||||||
|  |      */ | ||||||
|  |     public VVersionRecord() { | ||||||
|  |         super(VVersion.V_VERSION); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create a detached, initialised VVersionRecord | ||||||
|  |      */ | ||||||
|  |     public VVersionRecord(Integer version) { | ||||||
|  |         super(VVersion.V_VERSION); | ||||||
|  |  | ||||||
|  |         setVersion(version); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create a detached, initialised VVersionRecord | ||||||
|  |      */ | ||||||
|  |     public VVersionRecord(de.jottyfan.bico.db.tables.pojos.VVersion value) { | ||||||
|  |         super(VVersion.V_VERSION); | ||||||
|  |  | ||||||
|  |         if (value != null) { | ||||||
|  |             setVersion(value.getVersion()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										7
									
								
								src/main/resources/v2.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								src/main/resources/v2.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | |||||||
|  | create table t_profile( | ||||||
|  |   id int not null primary key generated always as identity, | ||||||
|  |   username text not null unique, | ||||||
|  |   theme text default 'light'); | ||||||
|  |  | ||||||
|  | create view v_version as | ||||||
|  | select 2 as version; | ||||||
		Reference in New Issue
	
	Block a user