From 2b3d4aa27d0e5343405f5541832173a40911b46b Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 11 Apr 2019 12:15:26 +0200 Subject: [PATCH] SEBSERV-44 DAO implementations --- .../seb/sebserver/gbl/api/EntityType.java | 2 +- .../ethz/seb/sebserver/gbl/model/Domain.java | 5 +- .../gbl/model/sebconfig/Configuration.java | 22 +- .../sebconfig/ConfigurationAttribute.java | 18 +- .../model/sebconfig/ConfigurationNode.java | 27 +- .../sebconfig/ConfigurationTableValue.java | 42 +- .../model/sebconfig/ConfigurationValue.java | 27 +- .../model/sebconfig/ExamConfiguration.java | 8 +- ...AdditionalAttributesDynamicSqlSupport.java | 14 +- .../mapper/AdditionalAttributesMapper.java | 36 +- ...ientConnectionRecordDynamicSqlSupport.java | 20 +- .../mapper/ClientConnectionRecordMapper.java | 36 +- .../ClientEventRecordDynamicSqlSupport.java | 18 +- .../batis/mapper/ClientEventRecordMapper.java | 36 +- ...ationAttributeRecordDynamicSqlSupport.java | 20 +- .../ConfigurationAttributeRecordMapper.java | 36 +- ...figurationNodeRecordDynamicSqlSupport.java | 20 +- .../mapper/ConfigurationNodeRecordMapper.java | 36 +- .../ConfigurationRecordDynamicSqlSupport.java | 19 +- .../mapper/ConfigurationRecordMapper.java | 50 ++- ...igurationValueRecordDynamicSqlSupport.java | 21 +- .../ConfigurationValueRecordMapper.java | 50 ++- ...nfigurationMapRecordDynamicSqlSupport.java | 17 +- .../ExamConfigurationMapRecordMapper.java | 50 ++- .../mapper/ExamRecordDynamicSqlSupport.java | 22 +- .../batis/mapper/ExamRecordMapper.java | 36 +- .../IndicatorRecordDynamicSqlSupport.java | 14 +- .../batis/mapper/IndicatorRecordMapper.java | 36 +- .../InstitutionRecordDynamicSqlSupport.java | 16 +- .../batis/mapper/InstitutionRecordMapper.java | 36 +- .../LmsSetupRecordDynamicSqlSupport.java | 22 +- .../batis/mapper/LmsSetupRecordMapper.java | 36 +- .../OrientationRecordDynamicSqlSupport.java | 22 +- .../batis/mapper/OrientationRecordMapper.java | 36 +- .../mapper/RoleRecordDynamicSqlSupport.java | 10 +- .../batis/mapper/RoleRecordMapper.java | 36 +- ...ebClientConfigRecordDynamicSqlSupport.java | 18 +- .../mapper/SebClientConfigRecordMapper.java | 36 +- .../ThresholdRecordDynamicSqlSupport.java | 12 +- .../batis/mapper/ThresholdRecordMapper.java | 36 +- ...serActivityLogRecordDynamicSqlSupport.java | 18 +- .../mapper/UserActivityLogRecordMapper.java | 36 +- .../mapper/UserRecordDynamicSqlSupport.java | 24 +- .../batis/mapper/UserRecordMapper.java | 36 +- .../batis/model/AdditionalAttributes.java | 28 +- .../batis/model/ClientConnectionRecord.java | 40 +- .../batis/model/ClientEventRecord.java | 36 +- .../model/ConfigurationAttributeRecord.java | 40 +- .../batis/model/ConfigurationNodeRecord.java | 40 +- .../batis/model/ConfigurationRecord.java | 42 +- .../batis/model/ConfigurationValueRecord.java | 46 ++- .../model/ExamConfigurationMapRecord.java | 38 +- .../datalayer/batis/model/ExamRecord.java | 44 +- .../batis/model/IndicatorRecord.java | 28 +- .../batis/model/InstitutionRecord.java | 32 +- .../datalayer/batis/model/LmsSetupRecord.java | 44 +- .../batis/model/OrientationRecord.java | 44 +- .../datalayer/batis/model/RoleRecord.java | 20 +- .../batis/model/SebClientConfigRecord.java | 36 +- .../batis/model/ThresholdRecord.java | 24 +- .../batis/model/UserActivityLogRecord.java | 36 +- .../datalayer/batis/model/UserRecord.java | 48 +-- .../bulkaction/BulkActionServiceImpl.java | 25 +- .../dao/ConfigurationAttributeDAO.java | 15 + .../servicelayer/dao/ConfigurationDAO.java | 15 + .../dao/ConfigurationNodeDAO.java | 18 + .../dao/ConfigurationValueDAO.java | 24 ++ .../servicelayer/dao/EntityDAO.java | 46 ++- .../dao/ExamConfigurationDAO.java | 18 + .../servicelayer/dao/FilterMap.java | 55 ++- .../impl/ConfigurationAttributeDAOImpl.java | 234 +++++++++++ .../dao/impl/ConfigurationDAOImpl.java | 217 ++++++++++ .../dao/impl/ConfigurationNodeDAOImpl.java | 359 +++++++++++++++++ .../dao/impl/ConfigurationValueDAOImpl.java | 376 ++++++++++++++++++ .../dao/impl/ExamConfigurationDAOImpl.java | 319 +++++++++++++++ .../servicelayer/dao/impl/ExamDAOImpl.java | 32 +- .../dao/impl/IndicatorDAOImpl.java | 91 ++++- .../dao/impl/InstitutionDAOImpl.java | 11 +- .../dao/impl/LmsSetupDAOImpl.java | 11 +- .../dao/impl/OrientationDAOImpl.java | 9 +- .../dao/impl/SebClientConfigDAOImpl.java | 10 +- .../dao/impl/UserActivityLogDAOImpl.java | 17 +- .../servicelayer/dao/impl/UserDAOImpl.java | 27 +- src/main/resources/schema-demo.sql | 59 ++- src/main/resources/schema-dev.sql | 44 +- src/test/resources/schema-test.sql | 45 ++- 86 files changed, 2939 insertions(+), 972 deletions(-) create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationAttributeDAO.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationDAO.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationNodeDAO.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationValueDAO.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ExamConfigurationDAO.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationAttributeDAOImpl.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOImpl.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationNodeDAOImpl.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationValueDAOImpl.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationDAOImpl.java diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/api/EntityType.java b/src/main/java/ch/ethz/seb/sebserver/gbl/api/EntityType.java index 92ef6609..dbd1e485 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/api/EntityType.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/api/EntityType.java @@ -2,7 +2,7 @@ package ch.ethz.seb.sebserver.gbl.api; import javax.annotation.Generated; -@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2019-03-19T14:35:50.622+01:00") +@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2019-04-10T15:17:04.562+02:00") public enum EntityType { CONFIGURATION_ATTRIBUTE, CONFIGURATION_VALUE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/Domain.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/Domain.java index c5f42463..bca99d52 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/Domain.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/Domain.java @@ -5,7 +5,7 @@ import javax.annotation.Generated; /** Defines the global names of the domain model and domain model fields. * This shall be used as a static overall domain model names reference within SEB Server Web-Service as well as within the integrated GUI * This file is generated by the org.eth.demo.sebserver.gen.DomainModelNameReferencePlugin and must not be edited manually.**/ -@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2019-03-19T14:35:50.544+01:00") +@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2019-04-10T15:17:04.475+02:00") public interface Domain { interface CONFIGURATION_ATTRIBUTE { @@ -25,6 +25,7 @@ public interface Domain { String TYPE_NAME = "ConfigurationValue"; String REFERENCE_NAME = "configurationValues"; String ATTR_ID = "id"; + String ATTR_INSTITUTION_ID = "institutionId"; String ATTR_CONFIGURATION_ID = "configurationId"; String ATTR_CONFIGURATION_ATTRIBUTE_ID = "configurationAttributeId"; String ATTR_LIST_INDEX = "listIndex"; @@ -50,6 +51,7 @@ public interface Domain { String TYPE_NAME = "Configuration"; String REFERENCE_NAME = "configurations"; String ATTR_ID = "id"; + String ATTR_INSTITUTION_ID = "institutionId"; String ATTR_CONFIGURATION_NODE_ID = "configurationNodeId"; String ATTR_VERSION = "version"; String ATTR_VERSION_DATE = "versionDate"; @@ -73,6 +75,7 @@ public interface Domain { String TYPE_NAME = "ExamConfigurationMap"; String REFERENCE_NAME = "examConfigurationMaps"; String ATTR_ID = "id"; + String ATTR_INSTITUTION_ID = "institutionId"; String ATTR_EXAM_ID = "examId"; String ATTR_CONFIGURATION_NODE_ID = "configurationNodeId"; String ATTR_USER_NAMES = "userNames"; diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/Configuration.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/Configuration.java index beb98a0c..2da240e5 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/Configuration.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/Configuration.java @@ -19,22 +19,25 @@ import com.fasterxml.jackson.annotation.JsonProperty; import ch.ethz.seb.sebserver.gbl.Constants; import ch.ethz.seb.sebserver.gbl.api.EntityType; import ch.ethz.seb.sebserver.gbl.model.Domain.CONFIGURATION; -import ch.ethz.seb.sebserver.gbl.model.Domain.CONFIGURATION_NODE; import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.GrantEntity; @JsonIgnoreProperties(ignoreUnknown = true) public final class Configuration implements GrantEntity { + public static final String FILTER_ATTR_CONFIGURATION_NODE_ID = "configurationNodeId"; + public static final String FILTER_ATTR_FROM_DATE = "fromDate"; + public static final String FILTER_ATTR_FOLLOWUP = "followup"; + @JsonProperty(CONFIGURATION.ATTR_ID) public final Long id; @NotNull - @JsonProperty(CONFIGURATION_NODE.ATTR_INSTITUTION_ID) + @JsonProperty(CONFIGURATION.ATTR_INSTITUTION_ID) public final Long institutionId; @NotNull @JsonProperty(CONFIGURATION.ATTR_CONFIGURATION_NODE_ID) - public final Long nodeId; + public final Long configurationNodeId; @JsonProperty(CONFIGURATION.ATTR_VERSION) public final String version; @@ -50,15 +53,15 @@ public final class Configuration implements GrantEntity { @JsonCreator public Configuration( @JsonProperty(CONFIGURATION.ATTR_ID) final Long id, - @JsonProperty(CONFIGURATION_NODE.ATTR_INSTITUTION_ID) final Long institutionId, - @JsonProperty(CONFIGURATION.ATTR_CONFIGURATION_NODE_ID) final Long nodeId, + @JsonProperty(CONFIGURATION.ATTR_INSTITUTION_ID) final Long institutionId, + @JsonProperty(CONFIGURATION.ATTR_CONFIGURATION_NODE_ID) final Long configurationNodeId, @JsonProperty(CONFIGURATION.ATTR_VERSION) final String version, @JsonProperty(CONFIGURATION.ATTR_VERSION_DATE) final DateTime versionDate, @JsonProperty(CONFIGURATION.ATTR_FOLLOWUP) final Boolean followup) { this.id = id; this.institutionId = institutionId; - this.nodeId = nodeId; + this.configurationNodeId = configurationNodeId; this.version = version; this.versionDate = versionDate; this.followup = followup; @@ -92,8 +95,8 @@ public final class Configuration implements GrantEntity { return this.id; } - public Long getNodeId() { - return this.nodeId; + public Long getConfigurationNodeId() { + return this.configurationNodeId; } public String getVersion() { @@ -110,7 +113,8 @@ public final class Configuration implements GrantEntity { @Override public String toString() { - return "Configuration [id=" + this.id + ", nodeId=" + this.nodeId + ", version=" + this.version + return "Configuration [id=" + this.id + ", configurationNodeId=" + this.configurationNodeId + ", version=" + + this.version + ", versionDate=" + this.versionDate + ", followup=" + this.followup + "]"; } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationAttribute.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationAttribute.java index 0b5bfbf7..31b1cf59 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationAttribute.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationAttribute.java @@ -22,6 +22,9 @@ import ch.ethz.seb.sebserver.gbl.model.Entity; @JsonIgnoreProperties(ignoreUnknown = true) public final class ConfigurationAttribute implements Entity { + public static final String FILTER_ATTR_PARENT_ID = "parentId"; + public static final String FILTER_ATTR_TYPE = "type"; + @JsonProperty(CONFIGURATION_ATTRIBUTE.ATTR_ID) public final Long id; @@ -40,6 +43,9 @@ public final class ConfigurationAttribute implements Entity { @JsonProperty(CONFIGURATION_ATTRIBUTE.ATTR_RESOURCES) public final String resources; + @JsonProperty(CONFIGURATION_ATTRIBUTE.ATTR_VALIDATOR) + public final String validator; + @JsonProperty(CONFIGURATION_ATTRIBUTE.ATTR_DEPENDENCIES) public final String dependencies; @@ -53,6 +59,7 @@ public final class ConfigurationAttribute implements Entity { @JsonProperty(CONFIGURATION_ATTRIBUTE.ATTR_NAME) final String name, @JsonProperty(CONFIGURATION_ATTRIBUTE.ATTR_TYPE) final AttributeType type, @JsonProperty(CONFIGURATION_ATTRIBUTE.ATTR_RESOURCES) final String resources, + @JsonProperty(CONFIGURATION_ATTRIBUTE.ATTR_VALIDATOR) final String validator, @JsonProperty(CONFIGURATION_ATTRIBUTE.ATTR_DEPENDENCIES) final String dependencies, @JsonProperty(CONFIGURATION_ATTRIBUTE.ATTR_DEFAULT_VALUE) final String defaultValue) { @@ -61,6 +68,7 @@ public final class ConfigurationAttribute implements Entity { this.name = name; this.type = type; this.resources = resources; + this.validator = validator; this.dependencies = dependencies; this.defaultValue = defaultValue; } @@ -98,6 +106,10 @@ public final class ConfigurationAttribute implements Entity { return this.resources; } + public String getValidator() { + return this.validator; + } + public String getDependencies() { return this.dependencies; } @@ -110,9 +122,9 @@ public final class ConfigurationAttribute implements Entity { public String toString() { return "ConfigurationAttribute [id=" + this.id + ", parentId=" + this.parentId + ", name=" + this.name + ", type=" + this.type - + ", resources=" + this.resources + ", dependencies=" + this.dependencies + ", defaultValue=" - + this.defaultValue - + "]"; + + ", resources=" + this.resources + ", validator=" + this.validator + ", dependencies=" + + this.dependencies + + ", defaultValue=" + this.defaultValue + "]"; } } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationNode.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationNode.java index dae3817f..4e3aef2d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationNode.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationNode.java @@ -16,11 +16,16 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import ch.ethz.seb.sebserver.gbl.api.EntityType; +import ch.ethz.seb.sebserver.gbl.model.Activatable; import ch.ethz.seb.sebserver.gbl.model.Domain.CONFIGURATION_NODE; import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.GrantEntity; @JsonIgnoreProperties(ignoreUnknown = true) -public final class ConfigurationNode implements GrantEntity { +public final class ConfigurationNode implements GrantEntity, Activatable { + + public static final String FILTER_ATTR_DESCRIPTION = "description"; + public static final String FILTER_ATTR_TYPE = "type"; + public static final String FILTER_ATTR_TEMPLATE = "template"; public enum ConfigurationType { TEMPLATE, @@ -52,6 +57,10 @@ public final class ConfigurationNode implements GrantEntity { @JsonProperty(CONFIGURATION_NODE.ATTR_OWNER) public final String owner; + /** Indicates whether this Configuration is active or not */ + @JsonProperty(CONFIGURATION_NODE.ATTR_ACTIVE) + public final Boolean active; + @JsonCreator public ConfigurationNode( @JsonProperty(CONFIGURATION_NODE.ATTR_ID) final Long id, @@ -60,7 +69,8 @@ public final class ConfigurationNode implements GrantEntity { @JsonProperty(CONFIGURATION_NODE.ATTR_DESCRIPTION) final String description, @JsonProperty(CONFIGURATION_NODE.ATTR_TYPE) final ConfigurationType type, @JsonProperty(CONFIGURATION_NODE.ATTR_TEMPLATE) final String templateName, - @JsonProperty(CONFIGURATION_NODE.ATTR_OWNER) final String owner) { + @JsonProperty(CONFIGURATION_NODE.ATTR_OWNER) final String owner, + @JsonProperty(CONFIGURATION_NODE.ATTR_ACTIVE) final Boolean active) { this.id = id; this.institutionId = institutionId; @@ -69,6 +79,7 @@ public final class ConfigurationNode implements GrantEntity { this.type = type; this.templateName = templateName; this.owner = owner; + this.active = active; } @Override @@ -114,12 +125,22 @@ public final class ConfigurationNode implements GrantEntity { return this.templateName; } + public Boolean getActive() { + return this.active; + } + + @Override + public boolean isActive() { + return this.active; + } + @Override public String toString() { return "ConfigurationNode [id=" + this.id + ", institutionId=" + this.institutionId + ", name=" + this.name + ", description=" + this.description + ", type=" + this.type + ", templateName=" + this.templateName + ", owner=" - + this.owner + "]"; + + this.owner + ", active=" + + this.active + "]"; } } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationTableValue.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationTableValue.java index 3ed80f86..ffd6fd41 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationTableValue.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationTableValue.java @@ -11,23 +11,31 @@ package ch.ethz.seb.sebserver.gbl.model.sebconfig; import java.util.Collections; import java.util.List; +import javax.validation.constraints.NotNull; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import ch.ethz.seb.sebserver.gbl.api.EntityType; import ch.ethz.seb.sebserver.gbl.model.Domain.CONFIGURATION_VALUE; +import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.GrantEntity; @JsonIgnoreProperties(ignoreUnknown = true) -public final class ConfigurationTableValue { +public final class ConfigurationTableValue implements GrantEntity { public static final String ATTR_COLUMNS = "columnAttributeIds"; public static final String ATTR_VALUES = "values"; + @NotNull + @JsonProperty(CONFIGURATION_VALUE.ATTR_INSTITUTION_ID) + public final Long institutionId; + @JsonProperty(CONFIGURATION_VALUE.ATTR_CONFIGURATION_ID) public final Long configurationId; @JsonProperty(CONFIGURATION_VALUE.ATTR_CONFIGURATION_ATTRIBUTE_ID) - public final long attributeId; + public final Long attributeId; @JsonProperty(ATTR_COLUMNS) public final List columnAttributeIds; @@ -37,17 +45,39 @@ public final class ConfigurationTableValue { @JsonCreator public ConfigurationTableValue( + @JsonProperty(CONFIGURATION_VALUE.ATTR_INSTITUTION_ID) final Long institutionId, @JsonProperty(CONFIGURATION_VALUE.ATTR_CONFIGURATION_ID) final Long configurationId, @JsonProperty(CONFIGURATION_VALUE.ATTR_CONFIGURATION_ATTRIBUTE_ID) final Long attributeId, @JsonProperty(ATTR_COLUMNS) final List columns, @JsonProperty(ATTR_VALUES) final List values) { + this.institutionId = institutionId; this.configurationId = configurationId; this.attributeId = attributeId; this.columnAttributeIds = Collections.unmodifiableList(columns); this.values = Collections.unmodifiableList(values); } + @Override + public EntityType entityType() { + return EntityType.CONFIGURATION_VALUE; + } + + @Override + public String getName() { + return null; + } + + @Override + public String getModelId() { + return null; + } + + @Override + public Long getInstitutionId() { + return this.institutionId; + } + public Long getConfigurationId() { return this.configurationId; } @@ -66,8 +96,10 @@ public final class ConfigurationTableValue { @Override public String toString() { - return "ConfigurationTableValue [configurationId=" + this.configurationId + ", attributeId=" + this.attributeId - + ", columnAttributeIds=" + this.columnAttributeIds + ", values=" + this.values + "]"; + return "ConfigurationTableValue [institutionId=" + this.institutionId + ", configurationId=" + + this.configurationId + + ", attributeId=" + this.attributeId + ", columnAttributeIds=" + this.columnAttributeIds + ", values=" + + this.values + + "]"; } - } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationValue.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationValue.java index 8b7a140d..2ef3d6da 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationValue.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ConfigurationValue.java @@ -8,20 +8,29 @@ package ch.ethz.seb.sebserver.gbl.model.sebconfig; +import javax.validation.constraints.NotNull; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import ch.ethz.seb.sebserver.gbl.api.EntityType; import ch.ethz.seb.sebserver.gbl.model.Domain.CONFIGURATION_VALUE; -import ch.ethz.seb.sebserver.gbl.model.Entity; +import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.GrantEntity; @JsonIgnoreProperties(ignoreUnknown = true) -public final class ConfigurationValue implements Entity { +public final class ConfigurationValue implements GrantEntity { + + public static final String FILTER_ATTR_CONFIGURATION_ID = "configurationId"; + public static final String FILTER_ATTR_CONFIGURATION_ATTRIBUTE_ID = "attributeId"; @JsonProperty(CONFIGURATION_VALUE.ATTR_ID) public final Long id; + @NotNull + @JsonProperty(CONFIGURATION_VALUE.ATTR_INSTITUTION_ID) + public final Long institutionId; + @JsonProperty(CONFIGURATION_VALUE.ATTR_CONFIGURATION_ID) public final Long configurationId; @@ -37,12 +46,14 @@ public final class ConfigurationValue implements Entity { @JsonCreator public ConfigurationValue( @JsonProperty(CONFIGURATION_VALUE.ATTR_ID) final Long id, + @JsonProperty(CONFIGURATION_VALUE.ATTR_INSTITUTION_ID) final Long institutionId, @JsonProperty(CONFIGURATION_VALUE.ATTR_CONFIGURATION_ID) final Long configurationId, @JsonProperty(CONFIGURATION_VALUE.ATTR_CONFIGURATION_ATTRIBUTE_ID) final Long attributeId, @JsonProperty(CONFIGURATION_VALUE.ATTR_LIST_INDEX) final Integer listIndex, @JsonProperty(CONFIGURATION_VALUE.ATTR_VALUE) final String value) { this.id = id; + this.institutionId = institutionId; this.configurationId = configurationId; this.attributeId = attributeId; this.listIndex = listIndex; @@ -70,6 +81,11 @@ public final class ConfigurationValue implements Entity { return this.id; } + @Override + public Long getInstitutionId() { + return this.institutionId; + } + public Long getConfigurationId() { return this.configurationId; } @@ -88,9 +104,10 @@ public final class ConfigurationValue implements Entity { @Override public String toString() { - return "ConfigurationValue [id=" + this.id + ", configurationId=" + this.configurationId + ", attributeId=" - + this.attributeId - + ", listIndex=" + this.listIndex + ", value=" + this.value + "]"; + return "ConfigurationValue [id=" + this.id + ", institutionId=" + this.institutionId + ", configurationId=" + + this.configurationId + ", attributeId=" + this.attributeId + ", listIndex=" + this.listIndex + + ", value=" + this.value + + "]"; } } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ExamConfiguration.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ExamConfiguration.java index 8deed88a..1a8e640d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ExamConfiguration.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/sebconfig/ExamConfiguration.java @@ -15,18 +15,20 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import ch.ethz.seb.sebserver.gbl.api.EntityType; -import ch.ethz.seb.sebserver.gbl.model.Domain.EXAM; import ch.ethz.seb.sebserver.gbl.model.Domain.EXAM_CONFIGURATION_MAP; import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.GrantEntity; @JsonIgnoreProperties(ignoreUnknown = true) public final class ExamConfiguration implements GrantEntity { + public static final String FILTER_ATTR_EXAM_ID = "examId"; + public static final String FILTER_ATTR_CONFIG_ID = "configurationNodeId"; + @JsonProperty(EXAM_CONFIGURATION_MAP.ATTR_ID) public final Long id; @NotNull - @JsonProperty(EXAM.ATTR_INSTITUTION_ID) + @JsonProperty(EXAM_CONFIGURATION_MAP.ATTR_INSTITUTION_ID) public final Long institutionId; @NotNull @@ -43,7 +45,7 @@ public final class ExamConfiguration implements GrantEntity { @JsonCreator public ExamConfiguration( @JsonProperty(EXAM_CONFIGURATION_MAP.ATTR_ID) final Long id, - @JsonProperty(EXAM.ATTR_INSTITUTION_ID) final Long institutionId, + @JsonProperty(EXAM_CONFIGURATION_MAP.ATTR_INSTITUTION_ID) final Long institutionId, @JsonProperty(EXAM_CONFIGURATION_MAP.ATTR_EXAM_ID) final Long examId, @JsonProperty(EXAM_CONFIGURATION_MAP.ATTR_CONFIGURATION_NODE_ID) final Long configurationNodeId, @JsonProperty(EXAM_CONFIGURATION_MAP.ATTR_USER_NAMES) final String userNames) { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/AdditionalAttributesDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/AdditionalAttributesDynamicSqlSupport.java index 210d17ab..ddc35b9d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/AdditionalAttributesDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/AdditionalAttributesDynamicSqlSupport.java @@ -6,25 +6,25 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class AdditionalAttributesDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source Table: additional_attributes") public static final AdditionalAttributes additionalAttributes = new AdditionalAttributes(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source field: additional_attributes.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.id") public static final SqlColumn id = additionalAttributes.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source field: additional_attributes.entity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source field: additional_attributes.entity_type") public static final SqlColumn entityType = additionalAttributes.entityType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source field: additional_attributes.entity_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source field: additional_attributes.entity_id") public static final SqlColumn entityId = additionalAttributes.entityId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source field: additional_attributes.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source field: additional_attributes.name") public static final SqlColumn name = additionalAttributes.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source field: additional_attributes.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source field: additional_attributes.value") public static final SqlColumn value = additionalAttributes.value; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source Table: additional_attributes") public static final class AdditionalAttributes extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/AdditionalAttributesMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/AdditionalAttributesMapper.java index 99c0ebe7..a237c9a0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/AdditionalAttributesMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/AdditionalAttributesMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface AdditionalAttributesMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -56,7 +56,7 @@ public interface AdditionalAttributesMapper { }) AdditionalAttributes selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -67,22 +67,22 @@ public interface AdditionalAttributesMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(additionalAttributes); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.902+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, additionalAttributes); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.903+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, additionalAttributes) .where(id, isEqualTo(id_)) @@ -90,7 +90,7 @@ public interface AdditionalAttributesMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.903+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default int insert(AdditionalAttributes record) { return insert(SqlBuilder.insert(record) .into(additionalAttributes) @@ -102,7 +102,7 @@ public interface AdditionalAttributesMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.903+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default int insertSelective(AdditionalAttributes record) { return insert(SqlBuilder.insert(record) .into(additionalAttributes) @@ -114,19 +114,19 @@ public interface AdditionalAttributesMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.903+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, entityType, entityId, name, value) .from(additionalAttributes); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.903+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, entityType, entityId, name, value) .from(additionalAttributes); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.903+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default AdditionalAttributes selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, entityType, entityId, name, value) .from(additionalAttributes) @@ -135,7 +135,7 @@ public interface AdditionalAttributesMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.903+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default UpdateDSL> updateByExample(AdditionalAttributes record) { return UpdateDSL.updateWithMapper(this::update, additionalAttributes) .set(entityType).equalTo(record::getEntityType) @@ -144,7 +144,7 @@ public interface AdditionalAttributesMapper { .set(value).equalTo(record::getValue); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.903+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default UpdateDSL> updateByExampleSelective(AdditionalAttributes record) { return UpdateDSL.updateWithMapper(this::update, additionalAttributes) .set(entityType).equalToWhenPresent(record::getEntityType) @@ -153,7 +153,7 @@ public interface AdditionalAttributesMapper { .set(value).equalToWhenPresent(record::getValue); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.903+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default int updateByPrimaryKey(AdditionalAttributes record) { return UpdateDSL.updateWithMapper(this::update, additionalAttributes) .set(entityType).equalTo(record::getEntityType) @@ -165,7 +165,7 @@ public interface AdditionalAttributesMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.903+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.780+02:00", comments="Source Table: additional_attributes") default int updateByPrimaryKeySelective(AdditionalAttributes record) { return UpdateDSL.updateWithMapper(this::update, additionalAttributes) .set(entityType).equalToWhenPresent(record::getEntityType) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientConnectionRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientConnectionRecordDynamicSqlSupport.java index 1e49705b..e1c68402 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientConnectionRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientConnectionRecordDynamicSqlSupport.java @@ -6,34 +6,34 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ClientConnectionRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.793+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.718+02:00", comments="Source Table: client_connection") public static final ClientConnectionRecord clientConnectionRecord = new ClientConnectionRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.793+01:00", comments="Source field: client_connection.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.719+02:00", comments="Source field: client_connection.id") public static final SqlColumn id = clientConnectionRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.793+01:00", comments="Source field: client_connection.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.719+02:00", comments="Source field: client_connection.exam_id") public static final SqlColumn examId = clientConnectionRecord.examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.794+01:00", comments="Source field: client_connection.status") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.719+02:00", comments="Source field: client_connection.status") public static final SqlColumn status = clientConnectionRecord.status; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.794+01:00", comments="Source field: client_connection.connection_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.719+02:00", comments="Source field: client_connection.connection_token") public static final SqlColumn connectionToken = clientConnectionRecord.connectionToken; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.794+01:00", comments="Source field: client_connection.user_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.719+02:00", comments="Source field: client_connection.user_name") public static final SqlColumn userName = clientConnectionRecord.userName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.794+01:00", comments="Source field: client_connection.vdi") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.719+02:00", comments="Source field: client_connection.vdi") public static final SqlColumn vdi = clientConnectionRecord.vdi; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.794+01:00", comments="Source field: client_connection.client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.720+02:00", comments="Source field: client_connection.client_address") public static final SqlColumn clientAddress = clientConnectionRecord.clientAddress; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.794+01:00", comments="Source field: client_connection.virtual_client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.720+02:00", comments="Source field: client_connection.virtual_client_address") public static final SqlColumn virtualClientAddress = clientConnectionRecord.virtualClientAddress; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.793+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.718+02:00", comments="Source Table: client_connection") public static final class ClientConnectionRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientConnectionRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientConnectionRecordMapper.java index 1cc02257..98685bc8 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientConnectionRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientConnectionRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ClientConnectionRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.794+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.720+02:00", comments="Source Table: client_connection") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.795+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.720+02:00", comments="Source Table: client_connection") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.795+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.720+02:00", comments="Source Table: client_connection") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.795+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.720+02:00", comments="Source Table: client_connection") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -59,7 +59,7 @@ public interface ClientConnectionRecordMapper { }) ClientConnectionRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.795+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.720+02:00", comments="Source Table: client_connection") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -73,22 +73,22 @@ public interface ClientConnectionRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.795+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.720+02:00", comments="Source Table: client_connection") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.795+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.720+02:00", comments="Source Table: client_connection") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(clientConnectionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.795+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.720+02:00", comments="Source Table: client_connection") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, clientConnectionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.796+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.721+02:00", comments="Source Table: client_connection") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, clientConnectionRecord) .where(id, isEqualTo(id_)) @@ -96,7 +96,7 @@ public interface ClientConnectionRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.796+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.721+02:00", comments="Source Table: client_connection") default int insert(ClientConnectionRecord record) { return insert(SqlBuilder.insert(record) .into(clientConnectionRecord) @@ -111,7 +111,7 @@ public interface ClientConnectionRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.797+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.721+02:00", comments="Source Table: client_connection") default int insertSelective(ClientConnectionRecord record) { return insert(SqlBuilder.insert(record) .into(clientConnectionRecord) @@ -126,19 +126,19 @@ public interface ClientConnectionRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.797+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.721+02:00", comments="Source Table: client_connection") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, examId, status, connectionToken, userName, vdi, clientAddress, virtualClientAddress) .from(clientConnectionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.797+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.721+02:00", comments="Source Table: client_connection") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, examId, status, connectionToken, userName, vdi, clientAddress, virtualClientAddress) .from(clientConnectionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.797+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.721+02:00", comments="Source Table: client_connection") default ClientConnectionRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, examId, status, connectionToken, userName, vdi, clientAddress, virtualClientAddress) .from(clientConnectionRecord) @@ -147,7 +147,7 @@ public interface ClientConnectionRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.797+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.721+02:00", comments="Source Table: client_connection") default UpdateDSL> updateByExample(ClientConnectionRecord record) { return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord) .set(examId).equalTo(record::getExamId) @@ -159,7 +159,7 @@ public interface ClientConnectionRecordMapper { .set(virtualClientAddress).equalTo(record::getVirtualClientAddress); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.797+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.721+02:00", comments="Source Table: client_connection") default UpdateDSL> updateByExampleSelective(ClientConnectionRecord record) { return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord) .set(examId).equalToWhenPresent(record::getExamId) @@ -171,7 +171,7 @@ public interface ClientConnectionRecordMapper { .set(virtualClientAddress).equalToWhenPresent(record::getVirtualClientAddress); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.797+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.721+02:00", comments="Source Table: client_connection") default int updateByPrimaryKey(ClientConnectionRecord record) { return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord) .set(examId).equalTo(record::getExamId) @@ -186,7 +186,7 @@ public interface ClientConnectionRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.798+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.721+02:00", comments="Source Table: client_connection") default int updateByPrimaryKeySelective(ClientConnectionRecord record) { return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord) .set(examId).equalToWhenPresent(record::getExamId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientEventRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientEventRecordDynamicSqlSupport.java index 37b77b7d..95a84189 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientEventRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientEventRecordDynamicSqlSupport.java @@ -7,31 +7,31 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ClientEventRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.802+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.725+02:00", comments="Source Table: client_event") public static final ClientEventRecord clientEventRecord = new ClientEventRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.802+01:00", comments="Source field: client_event.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.725+02:00", comments="Source field: client_event.id") public static final SqlColumn id = clientEventRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.802+01:00", comments="Source field: client_event.connection_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.725+02:00", comments="Source field: client_event.connection_id") public static final SqlColumn connectionId = clientEventRecord.connectionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.802+01:00", comments="Source field: client_event.user_identifier") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.727+02:00", comments="Source field: client_event.user_identifier") public static final SqlColumn userIdentifier = clientEventRecord.userIdentifier; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.802+01:00", comments="Source field: client_event.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.727+02:00", comments="Source field: client_event.type") public static final SqlColumn type = clientEventRecord.type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.806+01:00", comments="Source field: client_event.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.727+02:00", comments="Source field: client_event.timestamp") public static final SqlColumn timestamp = clientEventRecord.timestamp; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.806+01:00", comments="Source field: client_event.numeric_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.727+02:00", comments="Source field: client_event.numeric_value") public static final SqlColumn numericValue = clientEventRecord.numericValue; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.806+01:00", comments="Source field: client_event.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.727+02:00", comments="Source field: client_event.text") public static final SqlColumn text = clientEventRecord.text; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.802+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.725+02:00", comments="Source Table: client_event") public static final class ClientEventRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientEventRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientEventRecordMapper.java index 4f5aed78..b85c1783 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientEventRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ClientEventRecordMapper.java @@ -33,20 +33,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ClientEventRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.807+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.727+02:00", comments="Source Table: client_event") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.807+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.727+02:00", comments="Source Table: client_event") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.807+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.728+02:00", comments="Source Table: client_event") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.807+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.728+02:00", comments="Source Table: client_event") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -59,7 +59,7 @@ public interface ClientEventRecordMapper { }) ClientEventRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.807+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.728+02:00", comments="Source Table: client_event") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -72,22 +72,22 @@ public interface ClientEventRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.808+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.728+02:00", comments="Source Table: client_event") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.808+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.728+02:00", comments="Source Table: client_event") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(clientEventRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.808+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.728+02:00", comments="Source Table: client_event") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, clientEventRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.808+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.729+02:00", comments="Source Table: client_event") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, clientEventRecord) .where(id, isEqualTo(id_)) @@ -95,7 +95,7 @@ public interface ClientEventRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.808+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.729+02:00", comments="Source Table: client_event") default int insert(ClientEventRecord record) { return insert(SqlBuilder.insert(record) .into(clientEventRecord) @@ -109,7 +109,7 @@ public interface ClientEventRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.808+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.729+02:00", comments="Source Table: client_event") default int insertSelective(ClientEventRecord record) { return insert(SqlBuilder.insert(record) .into(clientEventRecord) @@ -123,19 +123,19 @@ public interface ClientEventRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.808+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.729+02:00", comments="Source Table: client_event") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, connectionId, userIdentifier, type, timestamp, numericValue, text) .from(clientEventRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.808+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.729+02:00", comments="Source Table: client_event") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, connectionId, userIdentifier, type, timestamp, numericValue, text) .from(clientEventRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.808+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.729+02:00", comments="Source Table: client_event") default ClientEventRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, connectionId, userIdentifier, type, timestamp, numericValue, text) .from(clientEventRecord) @@ -144,7 +144,7 @@ public interface ClientEventRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.808+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.729+02:00", comments="Source Table: client_event") default UpdateDSL> updateByExample(ClientEventRecord record) { return UpdateDSL.updateWithMapper(this::update, clientEventRecord) .set(connectionId).equalTo(record::getConnectionId) @@ -155,7 +155,7 @@ public interface ClientEventRecordMapper { .set(text).equalTo(record::getText); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.809+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.731+02:00", comments="Source Table: client_event") default UpdateDSL> updateByExampleSelective(ClientEventRecord record) { return UpdateDSL.updateWithMapper(this::update, clientEventRecord) .set(connectionId).equalToWhenPresent(record::getConnectionId) @@ -166,7 +166,7 @@ public interface ClientEventRecordMapper { .set(text).equalToWhenPresent(record::getText); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.809+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.731+02:00", comments="Source Table: client_event") default int updateByPrimaryKey(ClientEventRecord record) { return UpdateDSL.updateWithMapper(this::update, clientEventRecord) .set(connectionId).equalTo(record::getConnectionId) @@ -180,7 +180,7 @@ public interface ClientEventRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.809+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.731+02:00", comments="Source Table: client_event") default int updateByPrimaryKeySelective(ClientEventRecord record) { return UpdateDSL.updateWithMapper(this::update, clientEventRecord) .set(connectionId).equalToWhenPresent(record::getConnectionId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationAttributeRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationAttributeRecordDynamicSqlSupport.java index 73c81042..218eb667 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationAttributeRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationAttributeRecordDynamicSqlSupport.java @@ -6,34 +6,34 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ConfigurationAttributeRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.494+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.433+02:00", comments="Source Table: configuration_attribute") public static final ConfigurationAttributeRecord configurationAttributeRecord = new ConfigurationAttributeRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.499+01:00", comments="Source field: configuration_attribute.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.436+02:00", comments="Source field: configuration_attribute.id") public static final SqlColumn id = configurationAttributeRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.500+01:00", comments="Source field: configuration_attribute.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.437+02:00", comments="Source field: configuration_attribute.name") public static final SqlColumn name = configurationAttributeRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.500+01:00", comments="Source field: configuration_attribute.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.437+02:00", comments="Source field: configuration_attribute.type") public static final SqlColumn type = configurationAttributeRecord.type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.500+01:00", comments="Source field: configuration_attribute.parent_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.437+02:00", comments="Source field: configuration_attribute.parent_id") public static final SqlColumn parentId = configurationAttributeRecord.parentId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.501+01:00", comments="Source field: configuration_attribute.resources") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.437+02:00", comments="Source field: configuration_attribute.resources") public static final SqlColumn resources = configurationAttributeRecord.resources; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.501+01:00", comments="Source field: configuration_attribute.validator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.438+02:00", comments="Source field: configuration_attribute.validator") public static final SqlColumn validator = configurationAttributeRecord.validator; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.501+01:00", comments="Source field: configuration_attribute.dependencies") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.438+02:00", comments="Source field: configuration_attribute.dependencies") public static final SqlColumn dependencies = configurationAttributeRecord.dependencies; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.501+01:00", comments="Source field: configuration_attribute.default_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.438+02:00", comments="Source field: configuration_attribute.default_value") public static final SqlColumn defaultValue = configurationAttributeRecord.defaultValue; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.498+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.435+02:00", comments="Source Table: configuration_attribute") public static final class ConfigurationAttributeRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationAttributeRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationAttributeRecordMapper.java index 9614f2c3..e7f2e2d2 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationAttributeRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationAttributeRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ConfigurationAttributeRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.503+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.439+02:00", comments="Source Table: configuration_attribute") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.505+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.441+02:00", comments="Source Table: configuration_attribute") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.507+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.441+02:00", comments="Source Table: configuration_attribute") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.509+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.443+02:00", comments="Source Table: configuration_attribute") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -59,7 +59,7 @@ public interface ConfigurationAttributeRecordMapper { }) ConfigurationAttributeRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.510+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.445+02:00", comments="Source Table: configuration_attribute") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -73,22 +73,22 @@ public interface ConfigurationAttributeRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.511+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.446+02:00", comments="Source Table: configuration_attribute") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.513+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.447+02:00", comments="Source Table: configuration_attribute") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(configurationAttributeRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.514+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.448+02:00", comments="Source Table: configuration_attribute") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, configurationAttributeRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.516+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.449+02:00", comments="Source Table: configuration_attribute") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, configurationAttributeRecord) .where(id, isEqualTo(id_)) @@ -96,7 +96,7 @@ public interface ConfigurationAttributeRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.516+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.450+02:00", comments="Source Table: configuration_attribute") default int insert(ConfigurationAttributeRecord record) { return insert(SqlBuilder.insert(record) .into(configurationAttributeRecord) @@ -111,7 +111,7 @@ public interface ConfigurationAttributeRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.518+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.452+02:00", comments="Source Table: configuration_attribute") default int insertSelective(ConfigurationAttributeRecord record) { return insert(SqlBuilder.insert(record) .into(configurationAttributeRecord) @@ -126,19 +126,19 @@ public interface ConfigurationAttributeRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.519+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.453+02:00", comments="Source Table: configuration_attribute") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, name, type, parentId, resources, validator, dependencies, defaultValue) .from(configurationAttributeRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.520+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.455+02:00", comments="Source Table: configuration_attribute") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, name, type, parentId, resources, validator, dependencies, defaultValue) .from(configurationAttributeRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.521+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.456+02:00", comments="Source Table: configuration_attribute") default ConfigurationAttributeRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, name, type, parentId, resources, validator, dependencies, defaultValue) .from(configurationAttributeRecord) @@ -147,7 +147,7 @@ public interface ConfigurationAttributeRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.523+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.456+02:00", comments="Source Table: configuration_attribute") default UpdateDSL> updateByExample(ConfigurationAttributeRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord) .set(name).equalTo(record::getName) @@ -159,7 +159,7 @@ public interface ConfigurationAttributeRecordMapper { .set(defaultValue).equalTo(record::getDefaultValue); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.524+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.458+02:00", comments="Source Table: configuration_attribute") default UpdateDSL> updateByExampleSelective(ConfigurationAttributeRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord) .set(name).equalToWhenPresent(record::getName) @@ -171,7 +171,7 @@ public interface ConfigurationAttributeRecordMapper { .set(defaultValue).equalToWhenPresent(record::getDefaultValue); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.525+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.459+02:00", comments="Source Table: configuration_attribute") default int updateByPrimaryKey(ConfigurationAttributeRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord) .set(name).equalTo(record::getName) @@ -186,7 +186,7 @@ public interface ConfigurationAttributeRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.526+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.462+02:00", comments="Source Table: configuration_attribute") default int updateByPrimaryKeySelective(ConfigurationAttributeRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord) .set(name).equalToWhenPresent(record::getName) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationNodeRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationNodeRecordDynamicSqlSupport.java index c9381770..69c726d7 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationNodeRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationNodeRecordDynamicSqlSupport.java @@ -6,34 +6,34 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ConfigurationNodeRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.770+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.701+02:00", comments="Source Table: configuration_node") public static final ConfigurationNodeRecord configurationNodeRecord = new ConfigurationNodeRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.770+01:00", comments="Source field: configuration_node.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.701+02:00", comments="Source field: configuration_node.id") public static final SqlColumn id = configurationNodeRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.770+01:00", comments="Source field: configuration_node.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.701+02:00", comments="Source field: configuration_node.institution_id") public static final SqlColumn institutionId = configurationNodeRecord.institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.770+01:00", comments="Source field: configuration_node.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.701+02:00", comments="Source field: configuration_node.owner") public static final SqlColumn owner = configurationNodeRecord.owner; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.770+01:00", comments="Source field: configuration_node.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.702+02:00", comments="Source field: configuration_node.name") public static final SqlColumn name = configurationNodeRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.771+01:00", comments="Source field: configuration_node.description") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.702+02:00", comments="Source field: configuration_node.description") public static final SqlColumn description = configurationNodeRecord.description; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.771+01:00", comments="Source field: configuration_node.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.702+02:00", comments="Source field: configuration_node.type") public static final SqlColumn type = configurationNodeRecord.type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.771+01:00", comments="Source field: configuration_node.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.702+02:00", comments="Source field: configuration_node.template") public static final SqlColumn template = configurationNodeRecord.template; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.771+01:00", comments="Source field: configuration_node.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.702+02:00", comments="Source field: configuration_node.active") public static final SqlColumn active = configurationNodeRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.770+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.701+02:00", comments="Source Table: configuration_node") public static final class ConfigurationNodeRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationNodeRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationNodeRecordMapper.java index 00921867..b1fb2adb 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationNodeRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationNodeRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ConfigurationNodeRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.771+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.702+02:00", comments="Source Table: configuration_node") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.771+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.702+02:00", comments="Source Table: configuration_node") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.772+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.702+02:00", comments="Source Table: configuration_node") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.772+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.702+02:00", comments="Source Table: configuration_node") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -59,7 +59,7 @@ public interface ConfigurationNodeRecordMapper { }) ConfigurationNodeRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.772+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -73,22 +73,22 @@ public interface ConfigurationNodeRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.772+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.772+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(configurationNodeRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.772+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, configurationNodeRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.772+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, configurationNodeRecord) .where(id, isEqualTo(id_)) @@ -96,7 +96,7 @@ public interface ConfigurationNodeRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.772+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") default int insert(ConfigurationNodeRecord record) { return insert(SqlBuilder.insert(record) .into(configurationNodeRecord) @@ -111,7 +111,7 @@ public interface ConfigurationNodeRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.772+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") default int insertSelective(ConfigurationNodeRecord record) { return insert(SqlBuilder.insert(record) .into(configurationNodeRecord) @@ -126,19 +126,19 @@ public interface ConfigurationNodeRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.773+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, owner, name, description, type, template, active) .from(configurationNodeRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.773+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, owner, name, description, type, template, active) .from(configurationNodeRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.773+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") default ConfigurationNodeRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, owner, name, description, type, template, active) .from(configurationNodeRecord) @@ -147,7 +147,7 @@ public interface ConfigurationNodeRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.773+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.703+02:00", comments="Source Table: configuration_node") default UpdateDSL> updateByExample(ConfigurationNodeRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -159,7 +159,7 @@ public interface ConfigurationNodeRecordMapper { .set(active).equalTo(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.773+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.704+02:00", comments="Source Table: configuration_node") default UpdateDSL> updateByExampleSelective(ConfigurationNodeRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) @@ -171,7 +171,7 @@ public interface ConfigurationNodeRecordMapper { .set(active).equalToWhenPresent(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.773+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.704+02:00", comments="Source Table: configuration_node") default int updateByPrimaryKey(ConfigurationNodeRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -186,7 +186,7 @@ public interface ConfigurationNodeRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.773+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.704+02:00", comments="Source Table: configuration_node") default int updateByPrimaryKeySelective(ConfigurationNodeRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationRecordDynamicSqlSupport.java index 97c7b614..bb7fa9dd 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationRecordDynamicSqlSupport.java @@ -7,28 +7,33 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ConfigurationRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.763+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.690+02:00", comments="Source Table: configuration") public static final ConfigurationRecord configurationRecord = new ConfigurationRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.764+01:00", comments="Source field: configuration.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.691+02:00", comments="Source field: configuration.id") public static final SqlColumn id = configurationRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.764+01:00", comments="Source field: configuration.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.691+02:00", comments="Source field: configuration.institution_id") + public static final SqlColumn institutionId = configurationRecord.institutionId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.691+02:00", comments="Source field: configuration.configuration_node_id") public static final SqlColumn configurationNodeId = configurationRecord.configurationNodeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.764+01:00", comments="Source field: configuration.version") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.691+02:00", comments="Source field: configuration.version") public static final SqlColumn version = configurationRecord.version; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.764+01:00", comments="Source field: configuration.version_date") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.691+02:00", comments="Source field: configuration.version_date") public static final SqlColumn versionDate = configurationRecord.versionDate; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.764+01:00", comments="Source field: configuration.followup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.692+02:00", comments="Source field: configuration.followup") public static final SqlColumn followup = configurationRecord.followup; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.763+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.691+02:00", comments="Source Table: configuration") public static final class ConfigurationRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); + public final SqlColumn institutionId = column("institution_id", JDBCType.BIGINT); + public final SqlColumn configurationNodeId = column("configuration_node_id", JDBCType.BIGINT); public final SqlColumn version = column("version", JDBCType.VARCHAR); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationRecordMapper.java index b8171c76..8630a49b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationRecordMapper.java @@ -34,23 +34,24 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ConfigurationRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.764+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.692+02:00", comments="Source Table: configuration") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.692+02:00", comments="Source Table: configuration") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.692+02:00", comments="Source Table: configuration") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.692+02:00", comments="Source Table: configuration") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="configuration_node_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="version", javaType=String.class, jdbcType=JdbcType.VARCHAR), @Arg(column="version_date", javaType=DateTime.class, typeHandler=JodaTimeTypeResolver.class, jdbcType=JdbcType.TIMESTAMP), @@ -58,10 +59,11 @@ public interface ConfigurationRecordMapper { }) ConfigurationRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.692+02:00", comments="Source Table: configuration") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="configuration_node_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="version", javaType=String.class, jdbcType=JdbcType.VARCHAR), @Arg(column="version_date", javaType=DateTime.class, typeHandler=JodaTimeTypeResolver.class, jdbcType=JdbcType.TIMESTAMP), @@ -69,22 +71,22 @@ public interface ConfigurationRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.694+02:00", comments="Source Table: configuration") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.694+02:00", comments="Source Table: configuration") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(configurationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.694+02:00", comments="Source Table: configuration") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, configurationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.694+02:00", comments="Source Table: configuration") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, configurationRecord) .where(id, isEqualTo(id_)) @@ -92,10 +94,11 @@ public interface ConfigurationRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.694+02:00", comments="Source Table: configuration") default int insert(ConfigurationRecord record) { return insert(SqlBuilder.insert(record) .into(configurationRecord) + .map(institutionId).toProperty("institutionId") .map(configurationNodeId).toProperty("configurationNodeId") .map(version).toProperty("version") .map(versionDate).toProperty("versionDate") @@ -104,10 +107,11 @@ public interface ConfigurationRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.695+02:00", comments="Source Table: configuration") default int insertSelective(ConfigurationRecord record) { return insert(SqlBuilder.insert(record) .into(configurationRecord) + .map(institutionId).toPropertyWhenPresent("institutionId", record::getInstitutionId) .map(configurationNodeId).toPropertyWhenPresent("configurationNodeId", record::getConfigurationNodeId) .map(version).toPropertyWhenPresent("version", record::getVersion) .map(versionDate).toPropertyWhenPresent("versionDate", record::getVersionDate) @@ -116,48 +120,51 @@ public interface ConfigurationRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.695+02:00", comments="Source Table: configuration") default QueryExpressionDSL>> selectByExample() { - return SelectDSL.selectWithMapper(this::selectMany, id, configurationNodeId, version, versionDate, followup) + return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, configurationNodeId, version, versionDate, followup) .from(configurationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.765+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.695+02:00", comments="Source Table: configuration") default QueryExpressionDSL>> selectDistinctByExample() { - return SelectDSL.selectDistinctWithMapper(this::selectMany, id, configurationNodeId, version, versionDate, followup) + return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, configurationNodeId, version, versionDate, followup) .from(configurationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.766+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.695+02:00", comments="Source Table: configuration") default ConfigurationRecord selectByPrimaryKey(Long id_) { - return SelectDSL.selectWithMapper(this::selectOne, id, configurationNodeId, version, versionDate, followup) + return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, configurationNodeId, version, versionDate, followup) .from(configurationRecord) .where(id, isEqualTo(id_)) .build() .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.766+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.695+02:00", comments="Source Table: configuration") default UpdateDSL> updateByExample(ConfigurationRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationRecord) + .set(institutionId).equalTo(record::getInstitutionId) .set(configurationNodeId).equalTo(record::getConfigurationNodeId) .set(version).equalTo(record::getVersion) .set(versionDate).equalTo(record::getVersionDate) .set(followup).equalTo(record::getFollowup); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.766+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.695+02:00", comments="Source Table: configuration") default UpdateDSL> updateByExampleSelective(ConfigurationRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationRecord) + .set(institutionId).equalToWhenPresent(record::getInstitutionId) .set(configurationNodeId).equalToWhenPresent(record::getConfigurationNodeId) .set(version).equalToWhenPresent(record::getVersion) .set(versionDate).equalToWhenPresent(record::getVersionDate) .set(followup).equalToWhenPresent(record::getFollowup); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.766+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.696+02:00", comments="Source Table: configuration") default int updateByPrimaryKey(ConfigurationRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationRecord) + .set(institutionId).equalTo(record::getInstitutionId) .set(configurationNodeId).equalTo(record::getConfigurationNodeId) .set(version).equalTo(record::getVersion) .set(versionDate).equalTo(record::getVersionDate) @@ -167,9 +174,10 @@ public interface ConfigurationRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.766+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.696+02:00", comments="Source Table: configuration") default int updateByPrimaryKeySelective(ConfigurationRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationRecord) + .set(institutionId).equalToWhenPresent(record::getInstitutionId) .set(configurationNodeId).equalToWhenPresent(record::getConfigurationNodeId) .set(version).equalToWhenPresent(record::getVersion) .set(versionDate).equalToWhenPresent(record::getVersionDate) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationValueRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationValueRecordDynamicSqlSupport.java index 4d5f4fe7..6cea6d9f 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationValueRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationValueRecordDynamicSqlSupport.java @@ -6,31 +6,36 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ConfigurationValueRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.749+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.675+02:00", comments="Source Table: configuration_value") public static final ConfigurationValueRecord configurationValueRecord = new ConfigurationValueRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.750+01:00", comments="Source field: configuration_value.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.675+02:00", comments="Source field: configuration_value.id") public static final SqlColumn id = configurationValueRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.750+01:00", comments="Source field: configuration_value.configuration_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.675+02:00", comments="Source field: configuration_value.institution_id") + public static final SqlColumn institutionId = configurationValueRecord.institutionId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.676+02:00", comments="Source field: configuration_value.configuration_id") public static final SqlColumn configurationId = configurationValueRecord.configurationId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.750+01:00", comments="Source field: configuration_value.configuration_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.676+02:00", comments="Source field: configuration_value.configuration_attribute_id") public static final SqlColumn configurationAttributeId = configurationValueRecord.configurationAttributeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.750+01:00", comments="Source field: configuration_value.list_index") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.676+02:00", comments="Source field: configuration_value.list_index") public static final SqlColumn listIndex = configurationValueRecord.listIndex; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.750+01:00", comments="Source field: configuration_value.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.676+02:00", comments="Source field: configuration_value.value") public static final SqlColumn value = configurationValueRecord.value; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.751+01:00", comments="Source field: configuration_value.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.676+02:00", comments="Source field: configuration_value.text") public static final SqlColumn text = configurationValueRecord.text; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.750+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.675+02:00", comments="Source Table: configuration_value") public static final class ConfigurationValueRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); + public final SqlColumn institutionId = column("institution_id", JDBCType.BIGINT); + public final SqlColumn configurationId = column("configuration_id", JDBCType.BIGINT); public final SqlColumn configurationAttributeId = column("configuration_attribute_id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationValueRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationValueRecordMapper.java index 7f1e670b..b74c0f95 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationValueRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ConfigurationValueRecordMapper.java @@ -32,23 +32,24 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ConfigurationValueRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.751+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.677+02:00", comments="Source Table: configuration_value") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.751+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.677+02:00", comments="Source Table: configuration_value") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.751+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.677+02:00", comments="Source Table: configuration_value") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.751+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.677+02:00", comments="Source Table: configuration_value") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="configuration_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="configuration_attribute_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="list_index", javaType=Integer.class, jdbcType=JdbcType.INTEGER), @@ -57,10 +58,11 @@ public interface ConfigurationValueRecordMapper { }) ConfigurationValueRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.751+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.677+02:00", comments="Source Table: configuration_value") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="configuration_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="configuration_attribute_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="list_index", javaType=Integer.class, jdbcType=JdbcType.INTEGER), @@ -69,22 +71,22 @@ public interface ConfigurationValueRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.751+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.752+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(configurationValueRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.752+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, configurationValueRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.752+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, configurationValueRecord) .where(id, isEqualTo(id_)) @@ -92,10 +94,11 @@ public interface ConfigurationValueRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.752+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default int insert(ConfigurationValueRecord record) { return insert(SqlBuilder.insert(record) .into(configurationValueRecord) + .map(institutionId).toProperty("institutionId") .map(configurationId).toProperty("configurationId") .map(configurationAttributeId).toProperty("configurationAttributeId") .map(listIndex).toProperty("listIndex") @@ -105,10 +108,11 @@ public interface ConfigurationValueRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.752+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default int insertSelective(ConfigurationValueRecord record) { return insert(SqlBuilder.insert(record) .into(configurationValueRecord) + .map(institutionId).toPropertyWhenPresent("institutionId", record::getInstitutionId) .map(configurationId).toPropertyWhenPresent("configurationId", record::getConfigurationId) .map(configurationAttributeId).toPropertyWhenPresent("configurationAttributeId", record::getConfigurationAttributeId) .map(listIndex).toPropertyWhenPresent("listIndex", record::getListIndex) @@ -118,30 +122,31 @@ public interface ConfigurationValueRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.752+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default QueryExpressionDSL>> selectByExample() { - return SelectDSL.selectWithMapper(this::selectMany, id, configurationId, configurationAttributeId, listIndex, value, text) + return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, configurationId, configurationAttributeId, listIndex, value, text) .from(configurationValueRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.752+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default QueryExpressionDSL>> selectDistinctByExample() { - return SelectDSL.selectDistinctWithMapper(this::selectMany, id, configurationId, configurationAttributeId, listIndex, value, text) + return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, configurationId, configurationAttributeId, listIndex, value, text) .from(configurationValueRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.752+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default ConfigurationValueRecord selectByPrimaryKey(Long id_) { - return SelectDSL.selectWithMapper(this::selectOne, id, configurationId, configurationAttributeId, listIndex, value, text) + return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, configurationId, configurationAttributeId, listIndex, value, text) .from(configurationValueRecord) .where(id, isEqualTo(id_)) .build() .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.752+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default UpdateDSL> updateByExample(ConfigurationValueRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationValueRecord) + .set(institutionId).equalTo(record::getInstitutionId) .set(configurationId).equalTo(record::getConfigurationId) .set(configurationAttributeId).equalTo(record::getConfigurationAttributeId) .set(listIndex).equalTo(record::getListIndex) @@ -149,9 +154,10 @@ public interface ConfigurationValueRecordMapper { .set(text).equalTo(record::getText); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.753+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default UpdateDSL> updateByExampleSelective(ConfigurationValueRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationValueRecord) + .set(institutionId).equalToWhenPresent(record::getInstitutionId) .set(configurationId).equalToWhenPresent(record::getConfigurationId) .set(configurationAttributeId).equalToWhenPresent(record::getConfigurationAttributeId) .set(listIndex).equalToWhenPresent(record::getListIndex) @@ -159,9 +165,10 @@ public interface ConfigurationValueRecordMapper { .set(text).equalToWhenPresent(record::getText); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.753+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.678+02:00", comments="Source Table: configuration_value") default int updateByPrimaryKey(ConfigurationValueRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationValueRecord) + .set(institutionId).equalTo(record::getInstitutionId) .set(configurationId).equalTo(record::getConfigurationId) .set(configurationAttributeId).equalTo(record::getConfigurationAttributeId) .set(listIndex).equalTo(record::getListIndex) @@ -172,9 +179,10 @@ public interface ConfigurationValueRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.753+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.679+02:00", comments="Source Table: configuration_value") default int updateByPrimaryKeySelective(ConfigurationValueRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationValueRecord) + .set(institutionId).equalToWhenPresent(record::getInstitutionId) .set(configurationId).equalToWhenPresent(record::getConfigurationId) .set(configurationAttributeId).equalToWhenPresent(record::getConfigurationAttributeId) .set(listIndex).equalToWhenPresent(record::getListIndex) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamConfigurationMapRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamConfigurationMapRecordDynamicSqlSupport.java index 2e7d366e..7a0a22f7 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamConfigurationMapRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamConfigurationMapRecordDynamicSqlSupport.java @@ -6,25 +6,30 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ExamConfigurationMapRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.777+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.706+02:00", comments="Source Table: exam_configuration_map") public static final ExamConfigurationMapRecord examConfigurationMapRecord = new ExamConfigurationMapRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.777+01:00", comments="Source field: exam_configuration_map.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.706+02:00", comments="Source field: exam_configuration_map.id") public static final SqlColumn id = examConfigurationMapRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.777+01:00", comments="Source field: exam_configuration_map.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.706+02:00", comments="Source field: exam_configuration_map.institution_id") + public static final SqlColumn institutionId = examConfigurationMapRecord.institutionId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.707+02:00", comments="Source field: exam_configuration_map.exam_id") public static final SqlColumn examId = examConfigurationMapRecord.examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.777+01:00", comments="Source field: exam_configuration_map.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.707+02:00", comments="Source field: exam_configuration_map.configuration_node_id") public static final SqlColumn configurationNodeId = examConfigurationMapRecord.configurationNodeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.777+01:00", comments="Source field: exam_configuration_map.user_names") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.707+02:00", comments="Source field: exam_configuration_map.user_names") public static final SqlColumn userNames = examConfigurationMapRecord.userNames; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.777+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.706+02:00", comments="Source Table: exam_configuration_map") public static final class ExamConfigurationMapRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); + public final SqlColumn institutionId = column("institution_id", JDBCType.BIGINT); + public final SqlColumn examId = column("exam_id", JDBCType.BIGINT); public final SqlColumn configurationNodeId = column("configuration_node_id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamConfigurationMapRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamConfigurationMapRecordMapper.java index 20dd7b47..08a4731b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamConfigurationMapRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamConfigurationMapRecordMapper.java @@ -32,55 +32,57 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ExamConfigurationMapRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.777+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.707+02:00", comments="Source Table: exam_configuration_map") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.777+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.707+02:00", comments="Source Table: exam_configuration_map") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.777+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.707+02:00", comments="Source Table: exam_configuration_map") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.778+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.707+02:00", comments="Source Table: exam_configuration_map") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="exam_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="configuration_node_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="user_names", javaType=String.class, jdbcType=JdbcType.VARCHAR) }) ExamConfigurationMapRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.778+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.707+02:00", comments="Source Table: exam_configuration_map") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), + @Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="exam_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="configuration_node_id", javaType=Long.class, jdbcType=JdbcType.BIGINT), @Arg(column="user_names", javaType=String.class, jdbcType=JdbcType.VARCHAR) }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.778+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.707+02:00", comments="Source Table: exam_configuration_map") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.778+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(examConfigurationMapRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.778+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, examConfigurationMapRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.778+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, examConfigurationMapRecord) .where(id, isEqualTo(id_)) @@ -88,10 +90,11 @@ public interface ExamConfigurationMapRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.778+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default int insert(ExamConfigurationMapRecord record) { return insert(SqlBuilder.insert(record) .into(examConfigurationMapRecord) + .map(institutionId).toProperty("institutionId") .map(examId).toProperty("examId") .map(configurationNodeId).toProperty("configurationNodeId") .map(userNames).toProperty("userNames") @@ -99,10 +102,11 @@ public interface ExamConfigurationMapRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.778+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default int insertSelective(ExamConfigurationMapRecord record) { return insert(SqlBuilder.insert(record) .into(examConfigurationMapRecord) + .map(institutionId).toPropertyWhenPresent("institutionId", record::getInstitutionId) .map(examId).toPropertyWhenPresent("examId", record::getExamId) .map(configurationNodeId).toPropertyWhenPresent("configurationNodeId", record::getConfigurationNodeId) .map(userNames).toPropertyWhenPresent("userNames", record::getUserNames) @@ -110,46 +114,49 @@ public interface ExamConfigurationMapRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.778+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default QueryExpressionDSL>> selectByExample() { - return SelectDSL.selectWithMapper(this::selectMany, id, examId, configurationNodeId, userNames) + return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, examId, configurationNodeId, userNames) .from(examConfigurationMapRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.778+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default QueryExpressionDSL>> selectDistinctByExample() { - return SelectDSL.selectDistinctWithMapper(this::selectMany, id, examId, configurationNodeId, userNames) + return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, examId, configurationNodeId, userNames) .from(examConfigurationMapRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.780+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default ExamConfigurationMapRecord selectByPrimaryKey(Long id_) { - return SelectDSL.selectWithMapper(this::selectOne, id, examId, configurationNodeId, userNames) + return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, examId, configurationNodeId, userNames) .from(examConfigurationMapRecord) .where(id, isEqualTo(id_)) .build() .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.780+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default UpdateDSL> updateByExample(ExamConfigurationMapRecord record) { return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord) + .set(institutionId).equalTo(record::getInstitutionId) .set(examId).equalTo(record::getExamId) .set(configurationNodeId).equalTo(record::getConfigurationNodeId) .set(userNames).equalTo(record::getUserNames); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.780+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default UpdateDSL> updateByExampleSelective(ExamConfigurationMapRecord record) { return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord) + .set(institutionId).equalToWhenPresent(record::getInstitutionId) .set(examId).equalToWhenPresent(record::getExamId) .set(configurationNodeId).equalToWhenPresent(record::getConfigurationNodeId) .set(userNames).equalToWhenPresent(record::getUserNames); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.780+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.708+02:00", comments="Source Table: exam_configuration_map") default int updateByPrimaryKey(ExamConfigurationMapRecord record) { return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord) + .set(institutionId).equalTo(record::getInstitutionId) .set(examId).equalTo(record::getExamId) .set(configurationNodeId).equalTo(record::getConfigurationNodeId) .set(userNames).equalTo(record::getUserNames) @@ -158,9 +165,10 @@ public interface ExamConfigurationMapRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.780+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.709+02:00", comments="Source Table: exam_configuration_map") default int updateByPrimaryKeySelective(ExamConfigurationMapRecord record) { return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord) + .set(institutionId).equalToWhenPresent(record::getInstitutionId) .set(examId).equalToWhenPresent(record::getExamId) .set(configurationNodeId).equalToWhenPresent(record::getConfigurationNodeId) .set(userNames).equalToWhenPresent(record::getUserNames) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamRecordDynamicSqlSupport.java index dedc503a..2d0272e4 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamRecordDynamicSqlSupport.java @@ -6,37 +6,37 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ExamRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.785+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.712+02:00", comments="Source Table: exam") public static final ExamRecord examRecord = new ExamRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.785+01:00", comments="Source field: exam.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.712+02:00", comments="Source field: exam.id") public static final SqlColumn id = examRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.786+01:00", comments="Source field: exam.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.712+02:00", comments="Source field: exam.institution_id") public static final SqlColumn institutionId = examRecord.institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.786+01:00", comments="Source field: exam.lms_setup_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.713+02:00", comments="Source field: exam.lms_setup_id") public static final SqlColumn lmsSetupId = examRecord.lmsSetupId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.786+01:00", comments="Source field: exam.external_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.713+02:00", comments="Source field: exam.external_id") public static final SqlColumn externalId = examRecord.externalId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.786+01:00", comments="Source field: exam.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.713+02:00", comments="Source field: exam.owner") public static final SqlColumn owner = examRecord.owner; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.787+01:00", comments="Source field: exam.supporter") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.713+02:00", comments="Source field: exam.supporter") public static final SqlColumn supporter = examRecord.supporter; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.787+01:00", comments="Source field: exam.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.713+02:00", comments="Source field: exam.type") public static final SqlColumn type = examRecord.type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.787+01:00", comments="Source field: exam.quit_password") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.713+02:00", comments="Source field: exam.quit_password") public static final SqlColumn quitPassword = examRecord.quitPassword; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.787+01:00", comments="Source field: exam.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.713+02:00", comments="Source field: exam.active") public static final SqlColumn active = examRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.785+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.712+02:00", comments="Source Table: exam") public static final class ExamRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamRecordMapper.java index f6b833c2..7a13820e 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ExamRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ExamRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.787+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.713+02:00", comments="Source Table: exam") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.787+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.788+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.788+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -60,7 +60,7 @@ public interface ExamRecordMapper { }) ExamRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.788+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -75,22 +75,22 @@ public interface ExamRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.788+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.788+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(examRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.788+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, examRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.788+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, examRecord) .where(id, isEqualTo(id_)) @@ -98,7 +98,7 @@ public interface ExamRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.788+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") default int insert(ExamRecord record) { return insert(SqlBuilder.insert(record) .into(examRecord) @@ -114,7 +114,7 @@ public interface ExamRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.788+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") default int insertSelective(ExamRecord record) { return insert(SqlBuilder.insert(record) .into(examRecord) @@ -130,19 +130,19 @@ public interface ExamRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.788+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.714+02:00", comments="Source Table: exam") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, lmsSetupId, externalId, owner, supporter, type, quitPassword, active) .from(examRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.789+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.715+02:00", comments="Source Table: exam") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, lmsSetupId, externalId, owner, supporter, type, quitPassword, active) .from(examRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.789+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.715+02:00", comments="Source Table: exam") default ExamRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, lmsSetupId, externalId, owner, supporter, type, quitPassword, active) .from(examRecord) @@ -151,7 +151,7 @@ public interface ExamRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.789+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.715+02:00", comments="Source Table: exam") default UpdateDSL> updateByExample(ExamRecord record) { return UpdateDSL.updateWithMapper(this::update, examRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -164,7 +164,7 @@ public interface ExamRecordMapper { .set(active).equalTo(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.789+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.715+02:00", comments="Source Table: exam") default UpdateDSL> updateByExampleSelective(ExamRecord record) { return UpdateDSL.updateWithMapper(this::update, examRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) @@ -177,7 +177,7 @@ public interface ExamRecordMapper { .set(active).equalToWhenPresent(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.789+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.715+02:00", comments="Source Table: exam") default int updateByPrimaryKey(ExamRecord record) { return UpdateDSL.updateWithMapper(this::update, examRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -193,7 +193,7 @@ public interface ExamRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.789+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.715+02:00", comments="Source Table: exam") default int updateByPrimaryKeySelective(ExamRecord record) { return UpdateDSL.updateWithMapper(this::update, examRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/IndicatorRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/IndicatorRecordDynamicSqlSupport.java index 26fbeedc..c80206d0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/IndicatorRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/IndicatorRecordDynamicSqlSupport.java @@ -6,25 +6,25 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class IndicatorRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.826+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.740+02:00", comments="Source Table: indicator") public static final IndicatorRecord indicatorRecord = new IndicatorRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.827+01:00", comments="Source field: indicator.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.740+02:00", comments="Source field: indicator.id") public static final SqlColumn id = indicatorRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.828+01:00", comments="Source field: indicator.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.740+02:00", comments="Source field: indicator.exam_id") public static final SqlColumn examId = indicatorRecord.examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.828+01:00", comments="Source field: indicator.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.740+02:00", comments="Source field: indicator.type") public static final SqlColumn type = indicatorRecord.type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.829+01:00", comments="Source field: indicator.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.740+02:00", comments="Source field: indicator.name") public static final SqlColumn name = indicatorRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.832+01:00", comments="Source field: indicator.color") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.746+02:00", comments="Source field: indicator.color") public static final SqlColumn color = indicatorRecord.color; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.827+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.740+02:00", comments="Source Table: indicator") public static final class IndicatorRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/IndicatorRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/IndicatorRecordMapper.java index 5d865e07..a4f2dc92 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/IndicatorRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/IndicatorRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface IndicatorRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.833+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.746+02:00", comments="Source Table: indicator") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.833+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.746+02:00", comments="Source Table: indicator") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.833+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.746+02:00", comments="Source Table: indicator") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.833+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.746+02:00", comments="Source Table: indicator") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -56,7 +56,7 @@ public interface IndicatorRecordMapper { }) IndicatorRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.833+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.746+02:00", comments="Source Table: indicator") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -67,22 +67,22 @@ public interface IndicatorRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.833+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.747+02:00", comments="Source Table: indicator") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.833+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.747+02:00", comments="Source Table: indicator") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(indicatorRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.833+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.747+02:00", comments="Source Table: indicator") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, indicatorRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.833+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.747+02:00", comments="Source Table: indicator") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, indicatorRecord) .where(id, isEqualTo(id_)) @@ -90,7 +90,7 @@ public interface IndicatorRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.833+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.747+02:00", comments="Source Table: indicator") default int insert(IndicatorRecord record) { return insert(SqlBuilder.insert(record) .into(indicatorRecord) @@ -102,7 +102,7 @@ public interface IndicatorRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.834+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.747+02:00", comments="Source Table: indicator") default int insertSelective(IndicatorRecord record) { return insert(SqlBuilder.insert(record) .into(indicatorRecord) @@ -114,19 +114,19 @@ public interface IndicatorRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.835+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.747+02:00", comments="Source Table: indicator") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, examId, type, name, color) .from(indicatorRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.835+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.747+02:00", comments="Source Table: indicator") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, examId, type, name, color) .from(indicatorRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.835+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.748+02:00", comments="Source Table: indicator") default IndicatorRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, examId, type, name, color) .from(indicatorRecord) @@ -135,7 +135,7 @@ public interface IndicatorRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.836+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.748+02:00", comments="Source Table: indicator") default UpdateDSL> updateByExample(IndicatorRecord record) { return UpdateDSL.updateWithMapper(this::update, indicatorRecord) .set(examId).equalTo(record::getExamId) @@ -144,7 +144,7 @@ public interface IndicatorRecordMapper { .set(color).equalTo(record::getColor); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.836+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.748+02:00", comments="Source Table: indicator") default UpdateDSL> updateByExampleSelective(IndicatorRecord record) { return UpdateDSL.updateWithMapper(this::update, indicatorRecord) .set(examId).equalToWhenPresent(record::getExamId) @@ -153,7 +153,7 @@ public interface IndicatorRecordMapper { .set(color).equalToWhenPresent(record::getColor); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.839+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.748+02:00", comments="Source Table: indicator") default int updateByPrimaryKey(IndicatorRecord record) { return UpdateDSL.updateWithMapper(this::update, indicatorRecord) .set(examId).equalTo(record::getExamId) @@ -165,7 +165,7 @@ public interface IndicatorRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.839+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.748+02:00", comments="Source Table: indicator") default int updateByPrimaryKeySelective(IndicatorRecord record) { return UpdateDSL.updateWithMapper(this::update, indicatorRecord) .set(examId).equalToWhenPresent(record::getExamId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/InstitutionRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/InstitutionRecordDynamicSqlSupport.java index a2445504..aa2bd647 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/InstitutionRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/InstitutionRecordDynamicSqlSupport.java @@ -6,28 +6,28 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class InstitutionRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.854+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source Table: institution") public static final InstitutionRecord institutionRecord = new InstitutionRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.855+01:00", comments="Source field: institution.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.id") public static final SqlColumn id = institutionRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.855+01:00", comments="Source field: institution.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.756+02:00", comments="Source field: institution.name") public static final SqlColumn name = institutionRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.856+01:00", comments="Source field: institution.url_suffix") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.756+02:00", comments="Source field: institution.url_suffix") public static final SqlColumn urlSuffix = institutionRecord.urlSuffix; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.856+01:00", comments="Source field: institution.theme_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.756+02:00", comments="Source field: institution.theme_name") public static final SqlColumn themeName = institutionRecord.themeName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.866+01:00", comments="Source field: institution.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.756+02:00", comments="Source field: institution.active") public static final SqlColumn active = institutionRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.867+01:00", comments="Source field: institution.logo_image") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.756+02:00", comments="Source field: institution.logo_image") public static final SqlColumn logoImage = institutionRecord.logoImage; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.854+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source Table: institution") public static final class InstitutionRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/InstitutionRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/InstitutionRecordMapper.java index 2984dc46..f77bb7e7 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/InstitutionRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/InstitutionRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface InstitutionRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.867+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.756+02:00", comments="Source Table: institution") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.867+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.756+02:00", comments="Source Table: institution") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.867+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.756+02:00", comments="Source Table: institution") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.867+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.756+02:00", comments="Source Table: institution") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -57,7 +57,7 @@ public interface InstitutionRecordMapper { }) InstitutionRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.868+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.756+02:00", comments="Source Table: institution") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -69,22 +69,22 @@ public interface InstitutionRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.868+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.868+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(institutionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.868+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, institutionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.868+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, institutionRecord) .where(id, isEqualTo(id_)) @@ -92,7 +92,7 @@ public interface InstitutionRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.868+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default int insert(InstitutionRecord record) { return insert(SqlBuilder.insert(record) .into(institutionRecord) @@ -105,7 +105,7 @@ public interface InstitutionRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.868+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default int insertSelective(InstitutionRecord record) { return insert(SqlBuilder.insert(record) .into(institutionRecord) @@ -118,19 +118,19 @@ public interface InstitutionRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.868+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, name, urlSuffix, themeName, active, logoImage) .from(institutionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.868+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, name, urlSuffix, themeName, active, logoImage) .from(institutionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.869+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default InstitutionRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, name, urlSuffix, themeName, active, logoImage) .from(institutionRecord) @@ -139,7 +139,7 @@ public interface InstitutionRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.869+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default UpdateDSL> updateByExample(InstitutionRecord record) { return UpdateDSL.updateWithMapper(this::update, institutionRecord) .set(name).equalTo(record::getName) @@ -149,7 +149,7 @@ public interface InstitutionRecordMapper { .set(logoImage).equalTo(record::getLogoImage); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.869+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default UpdateDSL> updateByExampleSelective(InstitutionRecord record) { return UpdateDSL.updateWithMapper(this::update, institutionRecord) .set(name).equalToWhenPresent(record::getName) @@ -159,7 +159,7 @@ public interface InstitutionRecordMapper { .set(logoImage).equalToWhenPresent(record::getLogoImage); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.869+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default int updateByPrimaryKey(InstitutionRecord record) { return UpdateDSL.updateWithMapper(this::update, institutionRecord) .set(name).equalTo(record::getName) @@ -172,7 +172,7 @@ public interface InstitutionRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.870+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.757+02:00", comments="Source Table: institution") default int updateByPrimaryKeySelective(InstitutionRecord record) { return UpdateDSL.updateWithMapper(this::update, institutionRecord) .set(name).equalToWhenPresent(record::getName) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/LmsSetupRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/LmsSetupRecordDynamicSqlSupport.java index b1b53d7c..35c80d35 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/LmsSetupRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/LmsSetupRecordDynamicSqlSupport.java @@ -6,37 +6,37 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class LmsSetupRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source Table: lms_setup") public static final LmsSetupRecord lmsSetupRecord = new LmsSetupRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.768+02:00", comments="Source field: lms_setup.id") public static final SqlColumn id = lmsSetupRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.768+02:00", comments="Source field: lms_setup.institution_id") public static final SqlColumn institutionId = lmsSetupRecord.institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source field: lms_setup.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.768+02:00", comments="Source field: lms_setup.name") public static final SqlColumn name = lmsSetupRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source field: lms_setup.lms_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.768+02:00", comments="Source field: lms_setup.lms_type") public static final SqlColumn lmsType = lmsSetupRecord.lmsType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source field: lms_setup.lms_url") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.768+02:00", comments="Source field: lms_setup.lms_url") public static final SqlColumn lmsUrl = lmsSetupRecord.lmsUrl; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source field: lms_setup.lms_clientname") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.768+02:00", comments="Source field: lms_setup.lms_clientname") public static final SqlColumn lmsClientname = lmsSetupRecord.lmsClientname; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source field: lms_setup.lms_clientsecret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.768+02:00", comments="Source field: lms_setup.lms_clientsecret") public static final SqlColumn lmsClientsecret = lmsSetupRecord.lmsClientsecret; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source field: lms_setup.lms_rest_api_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.768+02:00", comments="Source field: lms_setup.lms_rest_api_token") public static final SqlColumn lmsRestApiToken = lmsSetupRecord.lmsRestApiToken; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source field: lms_setup.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.768+02:00", comments="Source field: lms_setup.active") public static final SqlColumn active = lmsSetupRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source Table: lms_setup") public static final class LmsSetupRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/LmsSetupRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/LmsSetupRecordMapper.java index c291ea7d..a39bbeba 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/LmsSetupRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/LmsSetupRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface LmsSetupRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.768+02:00", comments="Source Table: lms_setup") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.885+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -60,7 +60,7 @@ public interface LmsSetupRecordMapper { }) LmsSetupRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -75,22 +75,22 @@ public interface LmsSetupRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(lmsSetupRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, lmsSetupRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, lmsSetupRecord) .where(id, isEqualTo(id_)) @@ -98,7 +98,7 @@ public interface LmsSetupRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default int insert(LmsSetupRecord record) { return insert(SqlBuilder.insert(record) .into(lmsSetupRecord) @@ -114,7 +114,7 @@ public interface LmsSetupRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default int insertSelective(LmsSetupRecord record) { return insert(SqlBuilder.insert(record) .into(lmsSetupRecord) @@ -130,19 +130,19 @@ public interface LmsSetupRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, active) .from(lmsSetupRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, active) .from(lmsSetupRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default LmsSetupRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, active) .from(lmsSetupRecord) @@ -151,7 +151,7 @@ public interface LmsSetupRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default UpdateDSL> updateByExample(LmsSetupRecord record) { return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -164,7 +164,7 @@ public interface LmsSetupRecordMapper { .set(active).equalTo(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default UpdateDSL> updateByExampleSelective(LmsSetupRecord record) { return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) @@ -177,7 +177,7 @@ public interface LmsSetupRecordMapper { .set(active).equalToWhenPresent(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.886+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default int updateByPrimaryKey(LmsSetupRecord record) { return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -193,7 +193,7 @@ public interface LmsSetupRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.887+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.769+02:00", comments="Source Table: lms_setup") default int updateByPrimaryKeySelective(LmsSetupRecord record) { return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/OrientationRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/OrientationRecordDynamicSqlSupport.java index 8cb5824f..da913020 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/OrientationRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/OrientationRecordDynamicSqlSupport.java @@ -6,37 +6,37 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class OrientationRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.756+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.681+02:00", comments="Source Table: orientation") public static final OrientationRecord orientationRecord = new OrientationRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.756+01:00", comments="Source field: orientation.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.682+02:00", comments="Source field: orientation.id") public static final SqlColumn id = orientationRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.756+01:00", comments="Source field: orientation.config_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.682+02:00", comments="Source field: orientation.config_attribute_id") public static final SqlColumn configAttributeId = orientationRecord.configAttributeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.756+01:00", comments="Source field: orientation.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.682+02:00", comments="Source field: orientation.template") public static final SqlColumn template = orientationRecord.template; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.756+01:00", comments="Source field: orientation.view") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.683+02:00", comments="Source field: orientation.view") public static final SqlColumn view = orientationRecord.view; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.757+01:00", comments="Source field: orientation.group") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.683+02:00", comments="Source field: orientation.group") public static final SqlColumn group = orientationRecord.group; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.757+01:00", comments="Source field: orientation.x_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.683+02:00", comments="Source field: orientation.x_position") public static final SqlColumn xPosition = orientationRecord.xPosition; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.757+01:00", comments="Source field: orientation.y_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.683+02:00", comments="Source field: orientation.y_position") public static final SqlColumn yPosition = orientationRecord.yPosition; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.757+01:00", comments="Source field: orientation.width") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.683+02:00", comments="Source field: orientation.width") public static final SqlColumn width = orientationRecord.width; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.757+01:00", comments="Source field: orientation.height") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.684+02:00", comments="Source field: orientation.height") public static final SqlColumn height = orientationRecord.height; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.756+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.682+02:00", comments="Source Table: orientation") public static final class OrientationRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/OrientationRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/OrientationRecordMapper.java index 366945b1..f98496a9 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/OrientationRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/OrientationRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface OrientationRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.758+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.684+02:00", comments="Source Table: orientation") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.758+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.684+02:00", comments="Source Table: orientation") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.758+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.684+02:00", comments="Source Table: orientation") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.758+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.684+02:00", comments="Source Table: orientation") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -60,7 +60,7 @@ public interface OrientationRecordMapper { }) OrientationRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.758+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.684+02:00", comments="Source Table: orientation") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -75,22 +75,22 @@ public interface OrientationRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.758+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.685+02:00", comments="Source Table: orientation") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.758+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.685+02:00", comments="Source Table: orientation") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(orientationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.758+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.685+02:00", comments="Source Table: orientation") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, orientationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.759+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.685+02:00", comments="Source Table: orientation") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, orientationRecord) .where(id, isEqualTo(id_)) @@ -98,7 +98,7 @@ public interface OrientationRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.759+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.685+02:00", comments="Source Table: orientation") default int insert(OrientationRecord record) { return insert(SqlBuilder.insert(record) .into(orientationRecord) @@ -114,7 +114,7 @@ public interface OrientationRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.759+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.685+02:00", comments="Source Table: orientation") default int insertSelective(OrientationRecord record) { return insert(SqlBuilder.insert(record) .into(orientationRecord) @@ -130,19 +130,19 @@ public interface OrientationRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.759+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.685+02:00", comments="Source Table: orientation") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, configAttributeId, template, view, group, xPosition, yPosition, width, height) .from(orientationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.759+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.685+02:00", comments="Source Table: orientation") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, configAttributeId, template, view, group, xPosition, yPosition, width, height) .from(orientationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.759+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.686+02:00", comments="Source Table: orientation") default OrientationRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, configAttributeId, template, view, group, xPosition, yPosition, width, height) .from(orientationRecord) @@ -151,7 +151,7 @@ public interface OrientationRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.759+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.686+02:00", comments="Source Table: orientation") default UpdateDSL> updateByExample(OrientationRecord record) { return UpdateDSL.updateWithMapper(this::update, orientationRecord) .set(configAttributeId).equalTo(record::getConfigAttributeId) @@ -164,7 +164,7 @@ public interface OrientationRecordMapper { .set(height).equalTo(record::getHeight); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.760+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.686+02:00", comments="Source Table: orientation") default UpdateDSL> updateByExampleSelective(OrientationRecord record) { return UpdateDSL.updateWithMapper(this::update, orientationRecord) .set(configAttributeId).equalToWhenPresent(record::getConfigAttributeId) @@ -177,7 +177,7 @@ public interface OrientationRecordMapper { .set(height).equalToWhenPresent(record::getHeight); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.760+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.686+02:00", comments="Source Table: orientation") default int updateByPrimaryKey(OrientationRecord record) { return UpdateDSL.updateWithMapper(this::update, orientationRecord) .set(configAttributeId).equalTo(record::getConfigAttributeId) @@ -193,7 +193,7 @@ public interface OrientationRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.760+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.686+02:00", comments="Source Table: orientation") default int updateByPrimaryKeySelective(OrientationRecord record) { return UpdateDSL.updateWithMapper(this::update, orientationRecord) .set(configAttributeId).equalToWhenPresent(record::getConfigAttributeId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/RoleRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/RoleRecordDynamicSqlSupport.java index 829de17e..8d697a3f 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/RoleRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/RoleRecordDynamicSqlSupport.java @@ -6,19 +6,19 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class RoleRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.892+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") public static final RoleRecord roleRecord = new RoleRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.892+01:00", comments="Source field: user_role.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source field: user_role.id") public static final SqlColumn id = roleRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source field: user_role.user_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source field: user_role.user_id") public static final SqlColumn userId = roleRecord.userId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source field: user_role.role_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source field: user_role.role_name") public static final SqlColumn roleName = roleRecord.roleName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.892+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") public static final class RoleRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/RoleRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/RoleRecordMapper.java index e370d481..defe1994 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/RoleRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/RoleRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface RoleRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -54,7 +54,7 @@ public interface RoleRecordMapper { }) RoleRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -63,22 +63,22 @@ public interface RoleRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(roleRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, roleRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, roleRecord) .where(id, isEqualTo(id_)) @@ -86,7 +86,7 @@ public interface RoleRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default int insert(RoleRecord record) { return insert(SqlBuilder.insert(record) .into(roleRecord) @@ -96,7 +96,7 @@ public interface RoleRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default int insertSelective(RoleRecord record) { return insert(SqlBuilder.insert(record) .into(roleRecord) @@ -106,19 +106,19 @@ public interface RoleRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, userId, roleName) .from(roleRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, userId, roleName) .from(roleRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default RoleRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, userId, roleName) .from(roleRecord) @@ -127,21 +127,21 @@ public interface RoleRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default UpdateDSL> updateByExample(RoleRecord record) { return UpdateDSL.updateWithMapper(this::update, roleRecord) .set(userId).equalTo(record::getUserId) .set(roleName).equalTo(record::getRoleName); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default UpdateDSL> updateByExampleSelective(RoleRecord record) { return UpdateDSL.updateWithMapper(this::update, roleRecord) .set(userId).equalToWhenPresent(record::getUserId) .set(roleName).equalToWhenPresent(record::getRoleName); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default int updateByPrimaryKey(RoleRecord record) { return UpdateDSL.updateWithMapper(this::update, roleRecord) .set(userId).equalTo(record::getUserId) @@ -151,7 +151,7 @@ public interface RoleRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.893+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.774+02:00", comments="Source Table: user_role") default int updateByPrimaryKeySelective(RoleRecord record) { return UpdateDSL.updateWithMapper(this::update, roleRecord) .set(userId).equalToWhenPresent(record::getUserId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/SebClientConfigRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/SebClientConfigRecordDynamicSqlSupport.java index 8d978a33..37a01038 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/SebClientConfigRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/SebClientConfigRecordDynamicSqlSupport.java @@ -7,31 +7,31 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class SebClientConfigRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.874+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.762+02:00", comments="Source Table: seb_client_configuration") public static final SebClientConfigRecord sebClientConfigRecord = new SebClientConfigRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.874+01:00", comments="Source field: seb_client_configuration.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.762+02:00", comments="Source field: seb_client_configuration.id") public static final SqlColumn id = sebClientConfigRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.874+01:00", comments="Source field: seb_client_configuration.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.762+02:00", comments="Source field: seb_client_configuration.institution_id") public static final SqlColumn institutionId = sebClientConfigRecord.institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.876+01:00", comments="Source field: seb_client_configuration.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.762+02:00", comments="Source field: seb_client_configuration.name") public static final SqlColumn name = sebClientConfigRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.876+01:00", comments="Source field: seb_client_configuration.date") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.762+02:00", comments="Source field: seb_client_configuration.date") public static final SqlColumn date = sebClientConfigRecord.date; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.876+01:00", comments="Source field: seb_client_configuration.client_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.762+02:00", comments="Source field: seb_client_configuration.client_name") public static final SqlColumn clientName = sebClientConfigRecord.clientName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.876+01:00", comments="Source field: seb_client_configuration.client_secret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.762+02:00", comments="Source field: seb_client_configuration.client_secret") public static final SqlColumn clientSecret = sebClientConfigRecord.clientSecret; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.876+01:00", comments="Source field: seb_client_configuration.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source field: seb_client_configuration.active") public static final SqlColumn active = sebClientConfigRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.874+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.762+02:00", comments="Source Table: seb_client_configuration") public static final class SebClientConfigRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/SebClientConfigRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/SebClientConfigRecordMapper.java index 43cee605..a2dc19a0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/SebClientConfigRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/SebClientConfigRecordMapper.java @@ -34,20 +34,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface SebClientConfigRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.876+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.876+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -60,7 +60,7 @@ public interface SebClientConfigRecordMapper { }) SebClientConfigRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -73,22 +73,22 @@ public interface SebClientConfigRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(sebClientConfigRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, sebClientConfigRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, sebClientConfigRecord) .where(id, isEqualTo(id_)) @@ -96,7 +96,7 @@ public interface SebClientConfigRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") default int insert(SebClientConfigRecord record) { return insert(SqlBuilder.insert(record) .into(sebClientConfigRecord) @@ -110,7 +110,7 @@ public interface SebClientConfigRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") default int insertSelective(SebClientConfigRecord record) { return insert(SqlBuilder.insert(record) .into(sebClientConfigRecord) @@ -124,19 +124,19 @@ public interface SebClientConfigRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, name, date, clientName, clientSecret, active) .from(sebClientConfigRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.763+02:00", comments="Source Table: seb_client_configuration") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, name, date, clientName, clientSecret, active) .from(sebClientConfigRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.764+02:00", comments="Source Table: seb_client_configuration") default SebClientConfigRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, name, date, clientName, clientSecret, active) .from(sebClientConfigRecord) @@ -145,7 +145,7 @@ public interface SebClientConfigRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.764+02:00", comments="Source Table: seb_client_configuration") default UpdateDSL> updateByExample(SebClientConfigRecord record) { return UpdateDSL.updateWithMapper(this::update, sebClientConfigRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -156,7 +156,7 @@ public interface SebClientConfigRecordMapper { .set(active).equalTo(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.877+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.764+02:00", comments="Source Table: seb_client_configuration") default UpdateDSL> updateByExampleSelective(SebClientConfigRecord record) { return UpdateDSL.updateWithMapper(this::update, sebClientConfigRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) @@ -167,7 +167,7 @@ public interface SebClientConfigRecordMapper { .set(active).equalToWhenPresent(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.880+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.764+02:00", comments="Source Table: seb_client_configuration") default int updateByPrimaryKey(SebClientConfigRecord record) { return UpdateDSL.updateWithMapper(this::update, sebClientConfigRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -181,7 +181,7 @@ public interface SebClientConfigRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.881+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.764+02:00", comments="Source Table: seb_client_configuration") default int updateByPrimaryKeySelective(SebClientConfigRecord record) { return UpdateDSL.updateWithMapper(this::update, sebClientConfigRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ThresholdRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ThresholdRecordDynamicSqlSupport.java index 27bf4714..4a1b25c3 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ThresholdRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ThresholdRecordDynamicSqlSupport.java @@ -7,22 +7,22 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ThresholdRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.843+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source Table: threshold") public static final ThresholdRecord thresholdRecord = new ThresholdRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.844+01:00", comments="Source field: threshold.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source field: threshold.id") public static final SqlColumn id = thresholdRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.844+01:00", comments="Source field: threshold.indicator_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source field: threshold.indicator_id") public static final SqlColumn indicatorId = thresholdRecord.indicatorId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.844+01:00", comments="Source field: threshold.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source field: threshold.value") public static final SqlColumn value = thresholdRecord.value; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.844+01:00", comments="Source field: threshold.color") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source field: threshold.color") public static final SqlColumn color = thresholdRecord.color; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.844+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source Table: threshold") public static final class ThresholdRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ThresholdRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ThresholdRecordMapper.java index e86dc05b..84e3f919 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ThresholdRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/ThresholdRecordMapper.java @@ -33,20 +33,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ThresholdRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.844+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source Table: threshold") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.844+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source Table: threshold") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.844+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source Table: threshold") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.844+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source Table: threshold") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -56,7 +56,7 @@ public interface ThresholdRecordMapper { }) ThresholdRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.844+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source Table: threshold") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -66,22 +66,22 @@ public interface ThresholdRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.751+02:00", comments="Source Table: threshold") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(thresholdRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, thresholdRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, thresholdRecord) .where(id, isEqualTo(id_)) @@ -89,7 +89,7 @@ public interface ThresholdRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default int insert(ThresholdRecord record) { return insert(SqlBuilder.insert(record) .into(thresholdRecord) @@ -100,7 +100,7 @@ public interface ThresholdRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default int insertSelective(ThresholdRecord record) { return insert(SqlBuilder.insert(record) .into(thresholdRecord) @@ -111,19 +111,19 @@ public interface ThresholdRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, indicatorId, value, color) .from(thresholdRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, indicatorId, value, color) .from(thresholdRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default ThresholdRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, indicatorId, value, color) .from(thresholdRecord) @@ -132,7 +132,7 @@ public interface ThresholdRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default UpdateDSL> updateByExample(ThresholdRecord record) { return UpdateDSL.updateWithMapper(this::update, thresholdRecord) .set(indicatorId).equalTo(record::getIndicatorId) @@ -140,7 +140,7 @@ public interface ThresholdRecordMapper { .set(color).equalTo(record::getColor); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default UpdateDSL> updateByExampleSelective(ThresholdRecord record) { return UpdateDSL.updateWithMapper(this::update, thresholdRecord) .set(indicatorId).equalToWhenPresent(record::getIndicatorId) @@ -148,7 +148,7 @@ public interface ThresholdRecordMapper { .set(color).equalToWhenPresent(record::getColor); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.845+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default int updateByPrimaryKey(ThresholdRecord record) { return UpdateDSL.updateWithMapper(this::update, thresholdRecord) .set(indicatorId).equalTo(record::getIndicatorId) @@ -159,7 +159,7 @@ public interface ThresholdRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.847+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.752+02:00", comments="Source Table: threshold") default int updateByPrimaryKeySelective(ThresholdRecord record) { return UpdateDSL.updateWithMapper(this::update, thresholdRecord) .set(indicatorId).equalToWhenPresent(record::getIndicatorId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserActivityLogRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserActivityLogRecordDynamicSqlSupport.java index 14e2e219..d92f0b47 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserActivityLogRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserActivityLogRecordDynamicSqlSupport.java @@ -6,31 +6,31 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class UserActivityLogRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source Table: user_activity_log") public static final UserActivityLogRecord userActivityLogRecord = new UserActivityLogRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.id") public static final SqlColumn id = userActivityLogRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.user_uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.777+02:00", comments="Source field: user_activity_log.user_uuid") public static final SqlColumn userUuid = userActivityLogRecord.userUuid; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.777+02:00", comments="Source field: user_activity_log.timestamp") public static final SqlColumn timestamp = userActivityLogRecord.timestamp; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.activity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.777+02:00", comments="Source field: user_activity_log.activity_type") public static final SqlColumn activityType = userActivityLogRecord.activityType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source field: user_activity_log.entity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.777+02:00", comments="Source field: user_activity_log.entity_type") public static final SqlColumn entityType = userActivityLogRecord.entityType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source field: user_activity_log.entity_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.777+02:00", comments="Source field: user_activity_log.entity_id") public static final SqlColumn entityId = userActivityLogRecord.entityId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source field: user_activity_log.message") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.777+02:00", comments="Source field: user_activity_log.message") public static final SqlColumn message = userActivityLogRecord.message; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source Table: user_activity_log") public static final class UserActivityLogRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserActivityLogRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserActivityLogRecordMapper.java index d9597985..5d82f0a5 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserActivityLogRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserActivityLogRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface UserActivityLogRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.777+02:00", comments="Source Table: user_activity_log") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -58,7 +58,7 @@ public interface UserActivityLogRecordMapper { }) UserActivityLogRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -71,22 +71,22 @@ public interface UserActivityLogRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(userActivityLogRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, userActivityLogRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, userActivityLogRecord) .where(id, isEqualTo(id_)) @@ -94,7 +94,7 @@ public interface UserActivityLogRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default int insert(UserActivityLogRecord record) { return insert(SqlBuilder.insert(record) .into(userActivityLogRecord) @@ -108,7 +108,7 @@ public interface UserActivityLogRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default int insertSelective(UserActivityLogRecord record) { return insert(SqlBuilder.insert(record) .into(userActivityLogRecord) @@ -122,19 +122,19 @@ public interface UserActivityLogRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, userUuid, timestamp, activityType, entityType, entityId, message) .from(userActivityLogRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, userUuid, timestamp, activityType, entityType, entityId, message) .from(userActivityLogRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.899+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default UserActivityLogRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, userUuid, timestamp, activityType, entityType, entityId, message) .from(userActivityLogRecord) @@ -143,7 +143,7 @@ public interface UserActivityLogRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.900+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default UpdateDSL> updateByExample(UserActivityLogRecord record) { return UpdateDSL.updateWithMapper(this::update, userActivityLogRecord) .set(userUuid).equalTo(record::getUserUuid) @@ -154,7 +154,7 @@ public interface UserActivityLogRecordMapper { .set(message).equalTo(record::getMessage); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.900+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default UpdateDSL> updateByExampleSelective(UserActivityLogRecord record) { return UpdateDSL.updateWithMapper(this::update, userActivityLogRecord) .set(userUuid).equalToWhenPresent(record::getUserUuid) @@ -165,7 +165,7 @@ public interface UserActivityLogRecordMapper { .set(message).equalToWhenPresent(record::getMessage); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.900+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default int updateByPrimaryKey(UserActivityLogRecord record) { return UpdateDSL.updateWithMapper(this::update, userActivityLogRecord) .set(userUuid).equalTo(record::getUserUuid) @@ -179,7 +179,7 @@ public interface UserActivityLogRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.900+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.778+02:00", comments="Source Table: user_activity_log") default int updateByPrimaryKeySelective(UserActivityLogRecord record) { return UpdateDSL.updateWithMapper(this::update, userActivityLogRecord) .set(userUuid).equalToWhenPresent(record::getUserUuid) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserRecordDynamicSqlSupport.java index 624d9fed..e87e33e5 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserRecordDynamicSqlSupport.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserRecordDynamicSqlSupport.java @@ -6,40 +6,40 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class UserRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source Table: user") public static final UserRecord userRecord = new UserRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.id") public static final SqlColumn id = userRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.institution_id") public static final SqlColumn institutionId = userRecord.institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source field: user.uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.uuid") public static final SqlColumn uuid = userRecord.uuid; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source field: user.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.name") public static final SqlColumn name = userRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source field: user.username") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.username") public static final SqlColumn username = userRecord.username; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source field: user.password") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.password") public static final SqlColumn password = userRecord.password; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source field: user.email") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.email") public static final SqlColumn email = userRecord.email; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source field: user.language") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.language") public static final SqlColumn language = userRecord.language; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source field: user.timezone") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.timezone") public static final SqlColumn timezone = userRecord.timezone; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source field: user.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.active") public static final SqlColumn active = userRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source Table: user") public static final class UserRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserRecordMapper.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserRecordMapper.java index 4b339271..b6ae8e41 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserRecordMapper.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserRecordMapper.java @@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface UserRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") @InsertProvider(type=SqlProviderAdapter.class, method="insert") @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class) int insert(InsertStatementProvider insertStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.890+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -61,7 +61,7 @@ public interface UserRecordMapper { }) UserRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -77,22 +77,22 @@ public interface UserRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default QueryExpressionDSL> countByExample() { return SelectDSL.selectWithMapper(this::count, SqlBuilder.count()) .from(userRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, userRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, userRecord) .where(id, isEqualTo(id_)) @@ -100,7 +100,7 @@ public interface UserRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default int insert(UserRecord record) { return insert(SqlBuilder.insert(record) .into(userRecord) @@ -117,7 +117,7 @@ public interface UserRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default int insertSelective(UserRecord record) { return insert(SqlBuilder.insert(record) .into(userRecord) @@ -134,19 +134,19 @@ public interface UserRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, uuid, name, username, password, email, language, timezone, active) .from(userRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, uuid, name, username, password, email, language, timezone, active) .from(userRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default UserRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, uuid, name, username, password, email, language, timezone, active) .from(userRecord) @@ -155,7 +155,7 @@ public interface UserRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default UpdateDSL> updateByExample(UserRecord record) { return UpdateDSL.updateWithMapper(this::update, userRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -169,7 +169,7 @@ public interface UserRecordMapper { .set(active).equalTo(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default UpdateDSL> updateByExampleSelective(UserRecord record) { return UpdateDSL.updateWithMapper(this::update, userRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) @@ -183,7 +183,7 @@ public interface UserRecordMapper { .set(active).equalToWhenPresent(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default int updateByPrimaryKey(UserRecord record) { return UpdateDSL.updateWithMapper(this::update, userRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -200,7 +200,7 @@ public interface UserRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.891+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.772+02:00", comments="Source Table: user") default int updateByPrimaryKeySelective(UserRecord record) { return UpdateDSL.updateWithMapper(this::update, userRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/AdditionalAttributes.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/AdditionalAttributes.java index f7e6f760..79baee3f 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/AdditionalAttributes.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/AdditionalAttributes.java @@ -3,22 +3,22 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class AdditionalAttributes { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source field: additional_attributes.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source field: additional_attributes.entity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.entity_type") private String entityType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source field: additional_attributes.entity_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.entity_id") private Long entityId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source field: additional_attributes.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source field: additional_attributes.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.value") private String value; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source Table: additional_attributes") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source Table: additional_attributes") public AdditionalAttributes(Long id, String entityType, Long entityId, String name, String value) { this.id = id; this.entityType = entityType; @@ -27,27 +27,27 @@ public class AdditionalAttributes { this.value = value; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source field: additional_attributes.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source field: additional_attributes.entity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.entity_type") public String getEntityType() { return entityType; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source field: additional_attributes.entity_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.entity_id") public Long getEntityId() { return entityId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source field: additional_attributes.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.901+01:00", comments="Source field: additional_attributes.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.779+02:00", comments="Source field: additional_attributes.value") public String getValue() { return value; } @@ -56,7 +56,7 @@ public class AdditionalAttributes { * This method was generated by MyBatis Generator. * This method corresponds to the database table additional_attributes * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -77,7 +77,7 @@ public class AdditionalAttributes { * This method was generated by MyBatis Generator. * This method corresponds to the database table additional_attributes * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -102,7 +102,7 @@ public class AdditionalAttributes { * This method was generated by MyBatis Generator. * This method corresponds to the database table additional_attributes * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ClientConnectionRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ClientConnectionRecord.java index 6b7ce4ed..2ea20de3 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ClientConnectionRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ClientConnectionRecord.java @@ -3,31 +3,31 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class ClientConnectionRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.717+02:00", comments="Source field: client_connection.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.717+02:00", comments="Source field: client_connection.exam_id") private Long examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.status") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.717+02:00", comments="Source field: client_connection.status") private String status; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.connection_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.717+02:00", comments="Source field: client_connection.connection_token") private String connectionToken; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.user_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.718+02:00", comments="Source field: client_connection.user_name") private String userName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.vdi") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.718+02:00", comments="Source field: client_connection.vdi") private Boolean vdi; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.718+02:00", comments="Source field: client_connection.client_address") private String clientAddress; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.793+01:00", comments="Source field: client_connection.virtual_client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.718+02:00", comments="Source field: client_connection.virtual_client_address") private String virtualClientAddress; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.791+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.717+02:00", comments="Source Table: client_connection") public ClientConnectionRecord(Long id, Long examId, String status, String connectionToken, String userName, Boolean vdi, String clientAddress, String virtualClientAddress) { this.id = id; this.examId = examId; @@ -39,42 +39,42 @@ public class ClientConnectionRecord { this.virtualClientAddress = virtualClientAddress; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.717+02:00", comments="Source field: client_connection.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.717+02:00", comments="Source field: client_connection.exam_id") public Long getExamId() { return examId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.status") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.717+02:00", comments="Source field: client_connection.status") public String getStatus() { return status; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.connection_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.717+02:00", comments="Source field: client_connection.connection_token") public String getConnectionToken() { return connectionToken; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.user_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.718+02:00", comments="Source field: client_connection.user_name") public String getUserName() { return userName; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.vdi") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.718+02:00", comments="Source field: client_connection.vdi") public Boolean getVdi() { return vdi; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.792+01:00", comments="Source field: client_connection.client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.718+02:00", comments="Source field: client_connection.client_address") public String getClientAddress() { return clientAddress; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.793+01:00", comments="Source field: client_connection.virtual_client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.718+02:00", comments="Source field: client_connection.virtual_client_address") public String getVirtualClientAddress() { return virtualClientAddress; } @@ -83,7 +83,7 @@ public class ClientConnectionRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table client_connection * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -107,7 +107,7 @@ public class ClientConnectionRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table client_connection * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -135,7 +135,7 @@ public class ClientConnectionRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table client_connection * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ClientEventRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ClientEventRecord.java index e5b0bf2b..5b20473a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ClientEventRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ClientEventRecord.java @@ -4,28 +4,28 @@ import java.math.BigDecimal; import javax.annotation.Generated; public class ClientEventRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.724+02:00", comments="Source field: client_event.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.connection_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.724+02:00", comments="Source field: client_event.connection_id") private Long connectionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.user_identifier") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.724+02:00", comments="Source field: client_event.user_identifier") private String userIdentifier; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.724+02:00", comments="Source field: client_event.type") private Integer type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.724+02:00", comments="Source field: client_event.timestamp") private Long timestamp; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.numeric_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.725+02:00", comments="Source field: client_event.numeric_value") private BigDecimal numericValue; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.725+02:00", comments="Source field: client_event.text") private String text; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.800+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.723+02:00", comments="Source Table: client_event") public ClientEventRecord(Long id, Long connectionId, String userIdentifier, Integer type, Long timestamp, BigDecimal numericValue, String text) { this.id = id; this.connectionId = connectionId; @@ -36,37 +36,37 @@ public class ClientEventRecord { this.text = text; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.724+02:00", comments="Source field: client_event.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.connection_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.724+02:00", comments="Source field: client_event.connection_id") public Long getConnectionId() { return connectionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.user_identifier") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.724+02:00", comments="Source field: client_event.user_identifier") public String getUserIdentifier() { return userIdentifier; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.724+02:00", comments="Source field: client_event.type") public Integer getType() { return type; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.724+02:00", comments="Source field: client_event.timestamp") public Long getTimestamp() { return timestamp; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.numeric_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.725+02:00", comments="Source field: client_event.numeric_value") public BigDecimal getNumericValue() { return numericValue; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.801+01:00", comments="Source field: client_event.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.725+02:00", comments="Source field: client_event.text") public String getText() { return text; } @@ -75,7 +75,7 @@ public class ClientEventRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table client_event * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -98,7 +98,7 @@ public class ClientEventRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table client_event * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -125,7 +125,7 @@ public class ClientEventRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table client_event * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationAttributeRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationAttributeRecord.java index 6138b9e9..93f63be9 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationAttributeRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationAttributeRecord.java @@ -3,31 +3,31 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class ConfigurationAttributeRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.485+01:00", comments="Source field: configuration_attribute.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.423+02:00", comments="Source field: configuration_attribute.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.486+01:00", comments="Source field: configuration_attribute.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.424+02:00", comments="Source field: configuration_attribute.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.487+01:00", comments="Source field: configuration_attribute.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.424+02:00", comments="Source field: configuration_attribute.type") private String type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.487+01:00", comments="Source field: configuration_attribute.parent_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.425+02:00", comments="Source field: configuration_attribute.parent_id") private Long parentId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.487+01:00", comments="Source field: configuration_attribute.resources") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.425+02:00", comments="Source field: configuration_attribute.resources") private String resources; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.487+01:00", comments="Source field: configuration_attribute.validator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.425+02:00", comments="Source field: configuration_attribute.validator") private String validator; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.487+01:00", comments="Source field: configuration_attribute.dependencies") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.425+02:00", comments="Source field: configuration_attribute.dependencies") private String dependencies; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.488+01:00", comments="Source field: configuration_attribute.default_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.425+02:00", comments="Source field: configuration_attribute.default_value") private String defaultValue; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.475+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.416+02:00", comments="Source Table: configuration_attribute") public ConfigurationAttributeRecord(Long id, String name, String type, Long parentId, String resources, String validator, String dependencies, String defaultValue) { this.id = id; this.name = name; @@ -39,42 +39,42 @@ public class ConfigurationAttributeRecord { this.defaultValue = defaultValue; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.486+01:00", comments="Source field: configuration_attribute.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.424+02:00", comments="Source field: configuration_attribute.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.487+01:00", comments="Source field: configuration_attribute.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.424+02:00", comments="Source field: configuration_attribute.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.487+01:00", comments="Source field: configuration_attribute.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.424+02:00", comments="Source field: configuration_attribute.type") public String getType() { return type; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.487+01:00", comments="Source field: configuration_attribute.parent_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.425+02:00", comments="Source field: configuration_attribute.parent_id") public Long getParentId() { return parentId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.487+01:00", comments="Source field: configuration_attribute.resources") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.425+02:00", comments="Source field: configuration_attribute.resources") public String getResources() { return resources; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.487+01:00", comments="Source field: configuration_attribute.validator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.425+02:00", comments="Source field: configuration_attribute.validator") public String getValidator() { return validator; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.488+01:00", comments="Source field: configuration_attribute.dependencies") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.425+02:00", comments="Source field: configuration_attribute.dependencies") public String getDependencies() { return dependencies; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.488+01:00", comments="Source field: configuration_attribute.default_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.425+02:00", comments="Source field: configuration_attribute.default_value") public String getDefaultValue() { return defaultValue; } @@ -83,7 +83,7 @@ public class ConfigurationAttributeRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_attribute * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -107,7 +107,7 @@ public class ConfigurationAttributeRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_attribute * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -135,7 +135,7 @@ public class ConfigurationAttributeRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_attribute * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationNodeRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationNodeRecord.java index 9eb8d636..49bd96c4 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationNodeRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationNodeRecord.java @@ -3,31 +3,31 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class ConfigurationNodeRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.768+01:00", comments="Source field: configuration_node.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.699+02:00", comments="Source field: configuration_node.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.768+01:00", comments="Source field: configuration_node.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.699+02:00", comments="Source field: configuration_node.institution_id") private Long institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.768+01:00", comments="Source field: configuration_node.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.699+02:00", comments="Source field: configuration_node.owner") private String owner; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.768+01:00", comments="Source field: configuration_node.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.699+02:00", comments="Source field: configuration_node.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.769+01:00", comments="Source field: configuration_node.description") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.700+02:00", comments="Source field: configuration_node.description") private String description; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.769+01:00", comments="Source field: configuration_node.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.700+02:00", comments="Source field: configuration_node.type") private String type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.769+01:00", comments="Source field: configuration_node.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.700+02:00", comments="Source field: configuration_node.template") private String template; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.769+01:00", comments="Source field: configuration_node.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.700+02:00", comments="Source field: configuration_node.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.768+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.699+02:00", comments="Source Table: configuration_node") public ConfigurationNodeRecord(Long id, Long institutionId, String owner, String name, String description, String type, String template, Integer active) { this.id = id; this.institutionId = institutionId; @@ -39,42 +39,42 @@ public class ConfigurationNodeRecord { this.active = active; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.768+01:00", comments="Source field: configuration_node.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.699+02:00", comments="Source field: configuration_node.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.768+01:00", comments="Source field: configuration_node.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.699+02:00", comments="Source field: configuration_node.institution_id") public Long getInstitutionId() { return institutionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.768+01:00", comments="Source field: configuration_node.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.699+02:00", comments="Source field: configuration_node.owner") public String getOwner() { return owner; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.769+01:00", comments="Source field: configuration_node.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.699+02:00", comments="Source field: configuration_node.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.769+01:00", comments="Source field: configuration_node.description") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.700+02:00", comments="Source field: configuration_node.description") public String getDescription() { return description; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.769+01:00", comments="Source field: configuration_node.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.700+02:00", comments="Source field: configuration_node.type") public String getType() { return type; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.769+01:00", comments="Source field: configuration_node.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.700+02:00", comments="Source field: configuration_node.template") public String getTemplate() { return template; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.769+01:00", comments="Source field: configuration_node.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.700+02:00", comments="Source field: configuration_node.active") public Integer getActive() { return active; } @@ -83,7 +83,7 @@ public class ConfigurationNodeRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_node * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -107,7 +107,7 @@ public class ConfigurationNodeRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_node * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -135,7 +135,7 @@ public class ConfigurationNodeRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_node * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationRecord.java index 314d1282..369e8e4d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationRecord.java @@ -4,51 +4,60 @@ import javax.annotation.Generated; import org.joda.time.DateTime; public class ConfigurationRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.761+01:00", comments="Source field: configuration.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.761+01:00", comments="Source field: configuration.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.institution_id") + private Long institutionId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.configuration_node_id") private Long configurationNodeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.761+01:00", comments="Source field: configuration.version") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.version") private String version; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.762+01:00", comments="Source field: configuration.version_date") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.version_date") private DateTime versionDate; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.762+01:00", comments="Source field: configuration.followup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.followup") private Integer followup; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.761+01:00", comments="Source Table: configuration") - public ConfigurationRecord(Long id, Long configurationNodeId, String version, DateTime versionDate, Integer followup) { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.688+02:00", comments="Source Table: configuration") + public ConfigurationRecord(Long id, Long institutionId, Long configurationNodeId, String version, DateTime versionDate, Integer followup) { this.id = id; + this.institutionId = institutionId; this.configurationNodeId = configurationNodeId; this.version = version; this.versionDate = versionDate; this.followup = followup; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.761+01:00", comments="Source field: configuration.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.761+01:00", comments="Source field: configuration.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.institution_id") + public Long getInstitutionId() { + return institutionId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.configuration_node_id") public Long getConfigurationNodeId() { return configurationNodeId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.761+01:00", comments="Source field: configuration.version") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.version") public String getVersion() { return version; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.762+01:00", comments="Source field: configuration.version_date") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.version_date") public DateTime getVersionDate() { return versionDate; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.762+01:00", comments="Source field: configuration.followup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.689+02:00", comments="Source field: configuration.followup") public Integer getFollowup() { return followup; } @@ -57,7 +66,7 @@ public class ConfigurationRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -66,6 +75,7 @@ public class ConfigurationRecord { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); + sb.append(", institutionId=").append(institutionId); sb.append(", configurationNodeId=").append(configurationNodeId); sb.append(", version=").append(version); sb.append(", versionDate=").append(versionDate); @@ -78,7 +88,7 @@ public class ConfigurationRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -93,6 +103,7 @@ public class ConfigurationRecord { } ConfigurationRecord other = (ConfigurationRecord) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getInstitutionId() == null ? other.getInstitutionId() == null : this.getInstitutionId().equals(other.getInstitutionId())) && (this.getConfigurationNodeId() == null ? other.getConfigurationNodeId() == null : this.getConfigurationNodeId().equals(other.getConfigurationNodeId())) && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion())) && (this.getVersionDate() == null ? other.getVersionDate() == null : this.getVersionDate().equals(other.getVersionDate())) @@ -103,13 +114,14 @@ public class ConfigurationRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getInstitutionId() == null) ? 0 : getInstitutionId().hashCode()); result = prime * result + ((getConfigurationNodeId() == null) ? 0 : getConfigurationNodeId().hashCode()); result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode()); result = prime * result + ((getVersionDate() == null) ? 0 : getVersionDate().hashCode()); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationValueRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationValueRecord.java index 071cfafe..27302710 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationValueRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ConfigurationValueRecord.java @@ -3,27 +3,31 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class ConfigurationValueRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.743+01:00", comments="Source field: configuration_value.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.743+01:00", comments="Source field: configuration_value.configuration_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.institution_id") + private Long institutionId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.configuration_id") private Long configurationId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.744+01:00", comments="Source field: configuration_value.configuration_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.configuration_attribute_id") private Long configurationAttributeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.749+01:00", comments="Source field: configuration_value.list_index") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.list_index") private Integer listIndex; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.749+01:00", comments="Source field: configuration_value.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.value") private String value; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.749+01:00", comments="Source field: configuration_value.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.675+02:00", comments="Source field: configuration_value.text") private String text; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.743+01:00", comments="Source Table: configuration_value") - public ConfigurationValueRecord(Long id, Long configurationId, Long configurationAttributeId, Integer listIndex, String value, String text) { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source Table: configuration_value") + public ConfigurationValueRecord(Long id, Long institutionId, Long configurationId, Long configurationAttributeId, Integer listIndex, String value, String text) { this.id = id; + this.institutionId = institutionId; this.configurationId = configurationId; this.configurationAttributeId = configurationAttributeId; this.listIndex = listIndex; @@ -31,32 +35,37 @@ public class ConfigurationValueRecord { this.text = text; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.743+01:00", comments="Source field: configuration_value.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.743+01:00", comments="Source field: configuration_value.configuration_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.institution_id") + public Long getInstitutionId() { + return institutionId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.configuration_id") public Long getConfigurationId() { return configurationId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.748+01:00", comments="Source field: configuration_value.configuration_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.configuration_attribute_id") public Long getConfigurationAttributeId() { return configurationAttributeId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.749+01:00", comments="Source field: configuration_value.list_index") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.674+02:00", comments="Source field: configuration_value.list_index") public Integer getListIndex() { return listIndex; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.749+01:00", comments="Source field: configuration_value.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.675+02:00", comments="Source field: configuration_value.value") public String getValue() { return value; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.749+01:00", comments="Source field: configuration_value.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.675+02:00", comments="Source field: configuration_value.text") public String getText() { return text; } @@ -65,7 +74,7 @@ public class ConfigurationValueRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_value * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -74,6 +83,7 @@ public class ConfigurationValueRecord { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); + sb.append(", institutionId=").append(institutionId); sb.append(", configurationId=").append(configurationId); sb.append(", configurationAttributeId=").append(configurationAttributeId); sb.append(", listIndex=").append(listIndex); @@ -87,7 +97,7 @@ public class ConfigurationValueRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_value * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -102,6 +112,7 @@ public class ConfigurationValueRecord { } ConfigurationValueRecord other = (ConfigurationValueRecord) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getInstitutionId() == null ? other.getInstitutionId() == null : this.getInstitutionId().equals(other.getInstitutionId())) && (this.getConfigurationId() == null ? other.getConfigurationId() == null : this.getConfigurationId().equals(other.getConfigurationId())) && (this.getConfigurationAttributeId() == null ? other.getConfigurationAttributeId() == null : this.getConfigurationAttributeId().equals(other.getConfigurationAttributeId())) && (this.getListIndex() == null ? other.getListIndex() == null : this.getListIndex().equals(other.getListIndex())) @@ -113,13 +124,14 @@ public class ConfigurationValueRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_value * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getInstitutionId() == null) ? 0 : getInstitutionId().hashCode()); result = prime * result + ((getConfigurationId() == null) ? 0 : getConfigurationId().hashCode()); result = prime * result + ((getConfigurationAttributeId() == null) ? 0 : getConfigurationAttributeId().hashCode()); result = prime * result + ((getListIndex() == null) ? 0 : getListIndex().hashCode()); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ExamConfigurationMapRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ExamConfigurationMapRecord.java index 0732ba84..46b3fe4d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ExamConfigurationMapRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ExamConfigurationMapRecord.java @@ -3,42 +3,51 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class ExamConfigurationMapRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.776+01:00", comments="Source field: exam_configuration_map.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.705+02:00", comments="Source field: exam_configuration_map.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.776+01:00", comments="Source field: exam_configuration_map.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.705+02:00", comments="Source field: exam_configuration_map.institution_id") + private Long institutionId; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.705+02:00", comments="Source field: exam_configuration_map.exam_id") private Long examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.776+01:00", comments="Source field: exam_configuration_map.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.705+02:00", comments="Source field: exam_configuration_map.configuration_node_id") private Long configurationNodeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.776+01:00", comments="Source field: exam_configuration_map.user_names") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.706+02:00", comments="Source field: exam_configuration_map.user_names") private String userNames; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.775+01:00", comments="Source Table: exam_configuration_map") - public ExamConfigurationMapRecord(Long id, Long examId, Long configurationNodeId, String userNames) { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.705+02:00", comments="Source Table: exam_configuration_map") + public ExamConfigurationMapRecord(Long id, Long institutionId, Long examId, Long configurationNodeId, String userNames) { this.id = id; + this.institutionId = institutionId; this.examId = examId; this.configurationNodeId = configurationNodeId; this.userNames = userNames; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.776+01:00", comments="Source field: exam_configuration_map.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.705+02:00", comments="Source field: exam_configuration_map.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.776+01:00", comments="Source field: exam_configuration_map.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.705+02:00", comments="Source field: exam_configuration_map.institution_id") + public Long getInstitutionId() { + return institutionId; + } + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.705+02:00", comments="Source field: exam_configuration_map.exam_id") public Long getExamId() { return examId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.776+01:00", comments="Source field: exam_configuration_map.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.706+02:00", comments="Source field: exam_configuration_map.configuration_node_id") public Long getConfigurationNodeId() { return configurationNodeId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.776+01:00", comments="Source field: exam_configuration_map.user_names") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.706+02:00", comments="Source field: exam_configuration_map.user_names") public String getUserNames() { return userNames; } @@ -47,7 +56,7 @@ public class ExamConfigurationMapRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam_configuration_map * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -56,6 +65,7 @@ public class ExamConfigurationMapRecord { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); + sb.append(", institutionId=").append(institutionId); sb.append(", examId=").append(examId); sb.append(", configurationNodeId=").append(configurationNodeId); sb.append(", userNames=").append(userNames); @@ -67,7 +77,7 @@ public class ExamConfigurationMapRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam_configuration_map * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -82,6 +92,7 @@ public class ExamConfigurationMapRecord { } ExamConfigurationMapRecord other = (ExamConfigurationMapRecord) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getInstitutionId() == null ? other.getInstitutionId() == null : this.getInstitutionId().equals(other.getInstitutionId())) && (this.getExamId() == null ? other.getExamId() == null : this.getExamId().equals(other.getExamId())) && (this.getConfigurationNodeId() == null ? other.getConfigurationNodeId() == null : this.getConfigurationNodeId().equals(other.getConfigurationNodeId())) && (this.getUserNames() == null ? other.getUserNames() == null : this.getUserNames().equals(other.getUserNames())); @@ -91,13 +102,14 @@ public class ExamConfigurationMapRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam_configuration_map * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getInstitutionId() == null) ? 0 : getInstitutionId().hashCode()); result = prime * result + ((getExamId() == null) ? 0 : getExamId().hashCode()); result = prime * result + ((getConfigurationNodeId() == null) ? 0 : getConfigurationNodeId().hashCode()); result = prime * result + ((getUserNames() == null) ? 0 : getUserNames().hashCode()); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ExamRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ExamRecord.java index 67e6dd64..6158348b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ExamRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ExamRecord.java @@ -3,34 +3,34 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class ExamRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.783+01:00", comments="Source field: exam.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.783+01:00", comments="Source field: exam.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.institution_id") private Long institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.783+01:00", comments="Source field: exam.lms_setup_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.lms_setup_id") private Long lmsSetupId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.784+01:00", comments="Source field: exam.external_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.external_id") private String externalId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.784+01:00", comments="Source field: exam.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.owner") private String owner; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.784+01:00", comments="Source field: exam.supporter") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.supporter") private String supporter; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.784+01:00", comments="Source field: exam.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.type") private String type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.784+01:00", comments="Source field: exam.quit_password") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.quit_password") private String quitPassword; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.785+01:00", comments="Source field: exam.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.712+02:00", comments="Source field: exam.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.783+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.710+02:00", comments="Source Table: exam") public ExamRecord(Long id, Long institutionId, Long lmsSetupId, String externalId, String owner, String supporter, String type, String quitPassword, Integer active) { this.id = id; this.institutionId = institutionId; @@ -43,47 +43,47 @@ public class ExamRecord { this.active = active; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.783+01:00", comments="Source field: exam.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.783+01:00", comments="Source field: exam.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.institution_id") public Long getInstitutionId() { return institutionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.783+01:00", comments="Source field: exam.lms_setup_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.lms_setup_id") public Long getLmsSetupId() { return lmsSetupId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.784+01:00", comments="Source field: exam.external_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.external_id") public String getExternalId() { return externalId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.784+01:00", comments="Source field: exam.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.owner") public String getOwner() { return owner; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.784+01:00", comments="Source field: exam.supporter") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.supporter") public String getSupporter() { return supporter; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.784+01:00", comments="Source field: exam.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.711+02:00", comments="Source field: exam.type") public String getType() { return type; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.785+01:00", comments="Source field: exam.quit_password") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.712+02:00", comments="Source field: exam.quit_password") public String getQuitPassword() { return quitPassword; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.785+01:00", comments="Source field: exam.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.712+02:00", comments="Source field: exam.active") public Integer getActive() { return active; } @@ -92,7 +92,7 @@ public class ExamRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -117,7 +117,7 @@ public class ExamRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -146,7 +146,7 @@ public class ExamRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/IndicatorRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/IndicatorRecord.java index d58437bc..bb312ab1 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/IndicatorRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/IndicatorRecord.java @@ -3,22 +3,22 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class IndicatorRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.819+01:00", comments="Source field: indicator.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.734+02:00", comments="Source field: indicator.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.824+01:00", comments="Source field: indicator.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.736+02:00", comments="Source field: indicator.exam_id") private Long examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.824+01:00", comments="Source field: indicator.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.736+02:00", comments="Source field: indicator.type") private String type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.824+01:00", comments="Source field: indicator.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.739+02:00", comments="Source field: indicator.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.825+01:00", comments="Source field: indicator.color") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.740+02:00", comments="Source field: indicator.color") private String color; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.817+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.734+02:00", comments="Source Table: indicator") public IndicatorRecord(Long id, Long examId, String type, String name, String color) { this.id = id; this.examId = examId; @@ -27,27 +27,27 @@ public class IndicatorRecord { this.color = color; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.823+01:00", comments="Source field: indicator.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.736+02:00", comments="Source field: indicator.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.824+01:00", comments="Source field: indicator.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.736+02:00", comments="Source field: indicator.exam_id") public Long getExamId() { return examId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.824+01:00", comments="Source field: indicator.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.739+02:00", comments="Source field: indicator.type") public String getType() { return type; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.825+01:00", comments="Source field: indicator.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.740+02:00", comments="Source field: indicator.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.825+01:00", comments="Source field: indicator.color") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.740+02:00", comments="Source field: indicator.color") public String getColor() { return color; } @@ -56,7 +56,7 @@ public class IndicatorRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table indicator * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -77,7 +77,7 @@ public class IndicatorRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table indicator * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -102,7 +102,7 @@ public class IndicatorRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table indicator * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/InstitutionRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/InstitutionRecord.java index bfd97123..75b67252 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/InstitutionRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/InstitutionRecord.java @@ -3,25 +3,25 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class InstitutionRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source field: institution.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source field: institution.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source field: institution.url_suffix") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.url_suffix") private String urlSuffix; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source field: institution.theme_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.theme_name") private String themeName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source field: institution.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.852+01:00", comments="Source field: institution.logo_image") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.logo_image") private String logoImage; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.754+02:00", comments="Source Table: institution") public InstitutionRecord(Long id, String name, String urlSuffix, String themeName, Integer active, String logoImage) { this.id = id; this.name = name; @@ -31,32 +31,32 @@ public class InstitutionRecord { this.logoImage = logoImage; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source field: institution.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source field: institution.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source field: institution.url_suffix") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.url_suffix") public String getUrlSuffix() { return urlSuffix; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source field: institution.theme_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.theme_name") public String getThemeName() { return themeName; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.850+01:00", comments="Source field: institution.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.active") public Integer getActive() { return active; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.852+01:00", comments="Source field: institution.logo_image") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.755+02:00", comments="Source field: institution.logo_image") public String getLogoImage() { return logoImage; } @@ -65,7 +65,7 @@ public class InstitutionRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table institution * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -87,7 +87,7 @@ public class InstitutionRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table institution * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -113,7 +113,7 @@ public class InstitutionRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table institution * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/LmsSetupRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/LmsSetupRecord.java index 03589ad5..4d3ca249 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/LmsSetupRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/LmsSetupRecord.java @@ -3,34 +3,34 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class LmsSetupRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.883+01:00", comments="Source field: lms_setup.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.766+02:00", comments="Source field: lms_setup.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.883+01:00", comments="Source field: lms_setup.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.766+02:00", comments="Source field: lms_setup.institution_id") private Long institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.883+01:00", comments="Source field: lms_setup.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.766+02:00", comments="Source field: lms_setup.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.883+01:00", comments="Source field: lms_setup.lms_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.lms_type") private String lmsType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.lms_url") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.lms_url") private String lmsUrl; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.lms_clientname") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.lms_clientname") private String lmsClientname; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.lms_clientsecret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.lms_clientsecret") private String lmsClientsecret; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.lms_rest_api_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.lms_rest_api_token") private String lmsRestApiToken; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.883+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.766+02:00", comments="Source Table: lms_setup") public LmsSetupRecord(Long id, Long institutionId, String name, String lmsType, String lmsUrl, String lmsClientname, String lmsClientsecret, String lmsRestApiToken, Integer active) { this.id = id; this.institutionId = institutionId; @@ -43,47 +43,47 @@ public class LmsSetupRecord { this.active = active; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.883+01:00", comments="Source field: lms_setup.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.766+02:00", comments="Source field: lms_setup.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.883+01:00", comments="Source field: lms_setup.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.766+02:00", comments="Source field: lms_setup.institution_id") public Long getInstitutionId() { return institutionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.883+01:00", comments="Source field: lms_setup.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.766+02:00", comments="Source field: lms_setup.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.lms_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.lms_type") public String getLmsType() { return lmsType; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.lms_url") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.lms_url") public String getLmsUrl() { return lmsUrl; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.lms_clientname") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.lms_clientname") public String getLmsClientname() { return lmsClientname; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.lms_clientsecret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.lms_clientsecret") public String getLmsClientsecret() { return lmsClientsecret; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.lms_rest_api_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.lms_rest_api_token") public String getLmsRestApiToken() { return lmsRestApiToken; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.884+01:00", comments="Source field: lms_setup.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.767+02:00", comments="Source field: lms_setup.active") public Integer getActive() { return active; } @@ -92,7 +92,7 @@ public class LmsSetupRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table lms_setup * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -117,7 +117,7 @@ public class LmsSetupRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table lms_setup * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -146,7 +146,7 @@ public class LmsSetupRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table lms_setup * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/OrientationRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/OrientationRecord.java index 362fcb4b..8bac5620 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/OrientationRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/OrientationRecord.java @@ -3,34 +3,34 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class OrientationRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.679+02:00", comments="Source field: orientation.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.config_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.config_attribute_id") private Long configAttributeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.template") private String template; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.view") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.view") private String view; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.group") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.group") private String group; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.x_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.x_position") private Integer xPosition; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.755+01:00", comments="Source field: orientation.y_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.681+02:00", comments="Source field: orientation.y_position") private Integer yPosition; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.755+01:00", comments="Source field: orientation.width") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.681+02:00", comments="Source field: orientation.width") private Integer width; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.755+01:00", comments="Source field: orientation.height") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.681+02:00", comments="Source field: orientation.height") private Integer height; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.753+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.679+02:00", comments="Source Table: orientation") public OrientationRecord(Long id, Long configAttributeId, String template, String view, String group, Integer xPosition, Integer yPosition, Integer width, Integer height) { this.id = id; this.configAttributeId = configAttributeId; @@ -43,47 +43,47 @@ public class OrientationRecord { this.height = height; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.config_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.config_attribute_id") public Long getConfigAttributeId() { return configAttributeId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.template") public String getTemplate() { return template; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.view") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.view") public String getView() { return view; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.754+01:00", comments="Source field: orientation.group") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.group") public String getGroup() { return group; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.755+01:00", comments="Source field: orientation.x_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.680+02:00", comments="Source field: orientation.x_position") public Integer getxPosition() { return xPosition; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.755+01:00", comments="Source field: orientation.y_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.681+02:00", comments="Source field: orientation.y_position") public Integer getyPosition() { return yPosition; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.755+01:00", comments="Source field: orientation.width") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.681+02:00", comments="Source field: orientation.width") public Integer getWidth() { return width; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.755+01:00", comments="Source field: orientation.height") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.681+02:00", comments="Source field: orientation.height") public Integer getHeight() { return height; } @@ -92,7 +92,7 @@ public class OrientationRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table orientation * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -117,7 +117,7 @@ public class OrientationRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table orientation * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -146,7 +146,7 @@ public class OrientationRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table orientation * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/RoleRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/RoleRecord.java index 3c7b0dd6..02770d30 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/RoleRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/RoleRecord.java @@ -3,33 +3,33 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class RoleRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.892+01:00", comments="Source field: user_role.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.773+02:00", comments="Source field: user_role.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.892+01:00", comments="Source field: user_role.user_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.773+02:00", comments="Source field: user_role.user_id") private Long userId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.892+01:00", comments="Source field: user_role.role_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.773+02:00", comments="Source field: user_role.role_name") private String roleName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.892+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.773+02:00", comments="Source Table: user_role") public RoleRecord(Long id, Long userId, String roleName) { this.id = id; this.userId = userId; this.roleName = roleName; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.892+01:00", comments="Source field: user_role.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.773+02:00", comments="Source field: user_role.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.892+01:00", comments="Source field: user_role.user_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.773+02:00", comments="Source field: user_role.user_id") public Long getUserId() { return userId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.892+01:00", comments="Source field: user_role.role_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.773+02:00", comments="Source field: user_role.role_name") public String getRoleName() { return roleName; } @@ -38,7 +38,7 @@ public class RoleRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table user_role * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -57,7 +57,7 @@ public class RoleRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table user_role * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -80,7 +80,7 @@ public class RoleRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table user_role * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/SebClientConfigRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/SebClientConfigRecord.java index e099c31d..1185fa26 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/SebClientConfigRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/SebClientConfigRecord.java @@ -4,28 +4,28 @@ import javax.annotation.Generated; import org.joda.time.DateTime; public class SebClientConfigRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.871+01:00", comments="Source field: seb_client_configuration.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.760+02:00", comments="Source field: seb_client_configuration.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.871+01:00", comments="Source field: seb_client_configuration.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.760+02:00", comments="Source field: seb_client_configuration.institution_id") private Long institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.871+01:00", comments="Source field: seb_client_configuration.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.761+02:00", comments="Source field: seb_client_configuration.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.871+01:00", comments="Source field: seb_client_configuration.date") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.761+02:00", comments="Source field: seb_client_configuration.date") private DateTime date; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.873+01:00", comments="Source field: seb_client_configuration.client_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.761+02:00", comments="Source field: seb_client_configuration.client_name") private String clientName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.873+01:00", comments="Source field: seb_client_configuration.client_secret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.761+02:00", comments="Source field: seb_client_configuration.client_secret") private String clientSecret; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.873+01:00", comments="Source field: seb_client_configuration.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.761+02:00", comments="Source field: seb_client_configuration.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.871+01:00", comments="Source Table: seb_client_configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.760+02:00", comments="Source Table: seb_client_configuration") public SebClientConfigRecord(Long id, Long institutionId, String name, DateTime date, String clientName, String clientSecret, Integer active) { this.id = id; this.institutionId = institutionId; @@ -36,37 +36,37 @@ public class SebClientConfigRecord { this.active = active; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.871+01:00", comments="Source field: seb_client_configuration.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.760+02:00", comments="Source field: seb_client_configuration.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.871+01:00", comments="Source field: seb_client_configuration.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.760+02:00", comments="Source field: seb_client_configuration.institution_id") public Long getInstitutionId() { return institutionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.871+01:00", comments="Source field: seb_client_configuration.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.761+02:00", comments="Source field: seb_client_configuration.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.873+01:00", comments="Source field: seb_client_configuration.date") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.761+02:00", comments="Source field: seb_client_configuration.date") public DateTime getDate() { return date; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.873+01:00", comments="Source field: seb_client_configuration.client_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.761+02:00", comments="Source field: seb_client_configuration.client_name") public String getClientName() { return clientName; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.873+01:00", comments="Source field: seb_client_configuration.client_secret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.761+02:00", comments="Source field: seb_client_configuration.client_secret") public String getClientSecret() { return clientSecret; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.873+01:00", comments="Source field: seb_client_configuration.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.761+02:00", comments="Source field: seb_client_configuration.active") public Integer getActive() { return active; } @@ -75,7 +75,7 @@ public class SebClientConfigRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table seb_client_configuration * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -98,7 +98,7 @@ public class SebClientConfigRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table seb_client_configuration * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -125,7 +125,7 @@ public class SebClientConfigRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table seb_client_configuration * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ThresholdRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ThresholdRecord.java index 8563a082..e0652be3 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ThresholdRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ThresholdRecord.java @@ -4,19 +4,19 @@ import java.math.BigDecimal; import javax.annotation.Generated; public class ThresholdRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.842+01:00", comments="Source field: threshold.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.750+02:00", comments="Source field: threshold.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.842+01:00", comments="Source field: threshold.indicator_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.750+02:00", comments="Source field: threshold.indicator_id") private Long indicatorId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.843+01:00", comments="Source field: threshold.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.750+02:00", comments="Source field: threshold.value") private BigDecimal value; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.843+01:00", comments="Source field: threshold.color") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.750+02:00", comments="Source field: threshold.color") private String color; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.842+01:00", comments="Source Table: threshold") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.750+02:00", comments="Source Table: threshold") public ThresholdRecord(Long id, Long indicatorId, BigDecimal value, String color) { this.id = id; this.indicatorId = indicatorId; @@ -24,22 +24,22 @@ public class ThresholdRecord { this.color = color; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.842+01:00", comments="Source field: threshold.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.750+02:00", comments="Source field: threshold.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.843+01:00", comments="Source field: threshold.indicator_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.750+02:00", comments="Source field: threshold.indicator_id") public Long getIndicatorId() { return indicatorId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.843+01:00", comments="Source field: threshold.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.750+02:00", comments="Source field: threshold.value") public BigDecimal getValue() { return value; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.843+01:00", comments="Source field: threshold.color") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.750+02:00", comments="Source field: threshold.color") public String getColor() { return color; } @@ -48,7 +48,7 @@ public class ThresholdRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table threshold * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -68,7 +68,7 @@ public class ThresholdRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table threshold * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -92,7 +92,7 @@ public class ThresholdRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table threshold * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/UserActivityLogRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/UserActivityLogRecord.java index 6b978336..421692ea 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/UserActivityLogRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/UserActivityLogRecord.java @@ -3,28 +3,28 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class UserActivityLogRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.897+01:00", comments="Source field: user_activity_log.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.897+01:00", comments="Source field: user_activity_log.user_uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.user_uuid") private String userUuid; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.897+01:00", comments="Source field: user_activity_log.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.timestamp") private Long timestamp; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.activity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.activity_type") private String activityType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.entity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.entity_type") private String entityType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.entity_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.entity_id") private String entityId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.message") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.message") private String message; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.897+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.775+02:00", comments="Source Table: user_activity_log") public UserActivityLogRecord(Long id, String userUuid, Long timestamp, String activityType, String entityType, String entityId, String message) { this.id = id; this.userUuid = userUuid; @@ -35,37 +35,37 @@ public class UserActivityLogRecord { this.message = message; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.897+01:00", comments="Source field: user_activity_log.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.897+01:00", comments="Source field: user_activity_log.user_uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.user_uuid") public String getUserUuid() { return userUuid; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.timestamp") public Long getTimestamp() { return timestamp; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.activity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.activity_type") public String getActivityType() { return activityType; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.entity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.entity_type") public String getEntityType() { return entityType; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.entity_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.entity_id") public String getEntityId() { return entityId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.898+01:00", comments="Source field: user_activity_log.message") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.776+02:00", comments="Source field: user_activity_log.message") public String getMessage() { return message; } @@ -74,7 +74,7 @@ public class UserActivityLogRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table user_activity_log * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -97,7 +97,7 @@ public class UserActivityLogRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table user_activity_log * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -124,7 +124,7 @@ public class UserActivityLogRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table user_activity_log * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/UserRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/UserRecord.java index d7ef57fa..f620dd00 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/UserRecord.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/UserRecord.java @@ -3,37 +3,37 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class UserRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.888+01:00", comments="Source field: user.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.888+01:00", comments="Source field: user.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.institution_id") private Long institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.888+01:00", comments="Source field: user.uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.uuid") private String uuid; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.username") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.username") private String username; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.password") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.password") private String password; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.email") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.email") private String email; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.language") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.language") private String language; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.timezone") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.timezone") private String timezone; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.888+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source Table: user") public UserRecord(Long id, Long institutionId, String uuid, String name, String username, String password, String email, String language, String timezone, Integer active) { this.id = id; this.institutionId = institutionId; @@ -47,52 +47,52 @@ public class UserRecord { this.active = active; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.888+01:00", comments="Source field: user.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.888+01:00", comments="Source field: user.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.institution_id") public Long getInstitutionId() { return institutionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.888+01:00", comments="Source field: user.uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.uuid") public String getUuid() { return uuid; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.username") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.username") public String getUsername() { return username; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.password") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.password") public String getPassword() { return password; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.email") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.email") public String getEmail() { return email; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.language") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.language") public String getLanguage() { return language; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.timezone") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.770+02:00", comments="Source field: user.timezone") public String getTimezone() { return timezone; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-03-19T14:35:50.889+01:00", comments="Source field: user.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-10T15:17:04.771+02:00", comments="Source field: user.active") public Integer getActive() { return active; } @@ -101,7 +101,7 @@ public class UserRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table user * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public String toString() { @@ -127,7 +127,7 @@ public class UserRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table user * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public boolean equals(Object that) { @@ -157,7 +157,7 @@ public class UserRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table user * - * @mbg.generated Tue Mar 19 14:35:50 CET 2019 + * @mbg.generated Wed Apr 10 15:17:04 CEST 2019 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/bulkaction/BulkActionServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/bulkaction/BulkActionServiceImpl.java index 633f846d..a2d2afc7 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/bulkaction/BulkActionServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/bulkaction/BulkActionServiceImpl.java @@ -157,21 +157,30 @@ public class BulkActionServiceImpl implements BulkActionService { this.supporter.get(EntityType.USER), this.supporter.get(EntityType.EXAM), this.supporter.get(EntityType.INDICATOR), + this.supporter.get(EntityType.EXAM_CONFIGURATION_MAP), this.supporter.get(EntityType.CLIENT_CONNECTION), this.supporter.get(EntityType.CONFIGURATION_NODE)); - case USER: - return Arrays.asList( - this.supporter.get(EntityType.EXAM), - this.supporter.get(EntityType.INDICATOR), - this.supporter.get(EntityType.CLIENT_CONNECTION), - this.supporter.get(EntityType.CONFIGURATION_NODE)); +// case USER: +// return Arrays.asList( +// this.supporter.get(EntityType.EXAM_CONFIGURATION_MAP), +// this.supporter.get(EntityType.EXAM), +// this.supporter.get(EntityType.INDICATOR), +// this.supporter.get(EntityType.CLIENT_CONNECTION), +// this.supporter.get(EntityType.CONFIGURATION_NODE)); case LMS_SETUP: - case EXAM: - case CONFIGURATION: return Arrays.asList( this.supporter.get(EntityType.EXAM), this.supporter.get(EntityType.INDICATOR), + this.supporter.get(EntityType.EXAM_CONFIGURATION_MAP), this.supporter.get(EntityType.CLIENT_CONNECTION)); + case EXAM: + return Arrays.asList( + this.supporter.get(EntityType.INDICATOR), + this.supporter.get(EntityType.EXAM_CONFIGURATION_MAP), + this.supporter.get(EntityType.CLIENT_CONNECTION)); + case CONFIGURATION_NODE: + return Arrays.asList( + this.supporter.get(EntityType.EXAM_CONFIGURATION_MAP)); default: return Collections.emptyList(); } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationAttributeDAO.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationAttributeDAO.java new file mode 100644 index 00000000..051ee966 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationAttributeDAO.java @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.dao; + +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute; + +public interface ConfigurationAttributeDAO extends EntityDAO { + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationDAO.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationDAO.java new file mode 100644 index 00000000..72f36602 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationDAO.java @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.dao; + +import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration; + +public interface ConfigurationDAO extends EntityDAO { + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationNodeDAO.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationNodeDAO.java new file mode 100644 index 00000000..eee85623 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationNodeDAO.java @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.dao; + +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode; +import ch.ethz.seb.sebserver.webservice.servicelayer.bulkaction.BulkActionSupportDAO; + +public interface ConfigurationNodeDAO extends + ActivatableEntityDAO, + BulkActionSupportDAO { + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationValueDAO.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationValueDAO.java new file mode 100644 index 00000000..a2e1d6cf --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ConfigurationValueDAO.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.dao; + +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationTableValue; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue; +import ch.ethz.seb.sebserver.gbl.util.Result; + +public interface ConfigurationValueDAO extends EntityDAO { + + Result getTableValue( + Long institutionId, + Long attributeId, + final Long configurationId); + + Result saveTableValue(ConfigurationTableValue value); + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/EntityDAO.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/EntityDAO.java index 785aa1fb..05135b43 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/EntityDAO.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/EntityDAO.java @@ -8,6 +8,7 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -15,6 +16,8 @@ import java.util.Set; import java.util.function.Predicate; import java.util.stream.Collectors; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.transaction.annotation.Transactional; import ch.ethz.seb.sebserver.gbl.api.EntityType; @@ -30,6 +33,8 @@ import ch.ethz.seb.sebserver.gbl.util.Result; * @param The specific type of the Entity domain model to create a new Entity */ public interface EntityDAO { + Logger log = LoggerFactory.getLogger(EntityDAO.class); + /** Get the entity type for a concrete EntityDAO implementation. * * @return The EntityType for a concrete EntityDAO implementation */ @@ -57,11 +62,19 @@ public interface EntityDAO { }).flatMap(this::byPK); } + /** Get a collection of all entities for the given Set of primary keys. + * + * @param pks the Set of primary keys to get the Entity's for + * @return Result referring the collection or an error if happened */ + Result> allOf(Set pks); + /** Get a collection of all entities for the given Set of entity keys. * * @param keys the Set of EntityKey to get the Entity's for * @return Result referring the collection or an error if happened */ - Result> byEntityKeys(Set keys); + default Result> byEntityKeys(final Set keys) { + return allOf(extractPKsFromKeys(keys)); + } /** Get a collection of all EntityName for the given Set of EntityKey. * @@ -157,7 +170,7 @@ public interface EntityDAO { return Result.of(resources.iterator().next()); } - /** Context based utility method to extract a list of id's (PK) from a collection of various EntityKey + /** Context based utility method to extract a set of id's (PK) from a collection of various EntityKey * This uses the EntityType defined by this instance to filter all EntityKey by the given type and * convert the matching EntityKey's to id's (PK's) * @@ -165,19 +178,28 @@ public interface EntityDAO { * EntityType * * @param keys Collection of EntityKey of various types - * @return List of id's (PK's) from the given key collection that match the concrete EntityType */ - default List extractPKsFromKeys(final Collection keys) { + * @return Set of id's (PK's) from the given key collection that match the concrete EntityType */ + default Set extractPKsFromKeys(final Collection keys) { + try { - if (keys == null) { - return Collections.emptyList(); + if (keys == null) { + return Collections.emptySet(); + } + + final EntityType entityType = entityType(); + return keys + .stream() + .filter(key -> key.entityType == entityType) + .map(key -> Long.valueOf(key.modelId)) + .collect(Collectors.toSet()); + } catch (final Exception e) { + log.error("unexpected error while trying to extract PK's from EntityKey's : ", e); + return Collections.emptySet(); } + } - final EntityType entityType = entityType(); - return keys - .stream() - .filter(key -> key.entityType == entityType) - .map(key -> Long.valueOf(key.modelId)) - .collect(Collectors.toList()); + default List extractListOfPKs(final Collection keys) { + return new ArrayList<>(extractPKsFromKeys(keys)); } } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ExamConfigurationDAO.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ExamConfigurationDAO.java new file mode 100644 index 00000000..f9ecb1de --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ExamConfigurationDAO.java @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.dao; + +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ExamConfiguration; +import ch.ethz.seb.sebserver.webservice.servicelayer.bulkaction.BulkActionSupportDAO; + +public interface ExamConfigurationDAO extends + EntityDAO, + BulkActionSupportDAO { + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/FilterMap.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/FilterMap.java index 9a31744d..6ab7f0e8 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/FilterMap.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/FilterMap.java @@ -18,6 +18,11 @@ import ch.ethz.seb.sebserver.gbl.model.exam.Exam; import ch.ethz.seb.sebserver.gbl.model.exam.Indicator; import ch.ethz.seb.sebserver.gbl.model.exam.QuizData; import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ExamConfiguration; import ch.ethz.seb.sebserver.gbl.model.sebconfig.Orientation; import ch.ethz.seb.sebserver.gbl.model.user.UserInfo; import ch.ethz.seb.sebserver.gbl.util.Utils; @@ -43,7 +48,7 @@ public class FilterMap extends POSTMapper { } public Long getInstitutionId() { - return getLong(UserInfo.FILTER_ATTR_INSTITUTION); + return getLong(Entity.FILTER_ATTR_INSTITUTION); } public String getName() { @@ -114,6 +119,54 @@ public class FilterMap extends POSTMapper { return getSQLWildcard(Orientation.FILTER_ATTR_GROUP); } + public Long getConfigAttributeParentId() { + return getLong(ConfigurationAttribute.FILTER_ATTR_PARENT_ID); + } + + public String getConfigAttributeType() { + return getSQLWildcard(ConfigurationAttribute.FILTER_ATTR_TYPE); + } + + public Long getConfigValueConfigId() { + return getLong(ConfigurationValue.FILTER_ATTR_CONFIGURATION_ID); + } + + public Long getConfigValueAttributeId() { + return getLong(ConfigurationValue.FILTER_ATTR_CONFIGURATION_ATTRIBUTE_ID); + } + + public Long getConfigNodeId() { + return getLong(Configuration.FILTER_ATTR_CONFIGURATION_NODE_ID); + } + + public DateTime getConfigFromTime() { + return Utils.toDateTime(getString(Configuration.FILTER_ATTR_FROM_DATE)); + } + + public Integer getConfigFollowup() { + return getBooleanAsInteger(Configuration.FILTER_ATTR_FOLLOWUP); + } + + public String getConfigNodeDesc() { + return getSQLWildcard(ConfigurationNode.FILTER_ATTR_DESCRIPTION); + } + + public String getConfigNodeType() { + return getString(ConfigurationNode.FILTER_ATTR_TYPE); + } + + public String getConfigNodeTemplate() { + return getString(ConfigurationNode.FILTER_ATTR_TEMPLATE); + } + + public Long getExamConfigExamId() { + return getLong(ExamConfiguration.FILTER_ATTR_EXAM_ID); + } + + public Long getExamConfigConfigId() { + return getLong(ExamConfiguration.FILTER_ATTR_CONFIG_ID); + } + public String getSQLWildcard(final String name) { return toSQLWildcard(this.params.getFirst(name)); } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationAttributeDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationAttributeDAOImpl.java new file mode 100644 index 00000000..500f417f --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationAttributeDAOImpl.java @@ -0,0 +1,234 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; + +import static org.mybatis.dynamic.sql.SqlBuilder.isIn; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.mybatis.dynamic.sql.SqlBuilder; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import ch.ethz.seb.sebserver.gbl.api.EntityType; +import ch.ethz.seb.sebserver.gbl.model.EntityKey; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.AttributeType; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute; +import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; +import ch.ethz.seb.sebserver.gbl.util.Result; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationAttributeRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationAttributeRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationValueRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationValueRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.OrientationRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.OrientationRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ConfigurationAttributeRecord; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ConfigurationAttributeDAO; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.DAOLoggingSupport; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.FilterMap; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ResourceNotFoundException; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.TransactionHandler; + +@Lazy +@Component +@WebServiceProfile +public class ConfigurationAttributeDAOImpl implements ConfigurationAttributeDAO { + + private final ConfigurationAttributeRecordMapper configurationAttributeRecordMapper; + private final ConfigurationValueRecordMapper configurationValueRecordMapper; + private final OrientationRecordMapper orientationRecordMapper; + + protected ConfigurationAttributeDAOImpl( + final ConfigurationAttributeRecordMapper configurationAttributeRecordMapper, + final ConfigurationValueRecordMapper configurationValueRecordMapper, + final OrientationRecordMapper orientationRecordMapper) { + + this.configurationAttributeRecordMapper = configurationAttributeRecordMapper; + this.configurationValueRecordMapper = configurationValueRecordMapper; + this.orientationRecordMapper = orientationRecordMapper; + } + + @Override + public EntityType entityType() { + return EntityType.CONFIGURATION_ATTRIBUTE; + } + + @Override + @Transactional(readOnly = true) + public Result byPK(final Long id) { + return recordById(id) + .flatMap(ConfigurationAttributeDAOImpl::toDomainModel); + } + + @Override + @Transactional(readOnly = true) + public Result> allOf(final Set pks) { + return Result.tryCatch(() -> { + return this.configurationAttributeRecordMapper.selectByExample() + .where(ConfigurationAttributeRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) + .build() + .execute() + .stream() + .map(ConfigurationAttributeDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .collect(Collectors.toList()); + }); + } + + @Override + @Transactional(readOnly = true) + public Result> allMatching( + final FilterMap filterMap, + final Predicate predicate) { + + return Result.tryCatch(() -> this.configurationAttributeRecordMapper + .selectByExample() + .where( + ConfigurationAttributeRecordDynamicSqlSupport.parentId, + SqlBuilder.isEqualToWhenPresent(filterMap.getConfigAttributeParentId())) + .and( + ConfigurationAttributeRecordDynamicSqlSupport.type, + SqlBuilder.isEqualToWhenPresent(filterMap.getConfigAttributeType())) + .build() + .execute() + .stream() + .map(ConfigurationAttributeDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .filter(predicate) + .collect(Collectors.toList())); + } + + @Override + @Transactional + public Result createNew(final ConfigurationAttribute data) { + return Result.tryCatch(() -> { + final ConfigurationAttributeRecord newRecord = new ConfigurationAttributeRecord( + null, + data.name, + data.type.name(), + data.parentId, + data.resources, + data.validator, + data.dependencies, + data.defaultValue); + + this.configurationAttributeRecordMapper.insert(newRecord); + return newRecord; + }) + .flatMap(ConfigurationAttributeDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result save(final ConfigurationAttribute data) { + return Result.tryCatch(() -> { + + final ConfigurationAttributeRecord newRecord = new ConfigurationAttributeRecord( + data.id, + data.name, + data.type.name(), + data.parentId, + data.resources, + data.validator, + data.dependencies, + data.defaultValue); + + this.configurationAttributeRecordMapper.updateByPrimaryKeySelective(newRecord); + return this.configurationAttributeRecordMapper.selectByPrimaryKey(data.id); + }) + .flatMap(ConfigurationAttributeDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result> delete(final Set all) { + return Result.tryCatch(() -> { + + final List ids = extractListOfPKs(all); + final List result = new ArrayList<>(); + + // if this is a complex attribute that has children, delete the children first + final List children = + this.configurationAttributeRecordMapper.selectByExample() + .where(ConfigurationAttributeRecordDynamicSqlSupport.parentId, isIn(ids)) + .build() + .execute(); + + // recursive call for children and adding result to the overall result set + if (children != null && !children.isEmpty()) { + result.addAll(delete(children.stream() + .map(r -> new EntityKey(r.getId(), EntityType.CONFIGURATION_ATTRIBUTE)) + .collect(Collectors.toSet())) + .getOrThrow()); + } + + // delete all ConfigurationValue's that belongs to the ConfigurationAttributes to delete + this.configurationValueRecordMapper.deleteByExample() + .where( + ConfigurationValueRecordDynamicSqlSupport.configurationAttributeId, + SqlBuilder.isIn(ids)) + .build() + .execute(); + + // delete all Orientations that belongs to the ConfigurationAttributes to delete + this.orientationRecordMapper.deleteByExample() + .where( + OrientationRecordDynamicSqlSupport.configAttributeId, + SqlBuilder.isIn(ids)) + .build() + .execute(); + + // then delete all requested ConfigurationAttributes + this.configurationAttributeRecordMapper.deleteByExample() + .where(ConfigurationAttributeRecordDynamicSqlSupport.id, isIn(ids)) + .build() + .execute(); + + result.addAll(ids.stream() + .map(id -> new EntityKey(id, EntityType.CONFIGURATION_ATTRIBUTE)) + .collect(Collectors.toList())); + + return result; + }); + } + + private Result recordById(final Long id) { + return Result.tryCatch(() -> { + final ConfigurationAttributeRecord record = this.configurationAttributeRecordMapper + .selectByPrimaryKey(id); + if (record == null) { + throw new ResourceNotFoundException( + EntityType.CONFIGURATION_ATTRIBUTE, + String.valueOf(id)); + } + return record; + }); + } + + private static Result toDomainModel(final ConfigurationAttributeRecord record) { + return Result.tryCatch(() -> new ConfigurationAttribute( + record.getId(), + record.getParentId(), + record.getName(), + AttributeType.valueOf(record.getType()), + record.getResources(), + record.getValidator(), + record.getDependencies(), + record.getDefaultValue())); + } + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOImpl.java new file mode 100644 index 00000000..c1ce5d60 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOImpl.java @@ -0,0 +1,217 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; + +import static org.mybatis.dynamic.sql.SqlBuilder.isIn; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.BooleanUtils; +import org.mybatis.dynamic.sql.SqlBuilder; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import ch.ethz.seb.sebserver.gbl.api.EntityType; +import ch.ethz.seb.sebserver.gbl.model.EntityKey; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration; +import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; +import ch.ethz.seb.sebserver.gbl.util.Result; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationNodeRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationValueRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationValueRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ConfigurationNodeRecord; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ConfigurationRecord; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ConfigurationDAO; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.DAOLoggingSupport; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.FilterMap; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ResourceNotFoundException; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.TransactionHandler; + +@Lazy +@Component +@WebServiceProfile +public class ConfigurationDAOImpl implements ConfigurationDAO { + + private final ConfigurationRecordMapper configurationRecordMapper; + private final ConfigurationNodeRecordMapper configurationNodeRecordMapper; + private final ConfigurationValueRecordMapper configurationValueRecordMapper; + + protected ConfigurationDAOImpl( + final ConfigurationRecordMapper configurationRecordMapper, + final ConfigurationNodeRecordMapper configurationNodeRecordMapper, + final ConfigurationValueRecordMapper configurationValueRecordMapper) { + + this.configurationRecordMapper = configurationRecordMapper; + this.configurationNodeRecordMapper = configurationNodeRecordMapper; + this.configurationValueRecordMapper = configurationValueRecordMapper; + } + + @Override + public EntityType entityType() { + return EntityType.CONFIGURATION; + } + + @Override + @Transactional(readOnly = true) + public Result byPK(final Long id) { + return recordById(id) + .flatMap(ConfigurationDAOImpl::toDomainModel); + } + + @Override + @Transactional(readOnly = true) + public Result> allOf(final Set pks) { + return Result.tryCatch(() -> { + return this.configurationRecordMapper.selectByExample() + .where(ConfigurationRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) + .build() + .execute() + .stream() + .map(ConfigurationDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .collect(Collectors.toList()); + }); + } + + @Override + @Transactional(readOnly = true) + public Result> allMatching( + final FilterMap filterMap, + final Predicate predicate) { + + return Result.tryCatch(() -> this.configurationRecordMapper + .selectByExample() + .where( + ConfigurationRecordDynamicSqlSupport.institutionId, + SqlBuilder.isEqualToWhenPresent(filterMap.getInstitutionId())) + .and( + ConfigurationRecordDynamicSqlSupport.configurationNodeId, + SqlBuilder.isEqualToWhenPresent(filterMap.getConfigNodeId())) + .and( + ConfigurationRecordDynamicSqlSupport.versionDate, + SqlBuilder.isGreaterThanOrEqualToWhenPresent(filterMap.getConfigFromTime())) + .and( + ConfigurationRecordDynamicSqlSupport.followup, + SqlBuilder.isEqualToWhenPresent(filterMap.getConfigFollowup())) + .build() + .execute() + .stream() + .map(ConfigurationDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .filter(predicate) + .collect(Collectors.toList())); + } + + @Override + @Transactional + public Result createNew(final Configuration data) { + return checkInstitutionalIntegrity(data) + .map(config -> { + final ConfigurationRecord newRecord = new ConfigurationRecord( + null, + config.institutionId, + config.configurationNodeId, + config.version, + config.versionDate, + BooleanUtils.toInteger(config.followup)); + + this.configurationRecordMapper.insert(newRecord); + return newRecord; + }) + .flatMap(ConfigurationDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result save(final Configuration data) { + return Result.tryCatch(() -> { + final ConfigurationRecord newRecord = new ConfigurationRecord( + null, + null, + null, + data.version, + data.versionDate, + BooleanUtils.toInteger(data.followup)); + + this.configurationRecordMapper.insert(newRecord); + return newRecord; + }) + .flatMap(ConfigurationDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result> delete(final Set all) { + return Result.tryCatch(() -> { + + final List ids = extractListOfPKs(all); + + // delete all ConfigurationValue's that belongs to the Configuration's to delete + this.configurationValueRecordMapper.deleteByExample() + .where(ConfigurationValueRecordDynamicSqlSupport.configurationId, isIn(ids)) + .build() + .execute(); + + // delete all requested Configuration's + this.configurationRecordMapper.deleteByExample() + .where(ConfigurationRecordDynamicSqlSupport.id, isIn(ids)) + .build() + .execute(); + + return ids.stream() + .map(id -> new EntityKey(id, EntityType.CONFIGURATION)) + .collect(Collectors.toList()); + }); + } + + private Result recordById(final Long id) { + return Result.tryCatch(() -> { + final ConfigurationRecord record = this.configurationRecordMapper + .selectByPrimaryKey(id); + if (record == null) { + throw new ResourceNotFoundException( + EntityType.CONFIGURATION, + String.valueOf(id)); + } + return record; + }); + } + + private static Result toDomainModel(final ConfigurationRecord record) { + return Result.tryCatch(() -> new Configuration( + record.getId(), + record.getInstitutionId(), + record.getConfigurationNodeId(), + record.getVersion(), + record.getVersionDate(), + BooleanUtils.toBooleanObject(record.getFollowup()))); + } + + private Result checkInstitutionalIntegrity(final Configuration data) { + return Result.tryCatch(() -> { + final ConfigurationNodeRecord r = + this.configurationNodeRecordMapper.selectByPrimaryKey(data.configurationNodeId); + if (r.getInstitutionId().longValue() != data.institutionId.longValue()) { + throw new IllegalArgumentException("Institutional integrity constraint violation"); + } + return data; + }); + } + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationNodeDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationNodeDAOImpl.java new file mode 100644 index 00000000..aaa1c437 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationNodeDAOImpl.java @@ -0,0 +1,359 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; + +import static org.mybatis.dynamic.sql.SqlBuilder.*; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.StringUtils; +import org.mybatis.dynamic.sql.SqlBuilder; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import ch.ethz.seb.sebserver.gbl.api.APIMessage.FieldValidationException; +import ch.ethz.seb.sebserver.gbl.api.EntityType; +import ch.ethz.seb.sebserver.gbl.model.EntityKey; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode.ConfigurationType; +import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; +import ch.ethz.seb.sebserver.gbl.util.Result; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationNodeRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationNodeRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationValueRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationValueRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ConfigurationNodeRecord; +import ch.ethz.seb.sebserver.webservice.servicelayer.bulkaction.BulkAction; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ConfigurationNodeDAO; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.DAOLoggingSupport; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.FilterMap; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ResourceNotFoundException; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.TransactionHandler; + +@Lazy +@Component +@WebServiceProfile +public class ConfigurationNodeDAOImpl implements ConfigurationNodeDAO { + + private final ConfigurationRecordMapper configurationRecordMapper; + private final ConfigurationNodeRecordMapper configurationNodeRecordMapper; + private final ConfigurationValueRecordMapper configurationValueRecordMapper; + + protected ConfigurationNodeDAOImpl( + final ConfigurationRecordMapper configurationRecordMapper, + final ConfigurationNodeRecordMapper configurationNodeRecordMapper, + final ConfigurationValueRecordMapper configurationValueRecordMapper) { + + this.configurationRecordMapper = configurationRecordMapper; + this.configurationNodeRecordMapper = configurationNodeRecordMapper; + this.configurationValueRecordMapper = configurationValueRecordMapper; + } + + @Override + public EntityType entityType() { + return EntityType.CONFIGURATION_NODE; + } + + @Override + @Transactional(readOnly = true) + public Result byPK(final Long id) { + return recordById(id) + .flatMap(ConfigurationNodeDAOImpl::toDomainModel); + } + + @Override + @Transactional(readOnly = true) + public Result> allOf(final Set pks) { + return Result.tryCatch(() -> { + return this.configurationNodeRecordMapper.selectByExample() + .where(ConfigurationNodeRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) + .build() + .execute() + .stream() + .map(ConfigurationNodeDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .collect(Collectors.toList()); + }); + } + + @Override + public Result> all(final Long institutionId, final Boolean active) { + return Result.tryCatch(() -> { + ; + + final List records = (active != null) + ? this.configurationNodeRecordMapper.selectByExample() + .where( + ConfigurationNodeRecordDynamicSqlSupport.institutionId, + isEqualToWhenPresent(institutionId)) + .and( + ConfigurationNodeRecordDynamicSqlSupport.active, + isEqualToWhenPresent(BooleanUtils.toIntegerObject(active))) + .build() + .execute() + : this.configurationNodeRecordMapper.selectByExample() + .build() + .execute(); + + return records.stream() + .map(ConfigurationNodeDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .collect(Collectors.toList()); + }); + } + + @Override + @Transactional(readOnly = true) + public Result> allMatching( + final FilterMap filterMap, + final Predicate predicate) { + + return Result.tryCatch(() -> this.configurationNodeRecordMapper + .selectByExample() + .where( + ConfigurationNodeRecordDynamicSqlSupport.active, + SqlBuilder.isEqualToWhenPresent(filterMap.getActiveAsInt())) + .and( + ConfigurationNodeRecordDynamicSqlSupport.institutionId, + SqlBuilder.isEqualToWhenPresent(filterMap.getInstitutionId())) + .and( + ConfigurationNodeRecordDynamicSqlSupport.name, + SqlBuilder.isEqualToWhenPresent(filterMap.getName())) + .and( + ConfigurationNodeRecordDynamicSqlSupport.description, + SqlBuilder.isEqualToWhenPresent(filterMap.getConfigNodeDesc())) + .and( + ConfigurationNodeRecordDynamicSqlSupport.type, + SqlBuilder.isEqualToWhenPresent(filterMap.getConfigNodeType())) + .and( + ConfigurationNodeRecordDynamicSqlSupport.template, + SqlBuilder.isEqualToWhenPresent(filterMap.getConfigNodeTemplate())) + .build() + .execute() + .stream() + .map(ConfigurationNodeDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .filter(predicate) + .collect(Collectors.toList())); + } + + @Override + @Transactional(readOnly = true) + public Set getDependencies(final BulkAction bulkAction) { + // define the select function in case of source type + final Function>> selectionFunction = + (bulkAction.sourceType == EntityType.INSTITUTION) + ? this::allIdsOfInstitution + : key -> Result.of(Collections.emptyList()); // else : empty select function + + return getDependencies(bulkAction, selectionFunction); + } + + @Override + @Transactional(readOnly = true) + public boolean isActive(final String modelId) { + if (StringUtils.isBlank(modelId)) { + return false; + } + + return this.configurationNodeRecordMapper.countByExample() + .where( + ConfigurationNodeRecordDynamicSqlSupport.id, + isEqualTo(Long.valueOf(modelId))) + .and( + ConfigurationNodeRecordDynamicSqlSupport.active, + isEqualTo(BooleanUtils.toInteger(true))) + .build() + .execute() + .longValue() > 0; + } + + @Override + @Transactional + public Result createNew(final ConfigurationNode data) { + return Result.tryCatch(() -> { + + final Long count = this.configurationNodeRecordMapper.countByExample() + .where( + ConfigurationNodeRecordDynamicSqlSupport.name, + isEqualTo(data.name)) + .and( + ConfigurationNodeRecordDynamicSqlSupport.institutionId, + SqlBuilder.isEqualTo(data.institutionId)) + .build() + .execute(); + + if (count != null && count.longValue() > 0) { + throw new FieldValidationException("name", "configurationNode:name:exists"); + } + + final ConfigurationNodeRecord newRecord = new ConfigurationNodeRecord( + null, + data.institutionId, + data.owner, + data.name, + data.description, + data.type.name(), + data.templateName, + BooleanUtils.toInteger(false)); + + this.configurationNodeRecordMapper.insert(newRecord); + return newRecord; + }) + .flatMap(ConfigurationNodeDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result save(final ConfigurationNode data) { + return Result.tryCatch(() -> { + + final Long count = this.configurationNodeRecordMapper.countByExample() + .where( + ConfigurationNodeRecordDynamicSqlSupport.name, + isEqualTo(data.name)) + .and( + ConfigurationNodeRecordDynamicSqlSupport.id, + isNotEqualTo(data.id)) + .and( + ConfigurationNodeRecordDynamicSqlSupport.institutionId, + isNotEqualTo(data.institutionId)) + .build() + .execute(); + + if (count != null && count.longValue() > 0) { + throw new FieldValidationException("name", "configurationNode:name:exists"); + } + + final ConfigurationNodeRecord newRecord = new ConfigurationNodeRecord( + data.id, + null, + null, + data.name, + data.description, + null, + null, + BooleanUtils.toInteger(data.active)); + + this.configurationNodeRecordMapper.updateByPrimaryKeySelective(newRecord); + return this.configurationNodeRecordMapper.selectByPrimaryKey(data.id); + }) + .flatMap(ConfigurationNodeDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result> delete(final Set all) { + return Result.tryCatch(() -> { + + final List ids = extractListOfPKs(all); + + // find all configurations for this configuration node + final List configurationIds = this.configurationRecordMapper.selectIdsByExample() + .where(ConfigurationRecordDynamicSqlSupport.configurationNodeId, isIn(ids)) + .build() + .execute(); + + // delete all ConfigurationValue's that belongs to the Configuration's to delete + this.configurationValueRecordMapper.deleteByExample() + .where(ConfigurationValueRecordDynamicSqlSupport.configurationId, isIn(configurationIds)) + .build() + .execute(); + + // delete all Configuration's + this.configurationRecordMapper.deleteByExample() + .where(ConfigurationRecordDynamicSqlSupport.id, isIn(configurationIds)) + .build() + .execute(); + + // and finally delete the requested ConfigurationNode's + this.configurationNodeRecordMapper.deleteByExample() + .where(ConfigurationNodeRecordDynamicSqlSupport.id, isIn(ids)) + .build() + .execute(); + + return ids.stream() + .map(id -> new EntityKey(id, EntityType.CONFIGURATION_NODE)) + .collect(Collectors.toList()); + }); + } + + @Override + @Transactional + public Result> setActive(final Set all, final boolean active) { + return Result.tryCatch(() -> { + + final List ids = extractListOfPKs(all); + final ConfigurationNodeRecord record = new ConfigurationNodeRecord( + null, null, null, null, null, null, null, BooleanUtils.toInteger(active)); + + this.configurationNodeRecordMapper.updateByExampleSelective(record) + .where(ConfigurationNodeRecordDynamicSqlSupport.id, isIn(ids)) + .build() + .execute(); + + return ids.stream() + .map(id -> new EntityKey(id, EntityType.CONFIGURATION_NODE)) + .collect(Collectors.toList()); + }); + } + + private Result> allIdsOfInstitution(final EntityKey institutionKey) { + return Result.tryCatch(() -> { + return this.configurationNodeRecordMapper.selectIdsByExample() + .where( + ConfigurationNodeRecordDynamicSqlSupport.institutionId, + isEqualTo(Long.valueOf(institutionKey.modelId))) + .build() + .execute() + .stream() + .map(id -> new EntityKey(id, EntityType.CONFIGURATION_NODE)) + .collect(Collectors.toList()); + }); + } + + private Result recordById(final Long id) { + return Result.tryCatch(() -> { + final ConfigurationNodeRecord record = this.configurationNodeRecordMapper + .selectByPrimaryKey(id); + if (record == null) { + throw new ResourceNotFoundException( + EntityType.CONFIGURATION_NODE, + String.valueOf(id)); + } + return record; + }); + } + + private static Result toDomainModel(final ConfigurationNodeRecord record) { + return Result.tryCatch(() -> new ConfigurationNode( + record.getId(), + record.getInstitutionId(), + record.getName(), + record.getDescription(), + ConfigurationType.valueOf(record.getType()), + record.getTemplate(), + record.getOwner(), + BooleanUtils.toBooleanObject(record.getActive()))); + } + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationValueDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationValueDAOImpl.java new file mode 100644 index 00000000..da7cac1c --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationValueDAOImpl.java @@ -0,0 +1,376 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; + +import static org.mybatis.dynamic.sql.SqlBuilder.isEqualTo; +import static org.mybatis.dynamic.sql.SqlBuilder.isIn; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.mybatis.dynamic.sql.SqlBuilder; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import ch.ethz.seb.sebserver.gbl.api.EntityType; +import ch.ethz.seb.sebserver.gbl.model.EntityKey; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.AttributeType; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.AttributeValueType; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationTableValue; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue; +import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; +import ch.ethz.seb.sebserver.gbl.util.Result; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationAttributeRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationAttributeRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationValueRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationValueRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ConfigurationAttributeRecord; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ConfigurationRecord; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ConfigurationValueRecord; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ConfigurationValueDAO; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.DAOLoggingSupport; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.FilterMap; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ResourceNotFoundException; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.TransactionHandler; + +@Lazy +@Component +@WebServiceProfile +public class ConfigurationValueDAOImpl implements ConfigurationValueDAO { + + private final ConfigurationValueRecordMapper configurationValueRecordMapper; + private final ConfigurationAttributeRecordMapper configurationAttributeRecordMapper; + private final ConfigurationRecordMapper configurationRecordMapper; + + protected ConfigurationValueDAOImpl( + final ConfigurationValueRecordMapper configurationValueRecordMapper, + final ConfigurationAttributeRecordMapper configurationAttributeRecordMapper, + final ConfigurationRecordMapper configurationRecordMapper) { + + this.configurationValueRecordMapper = configurationValueRecordMapper; + this.configurationAttributeRecordMapper = configurationAttributeRecordMapper; + this.configurationRecordMapper = configurationRecordMapper; + } + + @Override + public EntityType entityType() { + return EntityType.CONFIGURATION_VALUE; + } + + @Override + @Transactional(readOnly = true) + public Result byPK(final Long id) { + return recordById(id) + .flatMap(ConfigurationValueDAOImpl::toDomainModel); + } + + @Override + @Transactional(readOnly = true) + public Result> allMatching( + final FilterMap filterMap, + final Predicate predicate) { + + return Result.tryCatch(() -> this.configurationValueRecordMapper + .selectByExample() + .where( + ConfigurationValueRecordDynamicSqlSupport.institutionId, + SqlBuilder.isEqualToWhenPresent(filterMap.getInstitutionId())) + .and( + ConfigurationValueRecordDynamicSqlSupport.configurationId, + SqlBuilder.isEqualToWhenPresent(filterMap.getConfigValueConfigId())) + .and( + ConfigurationValueRecordDynamicSqlSupport.configurationAttributeId, + SqlBuilder.isEqualToWhenPresent(filterMap.getConfigValueAttributeId())) + .build() + .execute() + .stream() + .map(ConfigurationValueDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .filter(predicate) + .collect(Collectors.toList())); + } + + @Override + @Transactional(readOnly = true) + public Result> allOf(final Set pks) { + return Result.tryCatch(() -> { + return this.configurationValueRecordMapper.selectByExample() + .where(ConfigurationValueRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) + .build() + .execute() + .stream() + .map(ConfigurationValueDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .collect(Collectors.toList()); + }); + } + + @Override + @Transactional + public Result createNew(final ConfigurationValue data) { + return checkInstitutionalIntegrity(data) + .flatMap(v -> attributeRecordById(v.attributeId)) + .map(attributeRecord -> { + final String value = (data.value != null) + ? data.value + : attributeRecord.getDefaultValue(); + final boolean bigValue = isBigValue(attributeRecord); + final ConfigurationValueRecord newRecord = new ConfigurationValueRecord( + null, + data.institutionId, + data.configurationId, + data.attributeId, + data.listIndex, + (bigValue) ? null : value, + (bigValue) ? value : null); + + this.configurationValueRecordMapper.insert(newRecord); + return newRecord; + }) + .flatMap(ConfigurationValueDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result save(final ConfigurationValue data) { + return attributeRecordById(data.attributeId) + .map(attributeRecord -> { + final boolean bigValue = isBigValue(attributeRecord); + final ConfigurationValueRecord newRecord = new ConfigurationValueRecord( + data.id, + null, + null, + null, + data.listIndex, + (bigValue) ? null : data.value, + (bigValue) ? data.value : null); + + this.configurationValueRecordMapper.updateByPrimaryKeySelective(newRecord); + return this.configurationValueRecordMapper.selectByPrimaryKey(data.id); + }) + .flatMap(ConfigurationValueDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result> delete(final Set all) { + return Result.tryCatch(() -> { + + final List ids = extractListOfPKs(all); + + this.configurationValueRecordMapper.deleteByExample() + .where(ConfigurationValueRecordDynamicSqlSupport.id, isIn(ids)) + .build() + .execute(); + + return ids.stream() + .map(id -> new EntityKey(id, EntityType.CONFIGURATION_VALUE)) + .collect(Collectors.toList()); + }); + } + + @Override + @Transactional(readOnly = true) + public Result getTableValue( + final Long institutionId, + final Long attributeId, + final Long configurationId) { + + return attributeRecordById(attributeId) + .map(attributeRecord -> { + + // get all attributes of the table (columns) + final List columnAttributes = + this.configurationAttributeRecordMapper.selectByExample() + .where( + ConfigurationAttributeRecordDynamicSqlSupport.parentId, + isEqualTo(attributeRecord.getId())) + .build() + .execute(); + + final List columnAttributeIds = columnAttributes.stream() + .map(a -> a.getId()) + .collect(Collectors.toList()); + + // get all values of the table and group them by attribute and sorted by list/row index + final List valueRecords = + this.configurationValueRecordMapper.selectByExample() + .where( + ConfigurationValueRecordDynamicSqlSupport.institutionId, + isEqualTo(institutionId)) + .and( + ConfigurationValueRecordDynamicSqlSupport.configurationId, + isEqualTo(configurationId)) + .and( + ConfigurationValueRecordDynamicSqlSupport.configurationAttributeId, + SqlBuilder.isIn(columnAttributeIds)) + .build() + .execute(); + + int rows = 0; + final List values = new ArrayList<>(); + final Map> valueMapping = new LinkedHashMap<>(); + for (final ConfigurationValueRecord valueRecord : valueRecords) { + final List list = valueMapping.putIfAbsent( + valueRecord.getId(), + new ArrayList<>()); + list.add(valueRecord); + list.sort((r1, r2) -> r1.getListIndex().compareTo(r2.getListIndex())); + rows = list.size(); + } + + for (int row = 0; row < rows; row++) { + for (final ConfigurationAttributeRecord aRecord : columnAttributes) { + final List list = valueMapping.get(aRecord.getId()); + if (list != null) { + final ConfigurationValueRecord valueRecord = list.get(row); + if (valueRecord != null) { + values.add((isBigValue(aRecord)) ? valueRecord.getText() : valueRecord.getValue()); + continue; + } + } + + values.add(null); + } + } + + return new ConfigurationTableValue( + institutionId, + configurationId, + attributeId, + new ArrayList<>(valueMapping.keySet()), + values); + }); + + } + + @Override + @Transactional + public Result saveTableValue(final ConfigurationTableValue value) { + return attributeRecordById(value.attributeId) + .map(attributeRecord -> { + final List columnAttributes = + this.configurationAttributeRecordMapper.selectByExample() + .where( + ConfigurationAttributeRecordDynamicSqlSupport.parentId, + isEqualTo(attributeRecord.getId())) + .build() + .execute(); + + final List columnAttributeIds = columnAttributes.stream() + .map(a -> a.getId()) + .collect(Collectors.toList()); + final int columns = columnAttributeIds.size(); + + // first delete all old values of this table + this.configurationValueRecordMapper.deleteByExample() + .where( + ConfigurationValueRecordDynamicSqlSupport.configurationId, + isEqualTo(value.configurationId)) + .and( + ConfigurationValueRecordDynamicSqlSupport.configurationAttributeId, + SqlBuilder.isIn(columnAttributeIds)) + .build() + .execute(); + + // then add the new values + int columnIndex = 0; + int rowIndex = 0; + for (final String val : value.values) { + final ConfigurationAttributeRecord columnAttr = columnAttributes.get(columnIndex); + final boolean bigValue = isBigValue(columnAttr); + final ConfigurationValueRecord valueRecord = new ConfigurationValueRecord( + null, + value.institutionId, + value.configurationId, + columnAttr.getId(), + rowIndex, + (bigValue) ? null : val, + (bigValue) ? val : null); + + this.configurationValueRecordMapper.insert(valueRecord); + + columnIndex++; + if (columnIndex >= columns) { + columnIndex = 0; + rowIndex++; + } + } + + return value; + }); + } + + private Result attributeRecordById(final Long id) { + return Result.tryCatch(() -> { + final ConfigurationAttributeRecord record = this.configurationAttributeRecordMapper + .selectByPrimaryKey(id); + if (record == null) { + throw new ResourceNotFoundException( + EntityType.CONFIGURATION_ATTRIBUTE, + String.valueOf(id)); + } + return record; + }); + } + + private Result recordById(final Long id) { + return Result.tryCatch(() -> { + final ConfigurationValueRecord record = this.configurationValueRecordMapper + .selectByPrimaryKey(id); + if (record == null) { + throw new ResourceNotFoundException( + EntityType.CONFIGURATION_VALUE, + String.valueOf(id)); + } + return record; + }); + } + + private static Result toDomainModel(final ConfigurationValueRecord record) { + return Result.tryCatch(() -> new ConfigurationValue( + record.getId(), + record.getInstitutionId(), + record.getConfigurationId(), + record.getConfigurationAttributeId(), + record.getListIndex(), + record.getValue())); + } + + private static boolean isBigValue(final ConfigurationAttributeRecord attributeRecord) { + try { + final AttributeType type = AttributeType.valueOf(attributeRecord.getType()); + return type.attributeValueType == AttributeValueType.LARGE_TEXT + || type.attributeValueType == AttributeValueType.BASE64_BINARY; + } catch (final Exception e) { + return false; + } + } + + private Result checkInstitutionalIntegrity(final ConfigurationValue data) { + return Result.tryCatch(() -> { + final ConfigurationRecord r = this.configurationRecordMapper.selectByPrimaryKey(data.configurationId); + if (r.getInstitutionId().longValue() != data.institutionId.longValue()) { + throw new IllegalArgumentException("Institutional integrity constraint violation"); + } + return data; + }); + } + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationDAOImpl.java new file mode 100644 index 00000000..a7e5dc22 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationDAOImpl.java @@ -0,0 +1,319 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; + +import static org.mybatis.dynamic.sql.SqlBuilder.*; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.mybatis.dynamic.sql.SqlBuilder; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import ch.ethz.seb.sebserver.gbl.api.API.BulkActionType; +import ch.ethz.seb.sebserver.gbl.api.EntityType; +import ch.ethz.seb.sebserver.gbl.model.EntityKey; +import ch.ethz.seb.sebserver.gbl.model.sebconfig.ExamConfiguration; +import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; +import ch.ethz.seb.sebserver.gbl.util.Result; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ConfigurationNodeRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ExamConfigurationMapRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ExamConfigurationMapRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ExamRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ExamRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ConfigurationNodeRecord; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ExamConfigurationMapRecord; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ExamRecord; +import ch.ethz.seb.sebserver.webservice.servicelayer.bulkaction.BulkAction; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.DAOLoggingSupport; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ExamConfigurationDAO; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.FilterMap; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ResourceNotFoundException; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.TransactionHandler; + +@Lazy +@Component +@WebServiceProfile +public class ExamConfigurationDAOImpl implements ExamConfigurationDAO { + + private final ExamRecordMapper examRecordMapper; + private final ExamConfigurationMapRecordMapper examConfigurationMapRecordMapper; + private final ConfigurationNodeRecordMapper configurationNodeRecordMapper; + + protected ExamConfigurationDAOImpl( + final ExamRecordMapper examRecordMapper, + final ExamConfigurationMapRecordMapper examConfigurationMapRecordMapper, + final ConfigurationNodeRecordMapper configurationNodeRecordMapper) { + + this.examRecordMapper = examRecordMapper; + this.examConfigurationMapRecordMapper = examConfigurationMapRecordMapper; + this.configurationNodeRecordMapper = configurationNodeRecordMapper; + } + + @Override + public EntityType entityType() { + return EntityType.EXAM_CONFIGURATION_MAP; + } + + @Override + @Transactional(readOnly = true) + public Result byPK(final Long id) { + return recordById(id) + .flatMap(ExamConfigurationDAOImpl::toDomainModel); + } + + @Override + @Transactional(readOnly = true) + public Result> allOf(final Set pks) { + return Result.tryCatch(() -> { + return this.examConfigurationMapRecordMapper.selectByExample() + .where(ExamConfigurationMapRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) + .build() + .execute() + .stream() + .map(ExamConfigurationDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .collect(Collectors.toList()); + }); + } + + @Override + @Transactional(readOnly = true) + public Result> allMatching( + final FilterMap filterMap, + final Predicate predicate) { + + return Result.tryCatch(() -> this.examConfigurationMapRecordMapper + .selectByExample() + .where( + ExamConfigurationMapRecordDynamicSqlSupport.institutionId, + SqlBuilder.isEqualToWhenPresent(filterMap.getInstitutionId())) + .and( + ExamConfigurationMapRecordDynamicSqlSupport.examId, + SqlBuilder.isEqualToWhenPresent(filterMap.getExamConfigExamId())) + .and( + ExamConfigurationMapRecordDynamicSqlSupport.configurationNodeId, + SqlBuilder.isEqualToWhenPresent(filterMap.getExamConfigConfigId())) + .build() + .execute() + .stream() + .map(ExamConfigurationDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .filter(predicate) + .collect(Collectors.toList())); + } + + @Override + @Transactional + public Result createNew(final ExamConfiguration data) { + return checkMappingIntegrity(data) + .map(config -> { + final ExamConfigurationMapRecord newRecord = new ExamConfigurationMapRecord( + null, + data.institutionId, + data.examId, + data.configurationNodeId, + data.userNames); + + this.examConfigurationMapRecordMapper.insert(newRecord); + return newRecord; + }) + .flatMap(ExamConfigurationDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result save(final ExamConfiguration data) { + return Result.tryCatch(() -> { + + final ExamConfigurationMapRecord newRecord = new ExamConfigurationMapRecord( + data.id, + null, + null, + null, + data.userNames); + + this.examConfigurationMapRecordMapper.updateByPrimaryKeySelective(newRecord); + return this.examConfigurationMapRecordMapper.selectByPrimaryKey(data.id); + }) + .flatMap(ExamConfigurationDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result> delete(final Set all) { + return Result.tryCatch(() -> { + + final List ids = extractListOfPKs(all); + + this.examConfigurationMapRecordMapper.deleteByExample() + .where(ExamConfigurationMapRecordDynamicSqlSupport.id, isIn(ids)) + .build() + .execute(); + + return ids.stream() + .map(id -> new EntityKey(id, EntityType.EXAM_CONFIGURATION_MAP)) + .collect(Collectors.toList()); + }); + } + + @Override + @Transactional(readOnly = true) + public Set getDependencies(final BulkAction bulkAction) { + if (bulkAction.type == BulkActionType.ACTIVATE || bulkAction.type == BulkActionType.DEACTIVATE) { + return Collections.emptySet(); + } + + // define the select function in case of source type + Function>> selectionFunction; + switch (bulkAction.sourceType) { + case INSTITUTION: + selectionFunction = this::allIdsOfInstitution; + break; + case LMS_SETUP: + selectionFunction = this::allIdsOfLmsSetup; + break; + case EXAM: + selectionFunction = this::allIdsOfExam; + break; + case CONFIGURATION_NODE: + selectionFunction = this::allIdsOfConfig; + break; + default: + selectionFunction = key -> Result.of(Collections.emptyList()); //empty select function + } + + return getDependencies(bulkAction, selectionFunction); + } + + private Result recordById(final Long id) { + return Result.tryCatch(() -> { + final ExamConfigurationMapRecord record = this.examConfigurationMapRecordMapper + .selectByPrimaryKey(id); + if (record == null) { + throw new ResourceNotFoundException( + EntityType.EXAM_CONFIGURATION_MAP, + String.valueOf(id)); + } + return record; + }); + } + + private static Result toDomainModel(final ExamConfigurationMapRecord record) { + return Result.tryCatch(() -> new ExamConfiguration( + record.getId(), + record.getInstitutionId(), + record.getExamId(), + record.getConfigurationNodeId(), + record.getUserNames())); + } + + private Result checkMappingIntegrity(final ExamConfiguration data) { + return Result.tryCatch(() -> { + final ConfigurationNodeRecord config = + this.configurationNodeRecordMapper.selectByPrimaryKey(data.configurationNodeId); + + if (config == null) { + throw new ResourceNotFoundException( + EntityType.CONFIGURATION_NODE, + String.valueOf(data.configurationNodeId)); + } + + if (config.getInstitutionId().longValue() != data.institutionId.longValue()) { + throw new IllegalArgumentException("Institutional integrity constraint violation"); + } + + final ExamRecord exam = this.examRecordMapper.selectByPrimaryKey(data.examId); + + if (exam == null) { + throw new ResourceNotFoundException( + EntityType.EXAM, + String.valueOf(data.configurationNodeId)); + } + + if (exam.getInstitutionId().longValue() != data.institutionId.longValue()) { + throw new IllegalArgumentException("Institutional integrity constraint violation"); + } + + return data; + }); + } + + private Result> allIdsOfInstitution(final EntityKey institutionKey) { + return Result.tryCatch(() -> { + return this.examConfigurationMapRecordMapper.selectIdsByExample() + .where( + ExamConfigurationMapRecordDynamicSqlSupport.institutionId, + isEqualTo(Long.valueOf(institutionKey.modelId))) + .build() + .execute() + .stream() + .map(id -> new EntityKey(id, EntityType.EXAM_CONFIGURATION_MAP)) + .collect(Collectors.toList()); + }); + } + + private Result> allIdsOfLmsSetup(final EntityKey lmsSetupKey) { + return Result.tryCatch(() -> { + return this.examConfigurationMapRecordMapper.selectIdsByExample() + .leftJoin(ExamRecordDynamicSqlSupport.examRecord) + .on( + ExamRecordDynamicSqlSupport.id, + equalTo(ExamConfigurationMapRecordDynamicSqlSupport.examId)) + + .where( + ExamRecordDynamicSqlSupport.lmsSetupId, + isEqualTo(Long.valueOf(lmsSetupKey.modelId))) + .build() + .execute() + .stream() + .map(id -> new EntityKey(id, EntityType.EXAM_CONFIGURATION_MAP)) + .collect(Collectors.toList()); + }); + } + + private Result> allIdsOfExam(final EntityKey examKey) { + return Result.tryCatch(() -> { + return this.examConfigurationMapRecordMapper.selectIdsByExample() + .where( + ExamConfigurationMapRecordDynamicSqlSupport.examId, + isEqualTo(Long.valueOf(examKey.modelId))) + .build() + .execute() + .stream() + .map(id -> new EntityKey(id, EntityType.EXAM_CONFIGURATION_MAP)) + .collect(Collectors.toList()); + }); + } + + private Result> allIdsOfConfig(final EntityKey configKey) { + return Result.tryCatch(() -> { + return this.examConfigurationMapRecordMapper.selectIdsByExample() + .where( + ExamConfigurationMapRecordDynamicSqlSupport.configurationNodeId, + isEqualTo(Long.valueOf(configKey.modelId))) + .build() + .execute() + .stream() + .map(id -> new EntityKey(id, EntityType.EXAM_CONFIGURATION_MAP)) + .collect(Collectors.toList()); + }); + } + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java index a93dd9a5..e35cf35d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java @@ -10,6 +10,7 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; import static org.mybatis.dynamic.sql.SqlBuilder.*; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -218,7 +219,7 @@ public class ExamDAOImpl implements ExamDAO { public Result> setActive(final Set all, final boolean active) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); final ExamRecord examRecord = new ExamRecord(null, null, null, null, null, null, null, null, BooleanUtils.toInteger(active)); @@ -254,7 +255,7 @@ public class ExamDAOImpl implements ExamDAO { public Result> delete(final Set all) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); this.examRecordMapper.deleteByExample() .where(ExamRecordDynamicSqlSupport.id, isIn(ids)) @@ -271,24 +272,29 @@ public class ExamDAOImpl implements ExamDAO { @Override @Transactional(readOnly = true) public Set getDependencies(final BulkAction bulkAction) { + // define the select function in case of source type - final Function>> selectionFunction = - (bulkAction.sourceType == EntityType.INSTITUTION) - ? this::allIdsOfInstitution - : (bulkAction.sourceType == EntityType.LMS_SETUP) - ? this::allIdsOfLmsSetup - : key -> Result.of(Collections.emptyList()); // else : empty select function + Function>> selectionFunction; + switch (bulkAction.sourceType) { + case INSTITUTION: + selectionFunction = this::allIdsOfInstitution; + break; + case LMS_SETUP: + selectionFunction = this::allIdsOfLmsSetup; + break; + default: + selectionFunction = key -> Result.of(Collections.emptyList()); //empty select function + } return getDependencies(bulkAction, selectionFunction); } @Override @Transactional(readOnly = true) - public Result> byEntityKeys(final Set keys) { + public Result> allOf(final Set pks) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(keys); return this.examRecordMapper.selectByExample() - .where(ExamRecordDynamicSqlSupport.id, isIn(ids)) + .where(ExamRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) .build() .execute(); }).flatMap(this::toDomainModel); @@ -302,7 +308,7 @@ public class ExamDAOImpl implements ExamDAO { .build() .execute() .stream() - .map(id -> new EntityKey(id, EntityType.LMS_SETUP)) + .map(id -> new EntityKey(id, EntityType.EXAM)) .collect(Collectors.toList()); }); } @@ -315,7 +321,7 @@ public class ExamDAOImpl implements ExamDAO { .build() .execute() .stream() - .map(id -> new EntityKey(id, EntityType.LMS_SETUP)) + .map(id -> new EntityKey(id, EntityType.EXAM)) .collect(Collectors.toList()); }); } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/IndicatorDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/IndicatorDAOImpl.java index 66badb44..49adbb64 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/IndicatorDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/IndicatorDAOImpl.java @@ -11,13 +11,14 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; import static org.mybatis.dynamic.sql.SqlBuilder.*; import java.math.BigDecimal; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Set; +import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; -import java.util.stream.Stream; import org.mybatis.dynamic.sql.SqlBuilder; import org.springframework.context.annotation.Lazy; @@ -84,7 +85,7 @@ public class IndicatorDAOImpl implements IndicatorDAO { public Result> allMatching(final FilterMap filterMap, final Predicate predicate) { return Result.tryCatch(() -> { return this.indicatorRecordMapper.selectByExample() - .join(ExamRecordDynamicSqlSupport.examRecord) + .leftJoin(ExamRecordDynamicSqlSupport.examRecord) .on( ExamRecordDynamicSqlSupport.id, SqlBuilder.equalTo(IndicatorRecordDynamicSqlSupport.examId)) @@ -109,12 +110,10 @@ public class IndicatorDAOImpl implements IndicatorDAO { @Override @Transactional(readOnly = true) - public Result> byEntityKeys(final Set keys) { + public Result> allOf(final Set pks) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(keys); - return this.indicatorRecordMapper.selectByExample() - .where(IndicatorRecordDynamicSqlSupport.id, isIn(ids)) + .where(IndicatorRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) .build() .execute() .stream() @@ -194,7 +193,7 @@ public class IndicatorDAOImpl implements IndicatorDAO { public Result> delete(final Set all) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); // first delete all thresholds of indicators this.thresholdRecordMapper.deleteByExample() @@ -236,23 +235,73 @@ public class IndicatorDAOImpl implements IndicatorDAO { return Collections.emptySet(); } - final Set examEntities = (bulkAction.sourceType == EntityType.EXAM) - ? bulkAction.sources - : bulkAction.extractKeys(EntityType.EXAM); + // define the select function in case of source type + Function>> selectionFunction; + switch (bulkAction.sourceType) { + case INSTITUTION: + selectionFunction = this::allIdsOfInstitution; + break; + case LMS_SETUP: + selectionFunction = this::allIdsOfLmsSetup; + break; + case EXAM: + selectionFunction = this::allIdsOfExam; + break; + default: + selectionFunction = key -> Result.of(Collections.emptyList()); //empty select function + } - return examEntities - .stream() - .flatMap(this::getDependencies) - .collect(Collectors.toSet()); + return getDependencies(bulkAction, selectionFunction); } - private Stream getDependencies(final EntityKey examKey) { - return this.indicatorRecordMapper.selectIdsByExample() - .where(IndicatorRecordDynamicSqlSupport.examId, isEqualTo(Long.valueOf(examKey.modelId))) - .build() - .execute() - .stream() - .map(pk -> new EntityKey(String.valueOf(pk), EntityType.INDICATOR)); + private Result> allIdsOfInstitution(final EntityKey institutionKey) { + return Result.tryCatch(() -> { + return this.indicatorRecordMapper.selectIdsByExample() + .leftJoin(ExamRecordDynamicSqlSupport.examRecord) + .on( + ExamRecordDynamicSqlSupport.id, + equalTo(IndicatorRecordDynamicSqlSupport.examId)) + .where( + ExamRecordDynamicSqlSupport.institutionId, + isEqualTo(Long.parseLong(institutionKey.modelId))) + .build() + .execute() + .stream() + .map(id -> new EntityKey(id, EntityType.EXAM)) + .collect(Collectors.toList()); + }); + } + + private Result> allIdsOfLmsSetup(final EntityKey lmsSetupKey) { + return Result.tryCatch(() -> { + return this.indicatorRecordMapper.selectIdsByExample() + .leftJoin(ExamRecordDynamicSqlSupport.examRecord) + .on( + ExamRecordDynamicSqlSupport.id, + equalTo(IndicatorRecordDynamicSqlSupport.examId)) + .where( + ExamRecordDynamicSqlSupport.lmsSetupId, + isEqualTo(Long.parseLong(lmsSetupKey.modelId))) + .build() + .execute() + .stream() + .map(id -> new EntityKey(id, EntityType.EXAM)) + .collect(Collectors.toList()); + }); + } + + private Result> allIdsOfExam(final EntityKey examKey) { + return Result.tryCatch(() -> { + return this.indicatorRecordMapper.selectIdsByExample() + .where( + IndicatorRecordDynamicSqlSupport.examId, + isEqualTo(Long.parseLong(examKey.modelId))) + .build() + .execute() + .stream() + .map(id -> new EntityKey(id, EntityType.EXAM)) + .collect(Collectors.toList()); + }); } private Result recordById(final Long id) { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/InstitutionDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/InstitutionDAOImpl.java index b7665aa9..6801171a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/InstitutionDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/InstitutionDAOImpl.java @@ -10,6 +10,7 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; import static org.mybatis.dynamic.sql.SqlBuilder.*; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -178,7 +179,7 @@ public class InstitutionDAOImpl implements InstitutionDAO { public Result> setActive(final Set all, final boolean active) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); final InstitutionRecord institutionRecord = new InstitutionRecord( null, null, null, null, BooleanUtils.toInteger(active), null); @@ -213,7 +214,7 @@ public class InstitutionDAOImpl implements InstitutionDAO { public Result> delete(final Set all) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); this.institutionRecordMapper.deleteByExample() .where(InstitutionRecordDynamicSqlSupport.id, isIn(ids)) @@ -235,12 +236,10 @@ public class InstitutionDAOImpl implements InstitutionDAO { @Override @Transactional(readOnly = true) - public Result> byEntityKeys(final Set keys) { + public Result> allOf(final Set pks) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(keys); - return this.institutionRecordMapper.selectByExample() - .where(InstitutionRecordDynamicSqlSupport.id, isIn(ids)) + .where(InstitutionRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) .build() .execute() .stream() diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/LmsSetupDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/LmsSetupDAOImpl.java index 1e5a5439..250a2c79 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/LmsSetupDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/LmsSetupDAOImpl.java @@ -10,6 +10,7 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; import static org.mybatis.dynamic.sql.SqlBuilder.*; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -190,7 +191,7 @@ public class LmsSetupDAOImpl implements LmsSetupDAO { public Result> setActive(final Set all, final boolean active) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); final LmsSetupRecord lmsSetupRecord = new LmsSetupRecord( null, null, null, null, null, null, null, null, BooleanUtils.toIntegerObject(active)); @@ -226,7 +227,7 @@ public class LmsSetupDAOImpl implements LmsSetupDAO { public Result> delete(final Set all) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); this.lmsSetupRecordMapper.deleteByExample() .where(LmsSetupRecordDynamicSqlSupport.id, isIn(ids)) @@ -252,12 +253,10 @@ public class LmsSetupDAOImpl implements LmsSetupDAO { @Override @Transactional(readOnly = true) - public Result> byEntityKeys(final Set keys) { + public Result> allOf(final Set pks) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(keys); - return this.lmsSetupRecordMapper.selectByExample() - .where(LmsSetupRecordDynamicSqlSupport.id, isIn(ids)) + .where(LmsSetupRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) .build() .execute() .stream() diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/OrientationDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/OrientationDAOImpl.java index ac0969d8..4c2e7013 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/OrientationDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/OrientationDAOImpl.java @@ -11,6 +11,7 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; import static org.mybatis.dynamic.sql.SqlBuilder.isEqualTo; import static org.mybatis.dynamic.sql.SqlBuilder.isIn; +import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Set; @@ -62,12 +63,10 @@ public class OrientationDAOImpl implements OrientationDAO { @Override @Transactional(readOnly = true) - public Result> byEntityKeys(final Set keys) { + public Result> allOf(final Set pks) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(keys); - return this.orientationRecordMapper.selectByExample() - .where(OrientationRecordDynamicSqlSupport.id, isIn(ids)) + .where(OrientationRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) .build() .execute() .stream() @@ -154,7 +153,7 @@ public class OrientationDAOImpl implements OrientationDAO { public Result> delete(final Set all) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); this.orientationRecordMapper.deleteByExample() .where(OrientationRecordDynamicSqlSupport.id, isIn(ids)) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/SebClientConfigDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/SebClientConfigDAOImpl.java index 1f9a2b8d..79aff5ca 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/SebClientConfigDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/SebClientConfigDAOImpl.java @@ -10,6 +10,7 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; import static org.mybatis.dynamic.sql.SqlBuilder.*; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -146,7 +147,7 @@ public class SebClientConfigDAOImpl implements SebClientConfigDAO { public Result> setActive(final Set all, final boolean active) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); final SebClientConfigRecord record = new SebClientConfigRecord( null, null, null, null, null, null, BooleanUtils.toIntegerObject(active)); @@ -210,7 +211,7 @@ public class SebClientConfigDAOImpl implements SebClientConfigDAO { public Result> delete(final Set all) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); this.sebClientConfigRecordMapper.deleteByExample() .where(SebClientConfigRecordDynamicSqlSupport.id, isIn(ids)) @@ -225,12 +226,11 @@ public class SebClientConfigDAOImpl implements SebClientConfigDAO { @Override @Transactional(readOnly = true) - public Result> byEntityKeys(final Set keys) { + public Result> allOf(final Set pks) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(keys); return this.sebClientConfigRecordMapper.selectByExample() - .where(SebClientConfigRecordDynamicSqlSupport.id, isIn(ids)) + .where(SebClientConfigRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) .build() .execute() .stream() diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/UserActivityLogDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/UserActivityLogDAOImpl.java index 1eb49a98..378efa83 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/UserActivityLogDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/UserActivityLogDAOImpl.java @@ -10,6 +10,7 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; import static org.mybatis.dynamic.sql.SqlBuilder.isIn; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; @@ -216,7 +217,7 @@ public class UserActivityLogDAOImpl implements UserActivityLogDAO { public Result> delete(final Set all) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); this.userLogRecordMapper.deleteByExample() .where(UserActivityLogRecordDynamicSqlSupport.id, isIn(ids)) @@ -319,9 +320,17 @@ public class UserActivityLogDAOImpl implements UserActivityLogDAO { @Override @Transactional(readOnly = true) - public Result> byEntityKeys(final Set keys) { - // TODO Auto-generated method stub - return Result.ofTODO(); + public Result> allOf(final Set pks) { + return Result.tryCatch(() -> { + return this.userLogRecordMapper.selectByExample() + .where(UserActivityLogRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) + .build() + .execute() + .stream() + .map(UserActivityLogDAOImpl::toDomainModel) + .flatMap(DAOLoggingSupport::logUnexpectedErrorAndSkip) + .collect(Collectors.toList()); + }); } @Override diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/UserDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/UserDAOImpl.java index 3b579fc3..2c78b80b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/UserDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/UserDAOImpl.java @@ -10,8 +10,10 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; import static org.mybatis.dynamic.sql.SqlBuilder.*; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Set; @@ -279,7 +281,7 @@ public class UserDAOImpl implements UserDAO { public Result> setActive(final Set all, final boolean active) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); final UserRecord userRecord = new UserRecord( null, null, null, null, null, null, null, null, null, BooleanUtils.toIntegerObject(active)); @@ -315,7 +317,7 @@ public class UserDAOImpl implements UserDAO { public Result> delete(final Set all) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(all); + final List ids = extractListOfPKs(all); this.userRecordMapper.deleteByExample() .where(UserRecordDynamicSqlSupport.id, isIn(ids)) @@ -352,12 +354,10 @@ public class UserDAOImpl implements UserDAO { @Override @Transactional(readOnly = true) - public Result> byEntityKeys(final Set keys) { + public Result> allOf(final Set pks) { return Result.tryCatch(() -> { - final List ids = extractPKsFromKeys(keys); - return this.userRecordMapper.selectByExample() - .where(InstitutionRecordDynamicSqlSupport.id, isIn(ids)) + .where(InstitutionRecordDynamicSqlSupport.id, isIn(new ArrayList<>(pks))) .build() .execute() .stream() @@ -368,24 +368,23 @@ public class UserDAOImpl implements UserDAO { } @Override - public List extractPKsFromKeys(final Collection keys) { + public Set extractPKsFromKeys(final Collection keys) { if (keys == null || keys.isEmpty() || keys.iterator().next().entityType != EntityType.USER) { return UserDAO.super.extractPKsFromKeys(keys); } else { - final List uuids = keys.stream() - .map(key -> key.modelId) - .collect(Collectors.toList()); - try { + final List uuids = keys.stream() + .map(key -> key.modelId) + .collect(Collectors.toList()); - return this.userRecordMapper.selectIdsByExample() + return new HashSet<>(this.userRecordMapper.selectIdsByExample() .where(UserRecordDynamicSqlSupport.uuid, isIn(uuids)) .build() - .execute(); + .execute()); } catch (final Exception e) { log.error("Unexpected error: ", e); - return Collections.emptyList(); + return Collections.emptySet(); } } } diff --git a/src/main/resources/schema-demo.sql b/src/main/resources/schema-demo.sql index 9c83344d..1498e791 100644 --- a/src/main/resources/schema-demo.sql +++ b/src/main/resources/schema-demo.sql @@ -1,4 +1,3 @@ - -- ----------------------------------------------------- -- Schema SEBServer -- ----------------------------------------------------- @@ -6,6 +5,7 @@ -- ----------------------------------------------------- -- Table `institution` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `institution` ; CREATE TABLE IF NOT EXISTS `institution` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -22,6 +22,7 @@ CREATE TABLE IF NOT EXISTS `institution` ( -- ----------------------------------------------------- -- Table `lms_setup` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `lms_setup` ; CREATE TABLE IF NOT EXISTS `lms_setup` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -46,6 +47,7 @@ CREATE TABLE IF NOT EXISTS `lms_setup` ( -- ----------------------------------------------------- -- Table `exam` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `exam` ; CREATE TABLE IF NOT EXISTS `exam` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -76,6 +78,7 @@ CREATE TABLE IF NOT EXISTS `exam` ( -- ----------------------------------------------------- -- Table `client_connection` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `client_connection` ; CREATE TABLE IF NOT EXISTS `client_connection` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -99,6 +102,7 @@ CREATE TABLE IF NOT EXISTS `client_connection` ( -- ----------------------------------------------------- -- Table `client_event` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `client_event` ; CREATE TABLE IF NOT EXISTS `client_event` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -121,6 +125,7 @@ CREATE TABLE IF NOT EXISTS `client_event` ( -- ----------------------------------------------------- -- Table `indicator` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `indicator` ; CREATE TABLE IF NOT EXISTS `indicator` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -141,6 +146,7 @@ CREATE TABLE IF NOT EXISTS `indicator` ( -- ----------------------------------------------------- -- Table `configuration_node` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `configuration_node` ; CREATE TABLE IF NOT EXISTS `configuration_node` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -164,18 +170,20 @@ CREATE TABLE IF NOT EXISTS `configuration_node` ( -- ----------------------------------------------------- -- Table `configuration` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `configuration` ; CREATE TABLE IF NOT EXISTS `configuration` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `institution_id` BIGINT UNSIGNED NOT NULL, `configuration_node_id` BIGINT UNSIGNED NOT NULL, `version` VARCHAR(255) NULL, `version_date` DATETIME NULL, `followup` INT(1) NOT NULL, PRIMARY KEY (`id`), - INDEX `configurationNodeRef_idx` (`configuration_node_id` ASC), + INDEX `configurationNodeRef_idx` (`configuration_node_id` ASC, `institution_id` ASC), CONSTRAINT `configurationNodeRef` - FOREIGN KEY (`configuration_node_id`) - REFERENCES `configuration_node` (`id`) + FOREIGN KEY (`configuration_node_id` , `institution_id`) + REFERENCES `configuration_node` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ; @@ -184,6 +192,7 @@ CREATE TABLE IF NOT EXISTS `configuration` ( -- ----------------------------------------------------- -- Table `configuration_attribute` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `configuration_attribute` ; CREATE TABLE IF NOT EXISTS `configuration_attribute` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -207,20 +216,22 @@ CREATE TABLE IF NOT EXISTS `configuration_attribute` ( -- ----------------------------------------------------- -- Table `configuration_value` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `configuration_value` ; CREATE TABLE IF NOT EXISTS `configuration_value` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `institution_id` BIGINT UNSIGNED NOT NULL, `configuration_id` BIGINT UNSIGNED NOT NULL, `configuration_attribute_id` BIGINT UNSIGNED NOT NULL, `list_index` INT NOT NULL DEFAULT 0, `value` VARCHAR(255) NULL, `text` MEDIUMTEXT NULL, PRIMARY KEY (`id`), - INDEX `configuration_value_ref_idx` (`configuration_id` ASC), + INDEX `configuration_value_ref_idx` (`configuration_id` ASC, `institution_id` ASC), INDEX `configuration_attribute_ref_idx` (`configuration_attribute_id` ASC), CONSTRAINT `configuration_ref` - FOREIGN KEY (`configuration_id`) - REFERENCES `configuration` (`id`) + FOREIGN KEY (`configuration_id` , `institution_id`) + REFERENCES `configuration` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `configuration_value_attribute_ref` @@ -234,6 +245,7 @@ CREATE TABLE IF NOT EXISTS `configuration_value` ( -- ----------------------------------------------------- -- Table `orientation` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `orientation` ; CREATE TABLE IF NOT EXISTS `orientation` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -258,23 +270,25 @@ CREATE TABLE IF NOT EXISTS `orientation` ( -- ----------------------------------------------------- -- Table `exam_configuration_map` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `exam_configuration_map` ; CREATE TABLE IF NOT EXISTS `exam_configuration_map` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `institution_id` BIGINT UNSIGNED NOT NULL, `exam_id` BIGINT UNSIGNED NOT NULL, `configuration_node_id` BIGINT UNSIGNED NOT NULL, `user_names` VARCHAR(4000) NULL, PRIMARY KEY (`id`), - INDEX `exam_ref_idx` (`exam_id` ASC), - INDEX `configuration_map_ref_idx` (`configuration_node_id` ASC), + INDEX `exam_ref_idx` (`exam_id` ASC, `institution_id` ASC), + INDEX `configuration_map_ref_idx` (`configuration_node_id` ASC, `institution_id` ASC), CONSTRAINT `exam_map_ref` - FOREIGN KEY (`exam_id`) - REFERENCES `exam` (`id`) + FOREIGN KEY (`exam_id` , `institution_id`) + REFERENCES `exam` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `configuration_map_ref` - FOREIGN KEY (`configuration_node_id`) - REFERENCES `configuration_node` (`id`) + FOREIGN KEY (`configuration_node_id` , `institution_id`) + REFERENCES `configuration_node` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ; @@ -283,6 +297,7 @@ CREATE TABLE IF NOT EXISTS `exam_configuration_map` ( -- ----------------------------------------------------- -- Table `user` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `user` ; CREATE TABLE IF NOT EXISTS `user` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -308,6 +323,7 @@ CREATE TABLE IF NOT EXISTS `user` ( -- ----------------------------------------------------- -- Table `user_role` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `user_role` ; CREATE TABLE IF NOT EXISTS `user_role` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -326,6 +342,7 @@ CREATE TABLE IF NOT EXISTS `user_role` ( -- ----------------------------------------------------- -- Table `oauth_access_token` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `oauth_access_token` ; CREATE TABLE IF NOT EXISTS `oauth_access_token` ( `token_id` VARCHAR(255) NULL, @@ -341,6 +358,7 @@ CREATE TABLE IF NOT EXISTS `oauth_access_token` ( -- ----------------------------------------------------- -- Table `oauth_refresh_token` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `oauth_refresh_token` ; CREATE TABLE IF NOT EXISTS `oauth_refresh_token` ( `token_id` VARCHAR(255) NULL, @@ -352,6 +370,7 @@ CREATE TABLE IF NOT EXISTS `oauth_refresh_token` ( -- ----------------------------------------------------- -- Table `threshold` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `threshold` ; CREATE TABLE IF NOT EXISTS `threshold` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -371,6 +390,7 @@ CREATE TABLE IF NOT EXISTS `threshold` ( -- ----------------------------------------------------- -- Table `user_activity_log` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `user_activity_log` ; CREATE TABLE IF NOT EXISTS `user_activity_log` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, @@ -387,6 +407,7 @@ CREATE TABLE IF NOT EXISTS `user_activity_log` ( -- ----------------------------------------------------- -- Table `additional_attributes` -- ----------------------------------------------------- +DROP TABLE IF EXISTS `additional_attributes` ; CREATE TABLE IF NOT EXISTS `additional_attributes` ( `id` BIGINT UNSIGNED NOT NULL, @@ -420,3 +441,15 @@ CREATE TABLE IF NOT EXISTS `seb_client_configuration` ( ON UPDATE NO ACTION) ; + +-- ----------------------------------------------------- +-- Table `webservice_server_info` +-- ----------------------------------------------------- +DROP TABLE IF EXISTS `webservice_server_info` ; + +CREATE TABLE IF NOT EXISTS `webservice_server_info` ( + `id` BIGINT UNSIGNED NOT NULL, + `uuid` VARCHAR(255) NOT NULL, + `service_address` VARCHAR(255) NOT NULL, + PRIMARY KEY (`id`)) +; \ No newline at end of file diff --git a/src/main/resources/schema-dev.sql b/src/main/resources/schema-dev.sql index 0ab3cf91..d4b0ace9 100644 --- a/src/main/resources/schema-dev.sql +++ b/src/main/resources/schema-dev.sql @@ -3,13 +3,10 @@ SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; - -- ----------------------------------------------------- -- Schema SEBServer -- ----------------------------------------------------- - - -- ----------------------------------------------------- -- Table `institution` -- ----------------------------------------------------- @@ -182,15 +179,16 @@ DROP TABLE IF EXISTS `configuration` ; CREATE TABLE IF NOT EXISTS `configuration` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `institution_id` BIGINT UNSIGNED NOT NULL, `configuration_node_id` BIGINT UNSIGNED NOT NULL, `version` VARCHAR(255) NULL, `version_date` DATETIME NULL, `followup` INT(1) NOT NULL, PRIMARY KEY (`id`), - INDEX `configurationNodeRef_idx` (`configuration_node_id` ASC), + INDEX `configurationNodeRef_idx` (`configuration_node_id` ASC, `institution_id` ASC), CONSTRAINT `configurationNodeRef` - FOREIGN KEY (`configuration_node_id`) - REFERENCES `configuration_node` (`id`) + FOREIGN KEY (`configuration_node_id` , `institution_id`) + REFERENCES `configuration_node` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ; @@ -227,17 +225,18 @@ DROP TABLE IF EXISTS `configuration_value` ; CREATE TABLE IF NOT EXISTS `configuration_value` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `institution_id` BIGINT UNSIGNED NOT NULL, `configuration_id` BIGINT UNSIGNED NOT NULL, `configuration_attribute_id` BIGINT UNSIGNED NOT NULL, `list_index` INT NOT NULL DEFAULT 0, `value` VARCHAR(255) NULL, `text` MEDIUMTEXT NULL, PRIMARY KEY (`id`), - INDEX `configuration_value_ref_idx` (`configuration_id` ASC), + INDEX `configuration_value_ref_idx` (`configuration_id` ASC, `institution_id` ASC), INDEX `configuration_attribute_ref_idx` (`configuration_attribute_id` ASC), CONSTRAINT `configuration_ref` - FOREIGN KEY (`configuration_id`) - REFERENCES `configuration` (`id`) + FOREIGN KEY (`configuration_id` , `institution_id`) + REFERENCES `configuration` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `configuration_value_attribute_ref` @@ -280,20 +279,21 @@ DROP TABLE IF EXISTS `exam_configuration_map` ; CREATE TABLE IF NOT EXISTS `exam_configuration_map` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `institution_id` BIGINT UNSIGNED NOT NULL, `exam_id` BIGINT UNSIGNED NOT NULL, `configuration_node_id` BIGINT UNSIGNED NOT NULL, `user_names` VARCHAR(4000) NULL, PRIMARY KEY (`id`), - INDEX `exam_ref_idx` (`exam_id` ASC), - INDEX `configuration_map_ref_idx` (`configuration_node_id` ASC), + INDEX `exam_ref_idx` (`exam_id` ASC, `institution_id` ASC), + INDEX `configuration_map_ref_idx` (`configuration_node_id` ASC, `institution_id` ASC), CONSTRAINT `exam_map_ref` - FOREIGN KEY (`exam_id`) - REFERENCES `exam` (`id`) + FOREIGN KEY (`exam_id` , `institution_id`) + REFERENCES `exam` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `configuration_map_ref` - FOREIGN KEY (`configuration_node_id`) - REFERENCES `configuration_node` (`id`) + FOREIGN KEY (`configuration_node_id` , `institution_id`) + REFERENCES `configuration_node` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ; @@ -446,6 +446,20 @@ CREATE TABLE IF NOT EXISTS `seb_client_configuration` ( ON UPDATE NO ACTION) ; + +-- ----------------------------------------------------- +-- Table `webservice_server_info` +-- ----------------------------------------------------- +DROP TABLE IF EXISTS `webservice_server_info` ; + +CREATE TABLE IF NOT EXISTS `webservice_server_info` ( + `id` BIGINT UNSIGNED NOT NULL, + `uuid` VARCHAR(255) NOT NULL, + `service_address` VARCHAR(255) NOT NULL, + PRIMARY KEY (`id`)) +; + + SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; diff --git a/src/test/resources/schema-test.sql b/src/test/resources/schema-test.sql index 9815ffe4..1498e791 100644 --- a/src/test/resources/schema-test.sql +++ b/src/test/resources/schema-test.sql @@ -1,4 +1,3 @@ - -- ----------------------------------------------------- -- Schema SEBServer -- ----------------------------------------------------- @@ -133,7 +132,7 @@ CREATE TABLE IF NOT EXISTS `indicator` ( `exam_id` BIGINT UNSIGNED NOT NULL, `type` VARCHAR(45) NOT NULL, `name` VARCHAR(45) NOT NULL, - `color` VARCHAR(45) NOT NULL, + `color` VARCHAR(45) NULL, INDEX `indicator_exam_idx` (`exam_id` ASC), PRIMARY KEY (`id`), CONSTRAINT `exam_ref` @@ -175,15 +174,16 @@ DROP TABLE IF EXISTS `configuration` ; CREATE TABLE IF NOT EXISTS `configuration` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `institution_id` BIGINT UNSIGNED NOT NULL, `configuration_node_id` BIGINT UNSIGNED NOT NULL, `version` VARCHAR(255) NULL, `version_date` DATETIME NULL, `followup` INT(1) NOT NULL, PRIMARY KEY (`id`), - INDEX `configurationNodeRef_idx` (`configuration_node_id` ASC), + INDEX `configurationNodeRef_idx` (`configuration_node_id` ASC, `institution_id` ASC), CONSTRAINT `configurationNodeRef` - FOREIGN KEY (`configuration_node_id`) - REFERENCES `configuration_node` (`id`) + FOREIGN KEY (`configuration_node_id` , `institution_id`) + REFERENCES `configuration_node` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ; @@ -220,17 +220,18 @@ DROP TABLE IF EXISTS `configuration_value` ; CREATE TABLE IF NOT EXISTS `configuration_value` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `institution_id` BIGINT UNSIGNED NOT NULL, `configuration_id` BIGINT UNSIGNED NOT NULL, `configuration_attribute_id` BIGINT UNSIGNED NOT NULL, `list_index` INT NOT NULL DEFAULT 0, `value` VARCHAR(255) NULL, `text` MEDIUMTEXT NULL, PRIMARY KEY (`id`), - INDEX `configuration_value_ref_idx` (`configuration_id` ASC), + INDEX `configuration_value_ref_idx` (`configuration_id` ASC, `institution_id` ASC), INDEX `configuration_attribute_ref_idx` (`configuration_attribute_id` ASC), CONSTRAINT `configuration_ref` - FOREIGN KEY (`configuration_id`) - REFERENCES `configuration` (`id`) + FOREIGN KEY (`configuration_id` , `institution_id`) + REFERENCES `configuration` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `configuration_value_attribute_ref` @@ -273,20 +274,21 @@ DROP TABLE IF EXISTS `exam_configuration_map` ; CREATE TABLE IF NOT EXISTS `exam_configuration_map` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `institution_id` BIGINT UNSIGNED NOT NULL, `exam_id` BIGINT UNSIGNED NOT NULL, `configuration_node_id` BIGINT UNSIGNED NOT NULL, `user_names` VARCHAR(4000) NULL, PRIMARY KEY (`id`), - INDEX `exam_ref_idx` (`exam_id` ASC), - INDEX `configuration_map_ref_idx` (`configuration_node_id` ASC), + INDEX `exam_ref_idx` (`exam_id` ASC, `institution_id` ASC), + INDEX `configuration_map_ref_idx` (`configuration_node_id` ASC, `institution_id` ASC), CONSTRAINT `exam_map_ref` - FOREIGN KEY (`exam_id`) - REFERENCES `exam` (`id`) + FOREIGN KEY (`exam_id` , `institution_id`) + REFERENCES `exam` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `configuration_map_ref` - FOREIGN KEY (`configuration_node_id`) - REFERENCES `configuration_node` (`id`) + FOREIGN KEY (`configuration_node_id` , `institution_id`) + REFERENCES `configuration_node` (`id` , `institution_id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ; @@ -374,7 +376,7 @@ CREATE TABLE IF NOT EXISTS `threshold` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, `indicator_id` BIGINT UNSIGNED NOT NULL, `value` DECIMAL(10,4) NOT NULL, - `color` VARCHAR(45) NOT NULL, + `color` VARCHAR(45) NULL, PRIMARY KEY (`id`), INDEX `indicator_threshold_id_idx` (`indicator_id` ASC), CONSTRAINT `indicator_threshold_id` @@ -416,6 +418,7 @@ CREATE TABLE IF NOT EXISTS `additional_attributes` ( PRIMARY KEY (`id`)) ; + -- ----------------------------------------------------- -- Table `seb_client_configuration` -- ----------------------------------------------------- @@ -438,3 +441,15 @@ CREATE TABLE IF NOT EXISTS `seb_client_configuration` ( ON UPDATE NO ACTION) ; + +-- ----------------------------------------------------- +-- Table `webservice_server_info` +-- ----------------------------------------------------- +DROP TABLE IF EXISTS `webservice_server_info` ; + +CREATE TABLE IF NOT EXISTS `webservice_server_info` ( + `id` BIGINT UNSIGNED NOT NULL, + `uuid` VARCHAR(255) NOT NULL, + `service_address` VARCHAR(255) NOT NULL, + PRIMARY KEY (`id`)) +; \ No newline at end of file