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
+1
View File
@@ -3,3 +3,4 @@ __pycache__/
bonus/
icons/
icons-shadowless/
.vscode/
+36
View File
@@ -0,0 +1,36 @@
image: gradle:8.6-jdk21-alpine
stages:
- build
- test
- publish
# Disable the Gradle daemon for Continuous Integration servers as correctness
# is usually a priority over speed in CI environments. Using a fresh
# runtime for each build is more reliable since the runtime is completely
# isolated from any previous builds.
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
before_script:
- GRADLE_USER_HOME="$(pwd)/.gradle"
- export GRADLE_USER_HOME
build:
stage: build
script:
- cd springboot
- gradle assemble --no-daemon
test:
stage: test
script:
- cd springboot
- gradle check --no-daemon
publish:
stage: publish
script:
- cd springboot
- gradle --no-daemon publish -PgitlabPackageRegistryUsername=gitlab-ci-token -PgitlabPackageRegistryPassword="$CI_JOB_TOKEN"
+37 -35
View File
@@ -5,10 +5,11 @@ from PySide6.QtWidgets import QHBoxLayout, QCheckBox
class KontorModelConfig:
def __init__(self, db_config, main_window, table_name: str):
self.header = []
self.header = {}
self.filter = {}
self.main_window = main_window
self._table = table_name
self._table_id = None
self.db_conn = mariadb.connect(
host=db_config['mariadb']['host'],
port=db_config['mariadb']['port'],
@@ -19,64 +20,65 @@ class KontorModelConfig:
self.get_table_config()
def get_table_id(self):
if self._table_id is not None:
return
cursor = self.db_conn.cursor()
cursor.execute("SELECT id, created_date, last_modified_date FROM meta_data_table WHERE table_name=?", (self._table, ))
rows = cursor.fetchall()
if len(rows) == 1:
return rows[0][0]
return None
self._table_id = rows[0][0]
def get_table_config(self):
table_id = self.get_table_id()
if self._table_id is None:
self.get_table_id()
cursor = self.db_conn.cursor()
cursor.execute("SELECT id, column_name, column_order FROM meta_data_column WHERE table_id=? AND is_shown is true", (table_id, ))
cursor.execute("SELECT column_name, column_order, column_label FROM meta_data_column WHERE table_id=? AND is_shown is true ORDER bY column_order", (self._table_id, ))
rows = cursor.fetchall()
self.header.clear()
for (column_id, column_name, column_order) in rows:
self.header.insert(column_order-1, column_name)
print(f"retrieved {len(rows)} columns, set {len(self.header)} headers")
def get_header(self) -> list:
self.get_table_config()
return self.header
order = 0
for (column_name, column_order, column_label) in rows:
self.header[order] = { 'column': column_name, 'label': column_label, 'order': column_order}
order += 1
# print(f"retrieved {len(rows)} columns, set {len(self.header)} headers")
cursor.execute("SELECT column_name, filter_label from meta_data_column WHERE table_id=? AND show_filter is true", (self._table_id, ))
rows = cursor.fetchall()
for row in rows:
self.filter[row[0]] = {'label': row[1], 'widget': None}
# print(f"retrieved {len(rows)} filters: {self.filter}")
def get_filter(self) -> str:
filter_rule = ""
# print(self.filter["download"].isChecked())
if self.filter["download"].isChecked():
# print(self.filter["download"].isChecked())
filter_rule = "WHERE should_download is true"
if self.filter["review"].isChecked():
if len(filter_rule) > 0:
filter_rule += " AND "
else:
filter_rule += "WHERE "
filter_rule += "review is true"
print(f"{filter_rule=}")
for column, filter_info in self.filter.items():
# print(column, filter_info)
if filter_info['widget'].isChecked():
# print(column, filter_info, filter_rule, len(filter_rule))
if len(filter_rule) < 1:
filter_rule += "WHERE "
if len(filter_rule) > 8:
filter_rule += " AND "
filter_rule += f"{column} is true"
# print(f"{filter_rule=}")
return filter_rule
def get_statement(self) -> str:
filter_rule = self.get_filter()
self.get_table_config()
# self.get_table_config()
columns = ""
for index in range(len(self.header)):
for index, column in self.header.items():
if index > 0:
columns += ", "
columns += self.header[index]
columns += column['column']
statement = f"SELECT {columns} FROM media_file {filter_rule}"
return statement
def get_filter_layout(self) -> QHBoxLayout:
filter_layout = QHBoxLayout()
download_checkbox = QCheckBox()
download_checkbox.setText("Download")
download_checkbox.checkStateChanged.connect(self.main_window.refresh)
self.filter["download"] = download_checkbox
review_checkbox = QCheckBox()
review_checkbox.setText("Review")
review_checkbox.checkStateChanged.connect(self.main_window.refresh)
self.filter["review"] = review_checkbox
filter_layout.addWidget(review_checkbox)
filter_layout.addWidget(download_checkbox)
for column, filter_info in self.filter.items():
filter_checkbox = QCheckBox()
filter_checkbox.setText(filter_info['label'])
filter_checkbox.checkStateChanged.connect(self.main_window.refresh)
self.filter[column]['widget'] = filter_checkbox
filter_layout.addWidget(filter_checkbox)
filter_layout.addStretch()
return filter_layout
+6 -5
View File
@@ -19,7 +19,7 @@ class KontorTableModel(QAbstractTableModel):
cursor = self._config.db_conn.cursor()
cursor.execute(self._config.get_statement())
rows = cursor.fetchall()
print(len(rows))
# print(len(rows))
if len(rows) > 0:
self.beginResetModel()
for row in rows:
@@ -39,7 +39,7 @@ class KontorTableModel(QAbstractTableModel):
def headerData(self, col, orientation, role=Qt.ItemDataRole.DisplayRole):
if orientation == Qt.Orientation.Horizontal and role == Qt.ItemDataRole.DisplayRole:
return self._config.header[col]
return self._config.header[col]['column']
if orientation == Qt.Orientation.Vertical and role == Qt.ItemDataRole.DisplayRole:
return str(col+1)
@@ -48,6 +48,7 @@ class KontorTableModel(QAbstractTableModel):
return None
value = self._data[index.row()][index.column()]
if role == Qt.ItemDataRole.DisplayRole:
# print('{}: {}'.format(value, type(value)))
if isinstance(value, datetime):
return value.strftime("%Y-%m-%d %M:%M:%S")
if isinstance(value, str):
@@ -57,7 +58,7 @@ class KontorTableModel(QAbstractTableModel):
return self._main_window.tick
else:
return self._main_window.cross
return value
return str(value)
if role == Qt.ItemDataRole.DecorationRole:
if isinstance(value, bytes):
# print('{}: {}'.format(value, type(value)))
@@ -69,8 +70,8 @@ class KontorTableModel(QAbstractTableModel):
def columnCount(self, index=QModelIndex()):
# The following takes the first sub-list, and returns
# the length (only works if all rows are an equal length)
print(f"Header count: {len(self._config.get_header())}")
return len(self._config.get_header())
# print(f"Header count: {len(self._config.get_header())}")
return len(self._config.header)
def setData(self, index, value, role=Qt.ItemDataRole.EditRole):
if role == Qt.ItemDataRole.EditRole:
@@ -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()));
}