add column header info

This commit is contained in:
Thomas Peetz
2025-01-07 01:48:03 +01:00
parent 78632e0e12
commit 1a7da0ab9f
9 changed files with 289 additions and 225 deletions
@@ -128,209 +128,209 @@ public class SetupModuleAdmin implements ApplicationListener<ContextRefreshedEve
private void initMetaData() {
log.info("initMetaData");
MetaDataTable mediaArticleTable = metaDataService.getTable("media_article");
metaDataService.getColumn(mediaArticleTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(mediaArticleTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(mediaArticleTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(mediaArticleTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(mediaArticleTable, "url", "link_url", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(mediaArticleTable, "review", "review", "BOOLEAN", null, 6);
metaDataService.getColumn(mediaArticleTable, "title", "title", "TEXT", null, 7);
metaDataService.getColumn(mediaArticleTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "ID", Boolean.FALSE, null);
metaDataService.getColumn(mediaArticleTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaArticleTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaArticleTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaArticleTable, "url", "link_url", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaArticleTable, "review", "review", "BOOLEAN", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaArticleTable, "title", "title", "TEXT", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable mediaVideoTable = metaDataService.getTable("media_video");
metaDataService.getColumn(mediaVideoTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(mediaVideoTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(mediaVideoTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(mediaVideoTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(mediaVideoTable, "url", "link_url", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(mediaVideoTable, "review", "review", "BOOLEAN", null, 6);
metaDataService.getColumn(mediaVideoTable, "should_download", "should_download", "BOOLEAN", null, 7);
metaDataService.getColumn(mediaVideoTable, "title", "title", "TEXT", null, 8);
metaDataService.getColumn(mediaVideoTable, "file_name", "file_name", "TEXT", null, 9);
metaDataService.getColumn(mediaVideoTable, "path", "path", "TEXT", null, 10);
metaDataService.getColumn(mediaVideoTable, "cloud_link", "cloud_link", "TEXT", null, 11);
metaDataService.getColumn(mediaVideoTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaVideoTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaVideoTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaVideoTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaVideoTable, "url", "link_url", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaVideoTable, "review", "review", "BOOLEAN", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaVideoTable, "should_download", "should_download", "BOOLEAN", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaVideoTable, "title", "title", "TEXT", null, 8, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaVideoTable, "file_name", "file_name", "TEXT", null, 9, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaVideoTable, "path", "path", "TEXT", null, 10, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(mediaVideoTable, "cloud_link", "cloud_link", "TEXT", null, 11, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable mediaFileTable = metaDataService.getTable("media_file");
metaDataService.getColumn(mediaFileTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(mediaFileTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(mediaFileTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(mediaFileTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(mediaFileTable, "url", "link_url", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(mediaFileTable, "review", "review", "BOOLEAN", null, 6);
metaDataService.getColumn(mediaFileTable, "should_download", "should_download", "BOOLEAN", null, 7);
metaDataService.getColumn(mediaFileTable, "title", "title", "TEXT", null, 8);
metaDataService.getColumn(mediaFileTable, "file_name", "file_name", "TEXT", null, 9);
metaDataService.getColumn(mediaFileTable, "path", "path", "TEXT", null, 10);
metaDataService.getColumn(mediaFileTable, "cloud_link", "cloud_link", "TEXT", null, 11);
metaDataService.getColumn(mediaFileTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.TRUE, "ID", Boolean.FALSE, null);
metaDataService.getColumn(mediaFileTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "Created", Boolean.FALSE, null);
metaDataService.getColumn(mediaFileTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "Modified", Boolean.FALSE, null);
metaDataService.getColumn(mediaFileTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "Version", Boolean.FALSE, null);
metaDataService.getColumn(mediaFileTable, "url", "link_url", "TEXT", "UNIQUE", 5, Boolean.TRUE, "URL", Boolean.FALSE, null);
metaDataService.getColumn(mediaFileTable, "review", "review", "BOOLEAN", null, 6, Boolean.TRUE, "Review", Boolean.TRUE, "Review");
metaDataService.getColumn(mediaFileTable, "should_download", "should_download", "BOOLEAN", null, 7, Boolean.TRUE, "Download", Boolean.TRUE, "Download");
metaDataService.getColumn(mediaFileTable, "title", "title", "TEXT", null, 8, Boolean.TRUE, "Title", Boolean.FALSE, null);
metaDataService.getColumn(mediaFileTable, "file_name", "file_name", "TEXT", null, 9, Boolean.TRUE, "Dateiname", Boolean.FALSE, null);
metaDataService.getColumn(mediaFileTable, "path", "path", "TEXT", null, 10, Boolean.TRUE, "Verzeichnis", Boolean.FALSE, null);
metaDataService.getColumn(mediaFileTable, "cloud_link", "cloud_link", "TEXT", null, 11, Boolean.TRUE, "Cloud Link", Boolean.FALSE, null);
MetaDataTable artistTable = metaDataService.getTable("artist");
metaDataService.getColumn(artistTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(artistTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(artistTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(artistTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(artistTable, "name", "name", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(artistTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(artistTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(artistTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(artistTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(artistTable, "name", "name", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable publisherTable = metaDataService.getTable("publisher");
metaDataService.getColumn(publisherTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(publisherTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(publisherTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(publisherTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(publisherTable, "name", "name", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(publisherTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(publisherTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(publisherTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(publisherTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(publisherTable, "name", "name", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable comicTable = metaDataService.getTable("comic");
metaDataService.getColumn(comicTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(comicTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(comicTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(comicTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(comicTable, "completed", "completed", "BOOLEAN", null, 5);
metaDataService.getColumn(comicTable, "current_order", "current_order", "BOOLEAN", null, 6);
metaDataService.getColumn(comicTable, "title", "title", "TEXT", "UNIQUE", 7);
metaDataService.getColumn(comicTable, "publisher_id", "publisher_id", "TEXT", null, 8);
metaDataService.getColumn(comicTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicTable, "completed", "completed", "BOOLEAN", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicTable, "current_order", "current_order", "BOOLEAN", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicTable, "title", "title", "TEXT", "UNIQUE", 7, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicTable, "publisher_id", "publisher_id", "TEXT", null, 8, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable issueTable = metaDataService.getTable("issue");
metaDataService.getColumn(issueTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(issueTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(issueTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(issueTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(issueTable, "in_stock", "in_stock", "BOOLEAN", null, 5);
metaDataService.getColumn(issueTable, "is_read", "is_read", "BOOLEAN", null, 6);
metaDataService.getColumn(issueTable, "issue_number", "issue_number", "TEXT", null, 7);
metaDataService.getColumn(issueTable, "comic_id", "comic_id", "TEXT", null, 8);
metaDataService.getColumn(issueTable, "volume_id", "volume_id", "TEXT", null, 9);
metaDataService.getColumn(issueTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(issueTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(issueTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(issueTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(issueTable, "in_stock", "in_stock", "BOOLEAN", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(issueTable, "is_read", "is_read", "BOOLEAN", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(issueTable, "issue_number", "issue_number", "TEXT", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(issueTable, "comic_id", "comic_id", "TEXT", null, 8, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(issueTable, "volume_id", "volume_id", "TEXT", null, 9, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable volumeTable = metaDataService.getTable("volume");
metaDataService.getColumn(volumeTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(volumeTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(volumeTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(volumeTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(volumeTable, "name", "name", "TEXT", null, 5);
metaDataService.getColumn(volumeTable, "comic_id", "comic_id", "TEXT", null, 6);
metaDataService.getColumn(volumeTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(volumeTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(volumeTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(volumeTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(volumeTable, "name", "name", "TEXT", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(volumeTable, "comic_id", "comic_id", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable tpbTable = metaDataService.getTable("trade_paperback");
metaDataService.getColumn(tpbTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(tpbTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(tpbTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(tpbTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(tpbTable, "issue_start", "issue_start", "LONG", null, 5);
metaDataService.getColumn(tpbTable, "issue_end", "issue_end", "LONG", null, 6);
metaDataService.getColumn(tpbTable, "name", "name", "TEXT", null, 7);
metaDataService.getColumn(tpbTable, "comic_id", "comic_id", "TEXT", null, 8);
metaDataService.getColumn(tpbTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(tpbTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(tpbTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(tpbTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(tpbTable, "issue_start", "issue_start", "LONG", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(tpbTable, "issue_end", "issue_end", "LONG", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(tpbTable, "name", "name", "TEXT", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(tpbTable, "comic_id", "comic_id", "TEXT", null, 8, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable storyArcTable = metaDataService.getTable("story_arc");
metaDataService.getColumn(storyArcTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(storyArcTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(storyArcTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(storyArcTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(storyArcTable, "name", "name", "TEXT", null, 5);
metaDataService.getColumn(storyArcTable, "comic_id", "comic_id", "TEXT", null, 6);
metaDataService.getColumn(storyArcTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(storyArcTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(storyArcTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(storyArcTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(storyArcTable, "name", "name", "TEXT", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(storyArcTable, "comic_id", "comic_id", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable worktypeTable = metaDataService.getTable("worktype");
metaDataService.getColumn(worktypeTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(worktypeTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(worktypeTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(worktypeTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(worktypeTable, "name", "name", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(worktypeTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(worktypeTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(worktypeTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(worktypeTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(worktypeTable, "name", "name", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable comicworkTable = metaDataService.getTable("comic_work");
metaDataService.getColumn(comicworkTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(comicworkTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(comicworkTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(comicworkTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(comicworkTable, "artist_id", "artist_id", "TEXT", null, 5);
metaDataService.getColumn(comicworkTable, "comic_id", "comic_id", "TEXT", null, 6);
metaDataService.getColumn(comicworkTable, "work_type_id", "work_type_id", "TEXT", null, 7);
metaDataService.getColumn(comicworkTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicworkTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicworkTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicworkTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicworkTable, "artist_id", "artist_id", "TEXT", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicworkTable, "comic_id", "comic_id", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(comicworkTable, "work_type_id", "work_type_id", "TEXT", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable authorTable = metaDataService.getTable("author");
metaDataService.getColumn(authorTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(authorTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(authorTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(authorTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(authorTable, "first_name", "first_name", "TEXT", null, 5);
metaDataService.getColumn(authorTable, "last_name", "last_name", "TEXT", null, 6);
metaDataService.getColumn(authorTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(authorTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(authorTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(authorTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(authorTable, "first_name", "first_name", "TEXT", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(authorTable, "last_name", "last_name", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable articleTable = metaDataService.getTable("article");
metaDataService.getColumn(articleTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(articleTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(articleTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(articleTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(articleTable, "title", "title", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(articleTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(articleTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(articleTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(articleTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(articleTable, "title", "title", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable articleAuthorTable = metaDataService.getTable("article_author");
metaDataService.getColumn(articleAuthorTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(articleAuthorTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(articleAuthorTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(articleAuthorTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(articleAuthorTable, "article_id", "article_id", "TEXT", null, 5);
metaDataService.getColumn(articleAuthorTable, "author_id", "author_id", "TEXT", null, 6);
metaDataService.getColumn(articleAuthorTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(articleAuthorTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(articleAuthorTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(articleAuthorTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(articleAuthorTable, "article_id", "article_id", "TEXT", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(articleAuthorTable, "author_id", "author_id", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable bookTable = metaDataService.getTable("book");
metaDataService.getColumn(bookTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(bookTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(bookTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(bookTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(bookTable, "isbn", "isbn", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(bookTable, "title", "title", "TEXT", null, 6);
metaDataService.getColumn(bookTable, "year", "year", "LONG", null, 7);
metaDataService.getColumn(bookTable, "publisher_id", "publisher_id", "TEXT", null, 8);
metaDataService.getColumn(bookTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookTable, "isbn", "isbn", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookTable, "title", "title", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookTable, "year", "year", "LONG", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookTable, "publisher_id", "publisher_id", "TEXT", null, 8, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable bookAuthorTable = metaDataService.getTable("book_author");
metaDataService.getColumn(bookAuthorTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(bookAuthorTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(bookAuthorTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(bookAuthorTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(bookAuthorTable, "author_id", "author_id", "TEXT", null, 5);
metaDataService.getColumn(bookAuthorTable, "book_id", "book_id", "TEXT", null, 6);
metaDataService.getColumn(bookAuthorTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookAuthorTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookAuthorTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookAuthorTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookAuthorTable, "author_id", "author_id", "TEXT", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookAuthorTable, "book_id", "book_id", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable bookshelfPublisherTable = metaDataService.getTable("bookshelf_publisher");
metaDataService.getColumn(bookshelfPublisherTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(bookshelfPublisherTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(bookshelfPublisherTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(bookshelfPublisherTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(bookshelfPublisherTable, "name", "name", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(bookshelfPublisherTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookshelfPublisherTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookshelfPublisherTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookshelfPublisherTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(bookshelfPublisherTable, "name", "name", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable sportTable = metaDataService.getTable("sport");
metaDataService.getColumn(sportTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(sportTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(sportTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(sportTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(sportTable, "name", "name", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(sportTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(sportTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(sportTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(sportTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(sportTable, "name", "name", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable playerTable = metaDataService.getTable("player");
metaDataService.getColumn(playerTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(playerTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(playerTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(playerTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(playerTable, "first_name", "first_name", "TEXT", null, 5);
metaDataService.getColumn(playerTable, "last_name", "last_name", "TEXT", null, 6);
metaDataService.getColumn(playerTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(playerTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(playerTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(playerTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(playerTable, "first_name", "first_name", "TEXT", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(playerTable, "last_name", "last_name", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable teamTable = metaDataService.getTable("team");
metaDataService.getColumn(teamTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(teamTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(teamTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(teamTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(teamTable, "name", "name", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(teamTable, "short_name", "short_name", "TEXT", null, 6);
metaDataService.getColumn(teamTable, "sport_id", "sport_id", "TEXT", null, 7);
metaDataService.getColumn(teamTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(teamTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(teamTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(teamTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(teamTable, "name", "name", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(teamTable, "short_name", "short_name", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(teamTable, "sport_id", "sport_id", "TEXT", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable vendorTable = metaDataService.getTable("vendor");
metaDataService.getColumn(vendorTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(vendorTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(vendorTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(vendorTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(vendorTable, "name", "name", "TEXT", "UNIQUE", 5);
metaDataService.getColumn(vendorTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(vendorTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(vendorTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(vendorTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(vendorTable, "name", "name", "TEXT", "UNIQUE", 5, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable fieldPositionTable = metaDataService.getTable("field_position");
metaDataService.getColumn(fieldPositionTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(fieldPositionTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(fieldPositionTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(fieldPositionTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(fieldPositionTable, "name", "name", "TEXT", null, 5);
metaDataService.getColumn(fieldPositionTable, "short_name", "short_name", "TEXT", null, 6);
metaDataService.getColumn(fieldPositionTable, "sport_id", "sport_id", "TEXT", null, 7);
metaDataService.getColumn(fieldPositionTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(fieldPositionTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(fieldPositionTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(fieldPositionTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(fieldPositionTable, "name", "name", "TEXT", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(fieldPositionTable, "short_name", "short_name", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(fieldPositionTable, "sport_id", "sport_id", "TEXT", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable roosterTable = metaDataService.getTable("rooster");
metaDataService.getColumn(roosterTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(roosterTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(roosterTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(roosterTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(roosterTable, "year", "year", "LONG", null, 5);
metaDataService.getColumn(roosterTable, "player_id", "player_id", "TEXT", null, 6);
metaDataService.getColumn(roosterTable, "position_id", "position_id", "TEXT", null, 7);
metaDataService.getColumn(roosterTable, "team_id", "team_id", "TEXT", null, 8);
metaDataService.getColumn(roosterTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(roosterTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(roosterTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(roosterTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(roosterTable, "year", "year", "LONG", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(roosterTable, "player_id", "player_id", "TEXT", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(roosterTable, "position_id", "position_id", "TEXT", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(roosterTable, "team_id", "team_id", "TEXT", null, 8, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable cardSetTable = metaDataService.getTable("card_set");
metaDataService.getColumn(cardSetTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(cardSetTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(cardSetTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(cardSetTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(cardSetTable, "insert_set", "insert_set", "BOOLEAN", null, 5);
metaDataService.getColumn(cardSetTable, "parallel_set", "parallel_set", "BOOLEAN", null, 6);
metaDataService.getColumn(cardSetTable, "name", "name", "TEXT", null, 7);
metaDataService.getColumn(cardSetTable, "vendor_id", "vendor_id", "TEXT", null, 8);
metaDataService.getColumn(cardSetTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardSetTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardSetTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardSetTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardSetTable, "insert_set", "insert_set", "BOOLEAN", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardSetTable, "parallel_set", "parallel_set", "BOOLEAN", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardSetTable, "name", "name", "TEXT", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardSetTable, "vendor_id", "vendor_id", "TEXT", null, 8, Boolean.FALSE, "", Boolean.FALSE, null);
MetaDataTable cardTable = metaDataService.getTable("card");
metaDataService.getColumn(cardTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1);
metaDataService.getColumn(cardTable, "created_date", "created", "TIMESTAMP", null, 2);
metaDataService.getColumn(cardTable, "last_modified_date", "modified", "TIMESTAMP", null, 3);
metaDataService.getColumn(cardTable, "version", "version", "LONG", null, 4);
metaDataService.getColumn(cardTable, "card_number", "card_number", "LONG", null, 5);
metaDataService.getColumn(cardTable, "year", "year", "LONG", null, 6);
metaDataService.getColumn(cardTable, "card_set_id", "card_set_id", "TEXT", null, 7);
metaDataService.getColumn(cardTable, "rooster_id", "rooster_id", "TEXT", null, 8);
metaDataService.getColumn(cardTable, "vendor_id", "vendor_id", "TEXT", null, 9);
metaDataService.getColumn(cardTable, "id", "identifier", "TEXT", "PRIMARY KEY", 1, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardTable, "created_date", "created", "TIMESTAMP", null, 2, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardTable, "last_modified_date", "modified", "TIMESTAMP", null, 3, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardTable, "version", "version", "LONG", null, 4, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardTable, "card_number", "card_number", "LONG", null, 5, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardTable, "year", "year", "LONG", null, 6, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardTable, "card_set_id", "card_set_id", "TEXT", null, 7, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardTable, "rooster_id", "rooster_id", "TEXT", null, 8, Boolean.FALSE, "", Boolean.FALSE, null);
metaDataService.getColumn(cardTable, "vendor_id", "vendor_id", "TEXT", null, 9, Boolean.FALSE, "", Boolean.FALSE, null);
}
}
@@ -30,6 +30,12 @@ public class MetaDataColumn extends AbstractEntity {
private Boolean isShown;
private String columnLabel;
private Boolean showFilter;
private String filterLabel;
@ManyToOne
@JoinColumn(name = "table_id")
@NotNull
@@ -34,7 +34,7 @@ public class MetaDataService {
return table;
}
public void getColumn(MetaDataTable table, String columnName, String columnSyncName, String columnType, String columnModifier, Integer columnOrder) {
public void getColumn(MetaDataTable table, String columnName, String columnSyncName, String columnType, String columnModifier, Integer columnOrder, Boolean isShown, String columnLabel, Boolean showFilter, String filterLabel) {
if (table.getTableColumns().stream().anyMatch(column -> column.getColumnName().equals(columnName))) {
log.info("Column {} with name {} of table {} found, check Values", columnOrder, columnName, table.getTableName());
MetaDataColumn column = table.getTableColumns().get(columnOrder.intValue()-1);
@@ -54,9 +54,21 @@ public class MetaDataService {
log.debug("columnModifier has to be changed to {}", columnModifier);
column.setColumnModifier(columnModifier);
}
if (column.getIsShown() == null) {
log.debug("isShown set to false");
column.setIsShown(Boolean.FALSE);
if (!column.getIsShown().equals(isShown)) {
log.debug("isShown has to be change to {}}", isShown);
column.setIsShown(isShown);
}
if (columnLabel != null && !columnLabel.equals(column.getColumnLabel())) {
log.debug("columnLabel has to be change to {}}", columnLabel);
column.setColumnLabel(columnLabel);
}
if (showFilter != null &&!showFilter.equals(column.getShowFilter())) {
log.debug("showFilter has to be change to {}}", showFilter);
column.setShowFilter(showFilter);
}
if (filterLabel != null && !filterLabel.equals(column.getFilterLabel())) {
log.debug("filterLabel has to be change to {}}", filterLabel);
column.setFilterLabel(filterLabel);
}
metaDataColumnRepository.save(column);
} else {
@@ -26,6 +26,7 @@ public class MetaDataForm extends FormLayout {
TextField columnModifier = new TextField("Column Modifier");
IntegerField columnOrder = new IntegerField("Column Order");
Checkbox isShown = new Checkbox("Is Shown");
Checkbox showFilter = new Checkbox("Show Filter");
Button save = new com.vaadin.flow.component.button.Button("Save");
Button delete = new com.vaadin.flow.component.button.Button("Delete");
@@ -39,7 +40,12 @@ public class MetaDataForm extends FormLayout {
table.setItems(tables);
table.setItemLabelGenerator(MetaDataTable::getTableName);
add(table, columnName, columnSyncName, columnModifier, columnOrder, isShown, createButtonsLayout());
add(table, 2);
add(columnName, 2);
add(columnSyncName, 2);
add(columnModifier, 2);
add(columnOrder, 2);
add(isShown, showFilter, createButtonsLayout());
}
private HorizontalLayout createButtonsLayout() {
@@ -42,7 +42,7 @@ public class MetaDataView extends VerticalLayout {
private void configureGrid() {
grid.addClassName("metadata-grid");
grid.setSizeFull();
grid.setColumns("table.tableName", "columnName", "columnSyncName", "columnModifier", "columnOrder", "isShown");
grid.setColumns("table.tableName", "columnName", "columnSyncName", "columnModifier", "columnOrder", "isShown", "showFilter");
grid.getColumns().forEach(col -> col.setAutoWidth(true));
grid.asSingleSelect().addValueChangeListener(event -> editMetaData(event.getValue()));
}