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 7f9cc65d..de1569c9 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,13 +5,14 @@ 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="2018-12-17T11:52:41.615+01:00") +@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2018-12-19T13:27:34.810+01:00") public interface Domain { String ATTR_ID = "id"; interface CONFIGURATION_ATTRIBUTE { String TYPE_NAME = "ConfigurationAttribute"; String REFERENCE_NAME = "configurationAttributes"; + String ATTR_ID = "id"; String ATTR_NAME = "name"; String ATTR_TYPE = "type"; String ATTR_PARENT_ID = "parentId"; @@ -24,15 +25,18 @@ public interface Domain { interface CONFIGURATION_VALUE { String TYPE_NAME = "ConfigurationValue"; String REFERENCE_NAME = "configurationValues"; + String ATTR_ID = "id"; String ATTR_CONFIGURATION_ID = "configurationId"; String ATTR_CONFIGURATION_ATTRIBUTE_ID = "configurationAttributeId"; String ATTR_LIST_INDEX = "listIndex"; String ATTR_VALUE = "value"; + String ATTR_TEXT = "text"; } interface ORIENTATION { String TYPE_NAME = "Orientation"; String REFERENCE_NAME = "orientations"; + String ATTR_ID = "id"; String ATTR_CONFIG_ATTRIBUTE_ID = "configAttributeId"; String ATTR_TEMPLATE = "template"; String ATTR_VIEW = "view"; @@ -46,6 +50,7 @@ public interface Domain { interface CONFIGURATION { String TYPE_NAME = "Configuration"; String REFERENCE_NAME = "configurations"; + String ATTR_ID = "id"; String ATTR_CONFIGURATION_NODE_ID = "configurationNodeId"; String ATTR_VERSION = "version"; String ATTR_VERSION_DATE = "versionDate"; @@ -55,6 +60,7 @@ public interface Domain { interface CONFIGURATION_NODE { String TYPE_NAME = "ConfigurationNode"; String REFERENCE_NAME = "configurationNodes"; + String ATTR_ID = "id"; String ATTR_INSTITUTION_ID = "institutionId"; String ATTR_OWNER = "owner"; String ATTR_NAME = "name"; @@ -67,6 +73,7 @@ public interface Domain { interface EXAM_CONFIGURATION_MAP { String TYPE_NAME = "ExamConfigurationMap"; String REFERENCE_NAME = "examConfigurationMaps"; + String ATTR_ID = "id"; String ATTR_EXAM_ID = "examId"; String ATTR_CONFIGURATION_NODE_ID = "configurationNodeId"; String ATTR_USER_NAMES = "userNames"; @@ -75,6 +82,7 @@ public interface Domain { interface EXAM { String TYPE_NAME = "Exam"; String REFERENCE_NAME = "exams"; + String ATTR_ID = "id"; String ATTR_INSTITUTION_ID = "institutionId"; String ATTR_LMS_SETUP_ID = "lmsSetupId"; String ATTR_EXTERNAL_UUID = "externalUuid"; @@ -87,6 +95,7 @@ public interface Domain { interface CLIENT_CONNECTION { String TYPE_NAME = "ClientConnection"; String REFERENCE_NAME = "clientConnections"; + String ATTR_ID = "id"; String ATTR_EXAM_ID = "examId"; String ATTR_STATUS = "status"; String ATTR_CONNECTION_TOKEN = "connectionToken"; @@ -99,6 +108,7 @@ public interface Domain { interface CLIENT_EVENT { String TYPE_NAME = "ClientEvent"; String REFERENCE_NAME = "clientEvents"; + String ATTR_ID = "id"; String ATTR_CONNECTION_ID = "connectionId"; String ATTR_USER_IDENTIFIER = "userIdentifier"; String ATTR_TYPE = "type"; @@ -110,6 +120,7 @@ public interface Domain { interface INDICATOR { String TYPE_NAME = "Indicator"; String REFERENCE_NAME = "indicators"; + String ATTR_ID = "id"; String ATTR_EXAM_ID = "examId"; String ATTR_TYPE = "type"; String ATTR_NAME = "name"; @@ -119,14 +130,17 @@ public interface Domain { interface INSTITUTION { String TYPE_NAME = "Institution"; String REFERENCE_NAME = "institutions"; + String ATTR_ID = "id"; String ATTR_NAME = "name"; - String ATTR_AUTHTYPE = "authtype"; + String ATTR_URL_SUFFIX = "urlSuffix"; String ATTR_ACTIVE = "active"; + String ATTR_LOGO_IMAGE = "logoImage"; } interface LMS_SETUP { String TYPE_NAME = "LmsSetup"; String REFERENCE_NAME = "lmsSetups"; + String ATTR_ID = "id"; String ATTR_INSTITUTION_ID = "institutionId"; String ATTR_NAME = "name"; String ATTR_LMS_TYPE = "lmsType"; @@ -142,6 +156,7 @@ public interface Domain { interface USER { String TYPE_NAME = "User"; String REFERENCE_NAME = "users"; + String ATTR_ID = "id"; String ATTR_INSTITUTION_ID = "institutionId"; String ATTR_UUID = "uuid"; String ATTR_NAME = "name"; @@ -156,6 +171,7 @@ public interface Domain { interface USER_ROLE { String TYPE_NAME = "UserRole"; String REFERENCE_NAME = "userRoles"; + String ATTR_ID = "id"; String ATTR_USER_ID = "userId"; String ATTR_ROLE_NAME = "roleName"; } @@ -163,6 +179,7 @@ public interface Domain { interface USER_ACTIVITY_LOG { String TYPE_NAME = "UserActivityLog"; String REFERENCE_NAME = "userActivityLogs"; + String ATTR_ID = "id"; String ATTR_USER_UUID = "userUuid"; String ATTR_TIMESTAMP = "timestamp"; String ATTR_ACTIVITY_TYPE = "activityType"; diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityId.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityId.java index 756de621..1e75650c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityId.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityId.java @@ -16,12 +16,12 @@ public class EntityId implements ModelIdAware { public final String id; @JsonCreator - public EntityId(@JsonProperty(value = "id", required = true) final String id) { + public EntityId(@JsonProperty(value = Domain.ATTR_ID, required = true) final String id) { this.id = id; } @Override - public String getId() { + public String getModelId() { return this.id; } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityIdAndName.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityIdAndName.java index 4e7e2bbd..61f8b180 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityIdAndName.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityIdAndName.java @@ -20,7 +20,7 @@ public class EntityIdAndName implements ModelIdAware, ModelNameAware { @JsonCreator public EntityIdAndName( - @JsonProperty(value = "id", required = true) final String id, + @JsonProperty(value = Domain.ATTR_ID, required = true) final String id, @JsonProperty(value = "name", required = true) final String name) { this.id = id; @@ -33,7 +33,7 @@ public class EntityIdAndName implements ModelIdAware, ModelNameAware { } @Override - public String getId() { + public String getModelId() { return this.id; } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityType.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityType.java index 8e48cb6d..4222c831 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityType.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/EntityType.java @@ -2,7 +2,7 @@ package ch.ethz.seb.sebserver.gbl.model; import javax.annotation.Generated; -@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2018-12-17T11:52:41.682+01:00") +@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2018-12-19T13:27:34.869+01:00") public enum EntityType { CONFIGURATION_ATTRIBUTE, CONFIGURATION_VALUE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/ModelIdAware.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/ModelIdAware.java index 3b0f628f..2c0b5168 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/ModelIdAware.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/ModelIdAware.java @@ -10,6 +10,6 @@ package ch.ethz.seb.sebserver.gbl.model; public interface ModelIdAware { - String getId(); + String getModelId(); } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/institution/CourseData.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/institution/CourseData.java new file mode 100644 index 00000000..ceca9d42 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/institution/CourseData.java @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2018 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.gbl.model.institution; + +import org.joda.time.DateTime; +import org.joda.time.DateTimeZone; +import org.joda.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import ch.ethz.seb.sebserver.gbl.Constants; +import ch.ethz.seb.sebserver.gbl.model.Domain; + +public final class CourseData { + + @JsonProperty(Domain.ATTR_ID) + public final String uuid; + + @JsonProperty("courseName") + public final String name; + + @JsonProperty("courseDescription") + public final String description; + + @JsonProperty("startTime") + public final DateTime startTime; + + @JsonProperty("endTime") + public final DateTime endTime; + + @JsonProperty("enrollmentURL") + public final String enrollmentURL; + + public CourseData( + final String uuid, + final String name, + final String description, + final DateTime startTime, + final DateTime endTime, + final String enrollmentURL) { + + this.uuid = uuid; + this.name = name; + this.description = description; + this.startTime = startTime; + this.endTime = endTime; + this.enrollmentURL = enrollmentURL; + } + + public CourseData( + final String uuid, + final String name, + final String description, + final String startTime, + final String endTime, + final String enrollmentURL) { + + this.uuid = uuid; + this.name = name; + this.description = description; + this.startTime = LocalDateTime + .parse(startTime, Constants.DATE_TIME_PATTERN_UTC_NO_MILLIS) + .toDateTime(DateTimeZone.UTC); + this.endTime = LocalDateTime + .parse(endTime, Constants.DATE_TIME_PATTERN_UTC_NO_MILLIS) + .toDateTime(DateTimeZone.UTC); + this.enrollmentURL = enrollmentURL; + } + + public String getUuid() { + return this.uuid; + } + + public String getName() { + return this.name; + } + + public String getDescription() { + return this.description; + } + + public DateTime getStartTime() { + return this.startTime; + } + + public DateTime getEndTime() { + return this.endTime; + } + + public String getEnrollmentURL() { + return this.enrollmentURL; + } + +// public ExamStatus getStatus() { +// if (this.startTime.isAfterNow()) { +// return ExamStatus.READY; +// } else if (this.startTime.isBeforeNow() && this.endTime.isAfterNow()) { +// return ExamStatus.RUNNING; +// } else { +// return ExamStatus.FINISHED; +// } +// } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((this.uuid == null) ? 0 : this.uuid.hashCode()); + return result; + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final CourseData other = (CourseData) obj; + if (this.uuid == null) { + if (other.uuid != null) + return false; + } else if (!this.uuid.equals(other.uuid)) + return false; + return true; + } + + @Override + public String toString() { + return "CourseData [uuid=" + this.uuid + ", name=" + this.name + ", description=" + this.description + + ", startTime=" + + this.startTime + ", endTime=" + this.endTime + ", enrollmentURL=" + this.enrollmentURL + "]"; + } + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/institution/Institution.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/institution/Institution.java index 7f55a6c1..e05f0637 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/institution/Institution.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/institution/Institution.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2018 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/. @@ -8,6 +8,102 @@ package ch.ethz.seb.sebserver.gbl.model.institution; -public class Institution { +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import ch.ethz.seb.sebserver.gbl.model.Activatable; +import ch.ethz.seb.sebserver.gbl.model.Domain; +import ch.ethz.seb.sebserver.gbl.model.Domain.INSTITUTION; +import ch.ethz.seb.sebserver.gbl.model.EntityType; +import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.GrantEntity; + +public final class Institution implements GrantEntity, Activatable { + + @JsonProperty(Domain.ATTR_ID) + public final Long id; + + @JsonProperty(INSTITUTION.ATTR_NAME) + @NotNull + @Size(min = 3, max = 255, message = "institution:name:size:{min}:{max}:${validatedValue}") + public final String name; + + @JsonProperty(INSTITUTION.ATTR_URL_SUFFIX) + @Size(min = 3, max = 255, message = "institution:urlSuffix:size:{min}:{max}:${validatedValue}") + public final String urlSuffix; + + @JsonProperty(INSTITUTION.ATTR_LOGO_IMAGE) + public final String logoImage; + + @JsonProperty(INSTITUTION.ATTR_ACTIVE) + public final Boolean active; + + public Institution( + @JsonProperty(Domain.ATTR_ID) final Long id, + @JsonProperty(INSTITUTION.ATTR_NAME) final String name, + @JsonProperty(INSTITUTION.ATTR_URL_SUFFIX) final String urlSuffix, + @JsonProperty(INSTITUTION.ATTR_LOGO_IMAGE) final String logoImage, + @JsonProperty(INSTITUTION.ATTR_ACTIVE) final Boolean active) { + + this.id = id; + this.name = name; + this.urlSuffix = urlSuffix; + this.logoImage = logoImage; + this.active = active; + } + + @Override + @JsonIgnore + public EntityType entityType() { + return EntityType.INSTITUTION; + } + + @Override + public String getModelId() { + return (this.id != null) + ? String.valueOf(this.id) + : null; + } + + @Override + @JsonIgnore + public boolean isActive() { + return this.active; + } + + @Override + public Long getInstitutionId() { + return this.id; + } + + @Override + public String getOwnerUUID() { + return null; + } + + public String getName() { + return this.name; + } + + public String getUrlSuffix() { + return this.urlSuffix; + } + + public String getLogoImage() { + return this.logoImage; + } + + public Boolean getActive() { + return this.active; + } + + @Override + public String toString() { + return "Institution [id=" + this.id + ", name=" + this.name + ", urlSuffix=" + this.urlSuffix + ", logoImage=" + + this.logoImage + + ", active=" + this.active + "]"; + } } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/institution/LmsSetup.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/institution/LmsSetup.java new file mode 100644 index 00000000..1152925c --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/institution/LmsSetup.java @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2018 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.gbl.model.institution; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import ch.ethz.seb.sebserver.gbl.model.Domain; +import ch.ethz.seb.sebserver.gbl.model.Domain.LMS_SETUP; +import ch.ethz.seb.sebserver.gbl.model.EntityType; +import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.GrantEntity; + +public final class LmsSetup implements GrantEntity { + + public enum LMSType { + MOCKUP, + MOODLE, + OPEN_EDX + } + + @JsonProperty(Domain.ATTR_ID) + public final Long id; + + @JsonProperty(LMS_SETUP.ATTR_INSTITUTION_ID) + @NotNull + public final Long institutionId; + + @JsonProperty(LMS_SETUP.ATTR_NAME) + @NotNull + @Size(min = 3, max = 255, message = "lmsSetup:name:size:{min}:{max}:${validatedValue}") + public final String name; + + @JsonProperty(LMS_SETUP.ATTR_LMS_TYPE) + @NotNull + public final LMSType lmsType; + + @JsonProperty(LMS_SETUP.ATTR_LMS_CLIENTNAME) + @Size(min = 3, max = 255, message = "lmsSetup:lmsAuthName:size:{min}:{max}:${validatedValue}") + public final String lmsAuthName; + + @JsonProperty(LMS_SETUP.ATTR_LMS_CLIENTSECRET) + @Size(min = 8, max = 255, message = "lmsSetup:lmsAuthSecret:size:{min}:{max}:${validatedValue}") + public final String lmsAuthSecret; + + @JsonProperty(LMS_SETUP.ATTR_LMS_URL) + @NotNull + public final String lmsApiUrl; + + @JsonProperty(LMS_SETUP.ATTR_LMS_REST_API_TOKEN) + public final String lmsRestApiToken; + + @JsonProperty(LMS_SETUP.ATTR_SEB_CLIENTNAME) + @Size(min = 3, max = 255, message = "lmsSetup:sebAuthName:size:{min}:{max}:${validatedValue}") + public final String sebAuthName; + + @JsonProperty(LMS_SETUP.ATTR_SEB_CLIENTSECRET) + @Size(min = 8, max = 255, message = "lmsSetup:sebAuthSecret:size:{min}:{max}:${validatedValue}") + public final String sebAuthSecret; + + @JsonCreator + public LmsSetup( + @JsonProperty(Domain.ATTR_ID) final Long id, + @JsonProperty(LMS_SETUP.ATTR_INSTITUTION_ID) final Long institutionId, + @JsonProperty(LMS_SETUP.ATTR_NAME) final String name, + @JsonProperty(LMS_SETUP.ATTR_LMS_TYPE) final LMSType lmsType, + @JsonProperty(LMS_SETUP.ATTR_LMS_CLIENTNAME) final String lmsAuthName, + @JsonProperty(LMS_SETUP.ATTR_LMS_CLIENTSECRET) final String lmsAuthSecret, + @JsonProperty(LMS_SETUP.ATTR_LMS_URL) final String lmsApiUrl, + @JsonProperty(LMS_SETUP.ATTR_LMS_REST_API_TOKEN) final String lmsRestApiToken, + @JsonProperty(LMS_SETUP.ATTR_SEB_CLIENTNAME) final String sebAuthName, + @JsonProperty(LMS_SETUP.ATTR_SEB_CLIENTSECRET) final String sebAuthSecret) { + + this.id = id; + this.institutionId = institutionId; + this.name = name; + this.lmsType = lmsType; + this.lmsAuthName = lmsAuthName; + this.lmsAuthSecret = lmsAuthSecret; + this.lmsApiUrl = lmsApiUrl; + this.lmsRestApiToken = lmsRestApiToken; + this.sebAuthName = sebAuthName; + this.sebAuthSecret = sebAuthSecret; + } + + @Override + public EntityType entityType() { + return EntityType.LMS_SETUP; + } + + @JsonIgnore + @Override + public String getOwnerUUID() { + return null; + } + + public Long getId() { + return this.id; + } + + @JsonIgnore + @Override + public String getModelId() { + return (this.id != null) + ? String.valueOf(this.id) + : null; + } + + @Override + public Long getInstitutionId() { + return this.institutionId; + } + + public String getName() { + return this.name; + } + + public LMSType getLmsType() { + return this.lmsType; + } + + public String getLmsAuthName() { + return this.lmsAuthName; + } + + public String getLmsAuthSecret() { + return this.lmsAuthSecret; + } + + public String getLmsApiUrl() { + return this.lmsApiUrl; + } + + public String getLmsRestApiToken() { + return this.lmsRestApiToken; + } + + public String getSebAuthName() { + return this.sebAuthName; + } + + public String getSebAuthSecret() { + return this.sebAuthSecret; + } + + @Override + public String toString() { + return "LmsSetup [id=" + this.id + ", institutionId=" + this.institutionId + ", name=" + this.name + + ", lmsType=" + this.lmsType + + ", lmsAuthName=" + this.lmsAuthName + ", lmsAuthSecret=" + this.lmsAuthSecret + ", lmsApiUrl=" + + this.lmsApiUrl + + ", lmsRestApiToken=" + this.lmsRestApiToken + ", sebAuthName=" + this.sebAuthName + ", sebAuthSecret=" + + this.sebAuthSecret + "]"; + } + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserActivityLog.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserActivityLog.java index d48ae52d..b08caca3 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserActivityLog.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserActivityLog.java @@ -12,7 +12,6 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import ch.ethz.seb.sebserver.gbl.model.Domain; import ch.ethz.seb.sebserver.gbl.model.Domain.USER_ACTIVITY_LOG; import ch.ethz.seb.sebserver.gbl.model.Entity; import ch.ethz.seb.sebserver.gbl.model.EntityType; @@ -20,7 +19,7 @@ import ch.ethz.seb.sebserver.webservice.servicelayer.dao.UserActivityLogDAO.Acti public class UserActivityLog implements Entity { - @JsonProperty(Domain.ATTR_ID) + @JsonIgnore public final Long id; @JsonProperty(USER_ACTIVITY_LOG.ATTR_USER_UUID) public final String userUUID; @@ -37,7 +36,6 @@ public class UserActivityLog implements Entity { @JsonCreator public UserActivityLog( - @JsonProperty(Domain.ATTR_ID) final Long id, @JsonProperty(USER_ACTIVITY_LOG.ATTR_USER_UUID) final String userUUID, @JsonProperty(USER_ACTIVITY_LOG.ATTR_TIMESTAMP) final Long timestamp, @JsonProperty(USER_ACTIVITY_LOG.ATTR_ACTIVITY_TYPE) final ActivityType activityType, @@ -45,6 +43,24 @@ public class UserActivityLog implements Entity { @JsonProperty(USER_ACTIVITY_LOG.ATTR_ENTITY_ID) final String entityId, @JsonProperty(USER_ACTIVITY_LOG.ATTR_MESSAGE) final String message) { + this.id = null; + this.userUUID = userUUID; + this.timestamp = timestamp; + this.activityType = activityType; + this.entityType = entityType; + this.entityId = entityId; + this.message = message; + } + + public UserActivityLog( + final Long id, + final String userUUID, + final Long timestamp, + final ActivityType activityType, + final EntityType entityType, + final String entityId, + final String message) { + this.id = id; this.userUUID = userUUID; this.timestamp = timestamp; @@ -61,8 +77,11 @@ public class UserActivityLog implements Entity { } @Override - public String getId() { - return (this.id != null) ? String.valueOf(this.id) : null; + @JsonIgnore + public String getModelId() { + return (this.id != null) + ? String.valueOf(this.id) + : null; } public String getUserUuid() { diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserInfo.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserInfo.java index 7267cef3..a5d7ea1b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserInfo.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserInfo.java @@ -105,7 +105,7 @@ public final class UserInfo implements GrantEntity, Activatable, Serializable { @JsonIgnore @Override - public String getId() { + public String getModelId() { return this.uuid; } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserMod.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserMod.java index 5ddb1a16..9b5c6f78 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserMod.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserMod.java @@ -123,7 +123,7 @@ public final class UserMod implements GrantEntity { @Override @JsonIgnore - public String getId() { + public String getModelId() { return this.uuid; } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserRole.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserRole.java index e30d3991..3f604713 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserRole.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/user/UserRole.java @@ -24,7 +24,7 @@ public enum UserRole implements Entity { } @Override - public String getId() { + public String getModelId() { return name(); } } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/util/Result.java b/src/main/java/ch/ethz/seb/sebserver/gbl/util/Result.java index 2632216d..c76cc63b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/util/Result.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/util/Result.java @@ -132,14 +132,6 @@ public final class Result { } } - public Stream stream() { - if (this.error != null) { - return Stream.empty(); - } else { - return Stream.of(this.value); - } - } - /** Use this to get the resulting value. In an error case, a given error handling * function is used that receives the error and returns a resulting value instead * (or throw some error instead) @@ -150,6 +142,13 @@ public final class Result { return this.error != null ? errorHandler.apply(this.error) : this.value; } + public Result onErrorDo(final Consumer block) { + if (this.error != null) { + block.accept(this.error); + } + return this; + } + /** Use this to get the resulting value if existing or throw an Runtime exception with * given message otherwise. * @@ -201,4 +200,19 @@ public final class Result { return ofError(new RuntimeException(message)); } + public static Result tryCatch(final Supplier supplier) { + try { + return Result.of(supplier.get()); + } catch (final Exception e) { + return Result.ofError(e); + } + } + + public static Stream skipWithError(final Result result) { + if (result.error != null) { + return Stream.empty(); + } else { + return Stream.of(result.value); + } + } } diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java b/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java index 0d75fc0a..9236d30a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java @@ -14,25 +14,26 @@ import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; +import java.util.stream.Collectors; public final class Utils { - /** Use this to extract a single element from a Collection. This also checks if there is only a single element - * within the Collection. - * - * @param collection the Collection to extract the single and only element - * @return The single element - * @throws IllegalArgumentException if the collection is null, or empty or has more then one element */ - public static Result getSingle(final Collection collection) { - if (collection == null || collection.isEmpty() || collection.size() > 1) { - return Result.ofError( - new IllegalArgumentException( - "Collection has no or more then one element. Expected is exaclty one. Size: " + - ((collection != null) ? collection.size() : "null"))); - } - - return Result.of(collection.iterator().next()); - } +// /** Use this to extract a single element from a Collection. This also checks if there is only a single element +// * within the Collection. +// * +// * @param collection the Collection to extract the single and only element +// * @return The single element +// * @throws IllegalArgumentException if the collection is null, or empty or has more then one element */ +// public static Result getSingle(final Collection collection) { +// if (collection == null || collection.isEmpty() || collection.size() > 1) { +// return Result.ofError( +// new IllegalArgumentException( +// "Collection has no or more then one element. Expected is exaclty one. Size: " + +// ((collection != null) ? collection.size() : "null"))); +// } +// +// return Result.of(collection.iterator().next()); +// } /** Use this to create an immutable Collection of specified type from varargs * @@ -64,4 +65,12 @@ public final class Utils { : Collections.emptyList(); } + public static > Collection> createSelectionResource(final Class enumClass) { + return Collections.unmodifiableCollection(Arrays.asList( + enumClass.getEnumConstants()) + .stream() + .map(e -> new Tuple<>(e.name(), e.name())) + .collect(Collectors.toList())); + } + } 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 07df1a11..c474a84b 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="2018-12-17T11:52:41.813+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source Table: client_connection") public static final ClientConnectionRecord clientConnectionRecord = new ClientConnectionRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.814+01:00", comments="Source field: client_connection.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source field: client_connection.id") public static final SqlColumn id = clientConnectionRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.814+01:00", comments="Source field: client_connection.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source field: client_connection.exam_id") public static final SqlColumn examId = clientConnectionRecord.examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.814+01:00", comments="Source field: client_connection.status") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source field: client_connection.status") public static final SqlColumn status = clientConnectionRecord.status; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.814+01:00", comments="Source field: client_connection.connection_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.960+01:00", comments="Source field: client_connection.connection_token") public static final SqlColumn connectionToken = clientConnectionRecord.connectionToken; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.814+01:00", comments="Source field: client_connection.user_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.960+01:00", comments="Source field: client_connection.user_name") public static final SqlColumn userName = clientConnectionRecord.userName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.814+01:00", comments="Source field: client_connection.vdi") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.960+01:00", comments="Source field: client_connection.vdi") public static final SqlColumn vdi = clientConnectionRecord.vdi; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.815+01:00", comments="Source field: client_connection.client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.960+01:00", comments="Source field: client_connection.client_address") public static final SqlColumn clientAddress = clientConnectionRecord.clientAddress; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.815+01:00", comments="Source field: client_connection.virtual_client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.960+01:00", comments="Source field: client_connection.virtual_client_address") public static final SqlColumn virtualClientAddress = clientConnectionRecord.virtualClientAddress; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.814+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01: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 f786ae23..cde6b8bb 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="2018-12-17T11:52:41.815+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.960+01:00", comments="Source Table: client_connection") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.815+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.960+01:00", comments="Source Table: client_connection") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.815+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.960+01: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="2018-12-17T11:52:41.815+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.960+01: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="2018-12-17T11:52:41.816+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01: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="2018-12-17T11:52:41.816+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01:00", comments="Source Table: client_connection") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.816+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01: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="2018-12-17T11:52:41.816+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01:00", comments="Source Table: client_connection") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, clientConnectionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.816+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01: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="2018-12-17T11:52:41.816+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01: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="2018-12-17T11:52:41.816+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01: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="2018-12-17T11:52:41.816+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01: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="2018-12-17T11:52:41.816+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01: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="2018-12-17T11:52:41.817+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01: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="2018-12-17T11:52:41.817+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01: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="2018-12-17T11:52:41.817+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.961+01: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="2018-12-17T11:52:41.817+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.962+01: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="2018-12-17T11:52:41.817+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.962+01: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 5495a365..2f784adf 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="2018-12-17T11:52:41.820+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source Table: client_event") public static final ClientEventRecord clientEventRecord = new ClientEventRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.821+01:00", comments="Source field: client_event.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.id") public static final SqlColumn id = clientEventRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.821+01:00", comments="Source field: client_event.connection_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01:00", comments="Source field: client_event.connection_id") public static final SqlColumn connectionId = clientEventRecord.connectionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.821+01:00", comments="Source field: client_event.user_identifier") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01:00", comments="Source field: client_event.user_identifier") public static final SqlColumn userIdentifier = clientEventRecord.userIdentifier; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.821+01:00", comments="Source field: client_event.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01:00", comments="Source field: client_event.type") public static final SqlColumn type = clientEventRecord.type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.821+01:00", comments="Source field: client_event.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01:00", comments="Source field: client_event.timestamp") public static final SqlColumn timestamp = clientEventRecord.timestamp; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.822+01:00", comments="Source field: client_event.numeric_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01:00", comments="Source field: client_event.numeric_value") public static final SqlColumn numericValue = clientEventRecord.numericValue; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.822+01:00", comments="Source field: client_event.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01:00", comments="Source field: client_event.text") public static final SqlColumn text = clientEventRecord.text; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.821+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01: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 a7c9bd43..fe7e04b5 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="2018-12-17T11:52:41.822+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01:00", comments="Source Table: client_event") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.822+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01:00", comments="Source Table: client_event") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.822+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01: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="2018-12-17T11:52:41.822+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01: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="2018-12-17T11:52:41.822+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01: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="2018-12-17T11:52:41.822+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01:00", comments="Source Table: client_event") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.823+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01: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="2018-12-17T11:52:41.823+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01:00", comments="Source Table: client_event") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, clientEventRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.823+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01: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="2018-12-17T11:52:41.823+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.964+01: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="2018-12-17T11:52:41.823+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.965+01: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="2018-12-17T11:52:41.823+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.965+01: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="2018-12-17T11:52:41.823+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.965+01: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="2018-12-17T11:52:41.824+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.965+01: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="2018-12-17T11:52:41.824+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.965+01: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="2018-12-17T11:52:41.825+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.965+01: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="2018-12-17T11:52:41.825+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.965+01: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="2018-12-17T11:52:41.825+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.965+01: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 75f360ae..00b30c67 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="2018-12-17T11:52:41.569+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.780+01:00", comments="Source Table: configuration_attribute") public static final ConfigurationAttributeRecord configurationAttributeRecord = new ConfigurationAttributeRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.572+01:00", comments="Source field: configuration_attribute.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.782+01:00", comments="Source field: configuration_attribute.id") public static final SqlColumn id = configurationAttributeRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.574+01:00", comments="Source field: configuration_attribute.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.783+01:00", comments="Source field: configuration_attribute.name") public static final SqlColumn name = configurationAttributeRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.575+01:00", comments="Source field: configuration_attribute.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.783+01:00", comments="Source field: configuration_attribute.type") public static final SqlColumn type = configurationAttributeRecord.type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.575+01:00", comments="Source field: configuration_attribute.parent_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.783+01:00", comments="Source field: configuration_attribute.parent_id") public static final SqlColumn parentId = configurationAttributeRecord.parentId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.575+01:00", comments="Source field: configuration_attribute.resources") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.784+01:00", comments="Source field: configuration_attribute.resources") public static final SqlColumn resources = configurationAttributeRecord.resources; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.575+01:00", comments="Source field: configuration_attribute.validator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.784+01:00", comments="Source field: configuration_attribute.validator") public static final SqlColumn validator = configurationAttributeRecord.validator; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.575+01:00", comments="Source field: configuration_attribute.dependencies") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.784+01:00", comments="Source field: configuration_attribute.dependencies") public static final SqlColumn dependencies = configurationAttributeRecord.dependencies; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.576+01:00", comments="Source field: configuration_attribute.default_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.784+01:00", comments="Source field: configuration_attribute.default_value") public static final SqlColumn defaultValue = configurationAttributeRecord.defaultValue; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.572+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.782+01: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 ce629a9c..5cfcd424 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="2018-12-17T11:52:41.577+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.785+01:00", comments="Source Table: configuration_attribute") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.579+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.786+01:00", comments="Source Table: configuration_attribute") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.580+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.787+01: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="2018-12-17T11:52:41.582+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.788+01: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="2018-12-17T11:52:41.583+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.789+01: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="2018-12-17T11:52:41.584+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.790+01:00", comments="Source Table: configuration_attribute") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.585+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.791+01: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="2018-12-17T11:52:41.586+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.791+01:00", comments="Source Table: configuration_attribute") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, configurationAttributeRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.587+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.792+01: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="2018-12-17T11:52:41.588+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.792+01: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="2018-12-17T11:52:41.590+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.793+01: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="2018-12-17T11:52:41.591+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.794+01: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="2018-12-17T11:52:41.594+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.795+01: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="2018-12-17T11:52:41.595+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.796+01: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="2018-12-17T11:52:41.596+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.797+01: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="2018-12-17T11:52:41.597+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.797+01: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="2018-12-17T11:52:41.599+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.798+01: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="2018-12-17T11:52:41.600+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.799+01: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 c82d2470..5d0429a1 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="2018-12-17T11:52:41.793+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.947+01:00", comments="Source Table: configuration_node") public static final ConfigurationNodeRecord configurationNodeRecord = new ConfigurationNodeRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.794+01:00", comments="Source field: configuration_node.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.947+01:00", comments="Source field: configuration_node.id") public static final SqlColumn id = configurationNodeRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.794+01:00", comments="Source field: configuration_node.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.947+01:00", comments="Source field: configuration_node.institution_id") public static final SqlColumn institutionId = configurationNodeRecord.institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.794+01:00", comments="Source field: configuration_node.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.947+01:00", comments="Source field: configuration_node.owner") public static final SqlColumn owner = configurationNodeRecord.owner; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.794+01:00", comments="Source field: configuration_node.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.947+01:00", comments="Source field: configuration_node.name") public static final SqlColumn name = configurationNodeRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.794+01:00", comments="Source field: configuration_node.description") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.947+01:00", comments="Source field: configuration_node.description") public static final SqlColumn description = configurationNodeRecord.description; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.795+01:00", comments="Source field: configuration_node.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.947+01:00", comments="Source field: configuration_node.type") public static final SqlColumn type = configurationNodeRecord.type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.795+01:00", comments="Source field: configuration_node.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01:00", comments="Source field: configuration_node.template") public static final SqlColumn template = configurationNodeRecord.template; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.795+01:00", comments="Source field: configuration_node.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01:00", comments="Source field: configuration_node.active") public static final SqlColumn active = configurationNodeRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.793+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.947+01: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 df81d723..bdb40a6e 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="2018-12-17T11:52:41.795+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01:00", comments="Source Table: configuration_node") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.795+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01:00", comments="Source Table: configuration_node") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.795+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01: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="2018-12-17T11:52:41.796+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01: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="2018-12-17T11:52:41.796+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01: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="2018-12-17T11:52:41.796+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01:00", comments="Source Table: configuration_node") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.796+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01: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="2018-12-17T11:52:41.796+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01:00", comments="Source Table: configuration_node") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, configurationNodeRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.796+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01: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="2018-12-17T11:52:41.796+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01: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="2018-12-17T11:52:41.796+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01: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="2018-12-17T11:52:41.797+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01: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="2018-12-17T11:52:41.797+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01: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="2018-12-17T11:52:41.797+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.948+01: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="2018-12-17T11:52:41.797+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.949+01: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="2018-12-17T11:52:41.797+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.949+01: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="2018-12-17T11:52:41.797+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.949+01: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="2018-12-17T11:52:41.797+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.949+01: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 9cf8fae0..ecd36d85 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,25 +7,25 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ConfigurationRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.786+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.941+01:00", comments="Source Table: configuration") public static final ConfigurationRecord configurationRecord = new ConfigurationRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.786+01:00", comments="Source field: configuration.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.941+01:00", comments="Source field: configuration.id") public static final SqlColumn id = configurationRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.786+01:00", comments="Source field: configuration.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.942+01:00", comments="Source field: configuration.configuration_node_id") public static final SqlColumn configurationNodeId = configurationRecord.configurationNodeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.786+01:00", comments="Source field: configuration.version") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.942+01:00", comments="Source field: configuration.version") public static final SqlColumn version = configurationRecord.version; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.787+01:00", comments="Source field: configuration.version_date") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.942+01:00", comments="Source field: configuration.version_date") public static final SqlColumn versionDate = configurationRecord.versionDate; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.787+01:00", comments="Source field: configuration.followup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.942+01:00", comments="Source field: configuration.followup") public static final SqlColumn followup = configurationRecord.followup; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.786+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.941+01:00", comments="Source Table: configuration") public static final class ConfigurationRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); 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 77a8bdb1..cc71834c 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,20 +34,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ConfigurationRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.787+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.942+01:00", comments="Source Table: configuration") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.787+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.942+01:00", comments="Source Table: configuration") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.787+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.942+01: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="2018-12-17T11:52:41.787+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.942+01:00", comments="Source Table: configuration") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -58,7 +58,7 @@ public interface ConfigurationRecordMapper { }) ConfigurationRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.787+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.942+01:00", comments="Source Table: configuration") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -69,22 +69,22 @@ public interface ConfigurationRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.788+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01:00", comments="Source Table: configuration") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.788+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01: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="2018-12-17T11:52:41.788+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01:00", comments="Source Table: configuration") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, configurationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.788+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01:00", comments="Source Table: configuration") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, configurationRecord) .where(id, isEqualTo(id_)) @@ -92,7 +92,7 @@ public interface ConfigurationRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.788+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01:00", comments="Source Table: configuration") default int insert(ConfigurationRecord record) { return insert(SqlBuilder.insert(record) .into(configurationRecord) @@ -104,7 +104,7 @@ public interface ConfigurationRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.788+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01:00", comments="Source Table: configuration") default int insertSelective(ConfigurationRecord record) { return insert(SqlBuilder.insert(record) .into(configurationRecord) @@ -116,19 +116,19 @@ public interface ConfigurationRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.788+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01:00", comments="Source Table: configuration") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, configurationNodeId, version, versionDate, followup) .from(configurationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.789+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01:00", comments="Source Table: configuration") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, configurationNodeId, version, versionDate, followup) .from(configurationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.789+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01:00", comments="Source Table: configuration") default ConfigurationRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, configurationNodeId, version, versionDate, followup) .from(configurationRecord) @@ -137,7 +137,7 @@ public interface ConfigurationRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.789+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01:00", comments="Source Table: configuration") default UpdateDSL> updateByExample(ConfigurationRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationRecord) .set(configurationNodeId).equalTo(record::getConfigurationNodeId) @@ -146,7 +146,7 @@ public interface ConfigurationRecordMapper { .set(followup).equalTo(record::getFollowup); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.789+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.943+01:00", comments="Source Table: configuration") default UpdateDSL> updateByExampleSelective(ConfigurationRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationRecord) .set(configurationNodeId).equalToWhenPresent(record::getConfigurationNodeId) @@ -155,7 +155,7 @@ public interface ConfigurationRecordMapper { .set(followup).equalToWhenPresent(record::getFollowup); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.789+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.944+01:00", comments="Source Table: configuration") default int updateByPrimaryKey(ConfigurationRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationRecord) .set(configurationNodeId).equalTo(record::getConfigurationNodeId) @@ -167,7 +167,7 @@ public interface ConfigurationRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.789+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.944+01:00", comments="Source Table: configuration") default int updateByPrimaryKeySelective(ConfigurationRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationRecord) .set(configurationNodeId).equalToWhenPresent(record::getConfigurationNodeId) 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 91ce6255..dc5c5552 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,28 +6,28 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ConfigurationValueRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.771+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.931+01:00", comments="Source Table: configuration_value") public static final ConfigurationValueRecord configurationValueRecord = new ConfigurationValueRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.771+01:00", comments="Source field: configuration_value.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.931+01:00", comments="Source field: configuration_value.id") public static final SqlColumn id = configurationValueRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.771+01:00", comments="Source field: configuration_value.configuration_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.931+01:00", comments="Source field: configuration_value.configuration_id") public static final SqlColumn configurationId = configurationValueRecord.configurationId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.771+01:00", comments="Source field: configuration_value.configuration_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.931+01:00", comments="Source field: configuration_value.configuration_attribute_id") public static final SqlColumn configurationAttributeId = configurationValueRecord.configurationAttributeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.772+01:00", comments="Source field: configuration_value.list_index") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.931+01:00", comments="Source field: configuration_value.list_index") public static final SqlColumn listIndex = configurationValueRecord.listIndex; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.772+01:00", comments="Source field: configuration_value.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.932+01:00", comments="Source field: configuration_value.value") public static final SqlColumn value = configurationValueRecord.value; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.772+01:00", comments="Source field: configuration_value.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.932+01:00", comments="Source field: configuration_value.text") public static final SqlColumn text = configurationValueRecord.text; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.771+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.931+01:00", comments="Source Table: configuration_value") public static final class ConfigurationValueRecord extends SqlTable { public final SqlColumn id = column("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 fccbd915..d762ecfa 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,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ConfigurationValueRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.772+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.932+01:00", comments="Source Table: configuration_value") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.772+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.932+01:00", comments="Source Table: configuration_value") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.772+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.932+01: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="2018-12-17T11:52:41.773+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.932+01:00", comments="Source Table: configuration_value") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -57,7 +57,7 @@ public interface ConfigurationValueRecordMapper { }) ConfigurationValueRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.773+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.932+01:00", comments="Source Table: configuration_value") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -69,22 +69,22 @@ public interface ConfigurationValueRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.773+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01:00", comments="Source Table: configuration_value") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.773+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01: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="2018-12-17T11:52:41.773+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01:00", comments="Source Table: configuration_value") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, configurationValueRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.773+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01:00", comments="Source Table: configuration_value") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, configurationValueRecord) .where(id, isEqualTo(id_)) @@ -92,7 +92,7 @@ public interface ConfigurationValueRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.774+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01:00", comments="Source Table: configuration_value") default int insert(ConfigurationValueRecord record) { return insert(SqlBuilder.insert(record) .into(configurationValueRecord) @@ -105,7 +105,7 @@ public interface ConfigurationValueRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.774+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01:00", comments="Source Table: configuration_value") default int insertSelective(ConfigurationValueRecord record) { return insert(SqlBuilder.insert(record) .into(configurationValueRecord) @@ -118,19 +118,19 @@ public interface ConfigurationValueRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.774+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01:00", comments="Source Table: configuration_value") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, configurationId, configurationAttributeId, listIndex, value, text) .from(configurationValueRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.774+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01:00", comments="Source Table: configuration_value") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, configurationId, configurationAttributeId, listIndex, value, text) .from(configurationValueRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.774+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01:00", comments="Source Table: configuration_value") default ConfigurationValueRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, configurationId, configurationAttributeId, listIndex, value, text) .from(configurationValueRecord) @@ -139,7 +139,7 @@ public interface ConfigurationValueRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.774+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01:00", comments="Source Table: configuration_value") default UpdateDSL> updateByExample(ConfigurationValueRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationValueRecord) .set(configurationId).equalTo(record::getConfigurationId) @@ -149,7 +149,7 @@ public interface ConfigurationValueRecordMapper { .set(text).equalTo(record::getText); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.775+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.933+01:00", comments="Source Table: configuration_value") default UpdateDSL> updateByExampleSelective(ConfigurationValueRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationValueRecord) .set(configurationId).equalToWhenPresent(record::getConfigurationId) @@ -159,7 +159,7 @@ public interface ConfigurationValueRecordMapper { .set(text).equalToWhenPresent(record::getText); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.775+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.934+01:00", comments="Source Table: configuration_value") default int updateByPrimaryKey(ConfigurationValueRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationValueRecord) .set(configurationId).equalTo(record::getConfigurationId) @@ -172,7 +172,7 @@ public interface ConfigurationValueRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.775+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.934+01:00", comments="Source Table: configuration_value") default int updateByPrimaryKeySelective(ConfigurationValueRecord record) { return UpdateDSL.updateWithMapper(this::update, configurationValueRecord) .set(configurationId).equalToWhenPresent(record::getConfigurationId) 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 8aebbc40..177ccfbb 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,22 +6,22 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ExamConfigurationMapRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.801+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source Table: exam_configuration_map") public static final ExamConfigurationMapRecord examConfigurationMapRecord = new ExamConfigurationMapRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.801+01:00", comments="Source field: exam_configuration_map.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source field: exam_configuration_map.id") public static final SqlColumn id = examConfigurationMapRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.801+01:00", comments="Source field: exam_configuration_map.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source field: exam_configuration_map.exam_id") public static final SqlColumn examId = examConfigurationMapRecord.examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.801+01:00", comments="Source field: exam_configuration_map.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01: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="2018-12-17T11:52:41.802+01:00", comments="Source field: exam_configuration_map.user_names") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source field: exam_configuration_map.user_names") public static final SqlColumn userNames = examConfigurationMapRecord.userNames; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.801+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source Table: exam_configuration_map") public static final class ExamConfigurationMapRecord extends SqlTable { public final SqlColumn id = column("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 49fe5da6..98e5394d 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,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface ExamConfigurationMapRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.802+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01: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="2018-12-17T11:52:41.802+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01: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="2018-12-17T11:52:41.802+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01: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="2018-12-17T11:52:41.802+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01: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), @@ -55,7 +55,7 @@ public interface ExamConfigurationMapRecordMapper { }) ExamConfigurationMapRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.802+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01: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), @@ -65,22 +65,22 @@ public interface ExamConfigurationMapRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.802+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01: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="2018-12-17T11:52:41.802+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01: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="2018-12-17T11:52:41.802+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, examConfigurationMapRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.802+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, examConfigurationMapRecord) .where(id, isEqualTo(id_)) @@ -88,7 +88,7 @@ public interface ExamConfigurationMapRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.802+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default int insert(ExamConfigurationMapRecord record) { return insert(SqlBuilder.insert(record) .into(examConfigurationMapRecord) @@ -99,7 +99,7 @@ public interface ExamConfigurationMapRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.803+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default int insertSelective(ExamConfigurationMapRecord record) { return insert(SqlBuilder.insert(record) .into(examConfigurationMapRecord) @@ -110,19 +110,19 @@ public interface ExamConfigurationMapRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.803+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, examId, configurationNodeId, userNames) .from(examConfigurationMapRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.803+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, examId, configurationNodeId, userNames) .from(examConfigurationMapRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.803+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default ExamConfigurationMapRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, examId, configurationNodeId, userNames) .from(examConfigurationMapRecord) @@ -131,7 +131,7 @@ public interface ExamConfigurationMapRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.803+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default UpdateDSL> updateByExample(ExamConfigurationMapRecord record) { return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord) .set(examId).equalTo(record::getExamId) @@ -139,7 +139,7 @@ public interface ExamConfigurationMapRecordMapper { .set(userNames).equalTo(record::getUserNames); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.803+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default UpdateDSL> updateByExampleSelective(ExamConfigurationMapRecord record) { return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord) .set(examId).equalToWhenPresent(record::getExamId) @@ -147,7 +147,7 @@ public interface ExamConfigurationMapRecordMapper { .set(userNames).equalToWhenPresent(record::getUserNames); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.803+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default int updateByPrimaryKey(ExamConfigurationMapRecord record) { return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord) .set(examId).equalTo(record::getExamId) @@ -158,7 +158,7 @@ public interface ExamConfigurationMapRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.803+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.951+01:00", comments="Source Table: exam_configuration_map") default int updateByPrimaryKeySelective(ExamConfigurationMapRecord record) { return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord) .set(examId).equalToWhenPresent(record::getExamId) 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 9e75aa86..515e22c5 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,34 +6,34 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class ExamRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.806+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source Table: exam") public static final ExamRecord examRecord = new ExamRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.806+01:00", comments="Source field: exam.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.954+01:00", comments="Source field: exam.id") public static final SqlColumn id = examRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.806+01:00", comments="Source field: exam.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.954+01:00", comments="Source field: exam.institution_id") public static final SqlColumn institutionId = examRecord.institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.806+01:00", comments="Source field: exam.lms_setup_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.954+01:00", comments="Source field: exam.lms_setup_id") public static final SqlColumn lmsSetupId = examRecord.lmsSetupId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.806+01:00", comments="Source field: exam.external_uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.954+01:00", comments="Source field: exam.external_uuid") public static final SqlColumn externalUuid = examRecord.externalUuid; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.806+01:00", comments="Source field: exam.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.954+01:00", comments="Source field: exam.owner") public static final SqlColumn owner = examRecord.owner; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.806+01:00", comments="Source field: exam.supporter") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.954+01:00", comments="Source field: exam.supporter") public static final SqlColumn supporter = examRecord.supporter; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.807+01:00", comments="Source field: exam.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01:00", comments="Source field: exam.type") public static final SqlColumn type = examRecord.type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.808+01:00", comments="Source field: exam.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01:00", comments="Source field: exam.active") public static final SqlColumn active = examRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.806+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.954+01: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 7dbfd128..393a743b 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="2018-12-17T11:52:41.808+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01:00", comments="Source Table: exam") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.808+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01:00", comments="Source Table: exam") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.808+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01: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="2018-12-17T11:52:41.808+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01:00", comments="Source Table: exam") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -59,7 +59,7 @@ public interface ExamRecordMapper { }) ExamRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.809+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01:00", comments="Source Table: exam") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -73,22 +73,22 @@ public interface ExamRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.809+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01:00", comments="Source Table: exam") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.809+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01: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="2018-12-17T11:52:41.809+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01:00", comments="Source Table: exam") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, examRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.809+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01:00", comments="Source Table: exam") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, examRecord) .where(id, isEqualTo(id_)) @@ -96,7 +96,7 @@ public interface ExamRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.809+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.955+01:00", comments="Source Table: exam") default int insert(ExamRecord record) { return insert(SqlBuilder.insert(record) .into(examRecord) @@ -111,7 +111,7 @@ public interface ExamRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.809+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.956+01:00", comments="Source Table: exam") default int insertSelective(ExamRecord record) { return insert(SqlBuilder.insert(record) .into(examRecord) @@ -126,19 +126,19 @@ public interface ExamRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.809+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.956+01:00", comments="Source Table: exam") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, lmsSetupId, externalUuid, owner, supporter, type, active) .from(examRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.809+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.956+01:00", comments="Source Table: exam") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, lmsSetupId, externalUuid, owner, supporter, type, active) .from(examRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.809+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.956+01:00", comments="Source Table: exam") default ExamRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, lmsSetupId, externalUuid, owner, supporter, type, active) .from(examRecord) @@ -147,7 +147,7 @@ public interface ExamRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.810+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.956+01:00", comments="Source Table: exam") default UpdateDSL> updateByExample(ExamRecord record) { return UpdateDSL.updateWithMapper(this::update, examRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -159,7 +159,7 @@ public interface ExamRecordMapper { .set(active).equalTo(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.810+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.956+01:00", comments="Source Table: exam") default UpdateDSL> updateByExampleSelective(ExamRecord record) { return UpdateDSL.updateWithMapper(this::update, examRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) @@ -171,7 +171,7 @@ public interface ExamRecordMapper { .set(active).equalToWhenPresent(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.810+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.956+01:00", comments="Source Table: exam") default int updateByPrimaryKey(ExamRecord record) { return UpdateDSL.updateWithMapper(this::update, examRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -186,7 +186,7 @@ public interface ExamRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.810+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.956+01: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 f57e327a..6d6acba7 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="2018-12-17T11:52:41.828+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01:00", comments="Source Table: indicator") public static final IndicatorRecord indicatorRecord = new IndicatorRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.836+01:00", comments="Source field: indicator.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01:00", comments="Source field: indicator.id") public static final SqlColumn id = indicatorRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.837+01:00", comments="Source field: indicator.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01:00", comments="Source field: indicator.exam_id") public static final SqlColumn examId = indicatorRecord.examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.837+01:00", comments="Source field: indicator.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01:00", comments="Source field: indicator.type") public static final SqlColumn type = indicatorRecord.type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.837+01:00", comments="Source field: indicator.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01:00", comments="Source field: indicator.name") public static final SqlColumn name = indicatorRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.837+01:00", comments="Source field: indicator.color") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01:00", comments="Source field: indicator.color") public static final SqlColumn color = indicatorRecord.color; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.828+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01: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 93ce705b..5a26ffbe 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="2018-12-17T11:52:41.837+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01:00", comments="Source Table: indicator") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.837+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01:00", comments="Source Table: indicator") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.837+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01: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="2018-12-17T11:52:41.837+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.967+01: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="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01:00", comments="Source Table: indicator") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01:00", comments="Source Table: indicator") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, indicatorRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.838+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.839+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.839+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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="2018-12-17T11:52:41.839+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.968+01: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 3573ed9a..5e13cf10 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,31 +6,36 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class InstitutionRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.842+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source Table: institution") public static final InstitutionRecord institutionRecord = new InstitutionRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.843+01:00", comments="Source field: institution.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.970+01:00", comments="Source field: institution.id") public static final SqlColumn id = institutionRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.843+01:00", comments="Source field: institution.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.970+01:00", comments="Source field: institution.name") public static final SqlColumn name = institutionRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.843+01:00", comments="Source field: institution.authtype") - public static final SqlColumn authtype = institutionRecord.authtype; + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.970+01:00", comments="Source field: institution.url_suffix") + public static final SqlColumn urlSuffix = institutionRecord.urlSuffix; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.843+01:00", comments="Source field: institution.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.970+01:00", comments="Source field: institution.active") public static final SqlColumn active = institutionRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.843+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.970+01:00", comments="Source field: institution.logo_image") + public static final SqlColumn logoImage = institutionRecord.logoImage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.970+01:00", comments="Source Table: institution") public static final class InstitutionRecord extends SqlTable { public final SqlColumn id = column("id", JDBCType.BIGINT); public final SqlColumn name = column("name", JDBCType.VARCHAR); - public final SqlColumn authtype = column("authtype", JDBCType.VARCHAR); + public final SqlColumn urlSuffix = column("url_suffix", JDBCType.VARCHAR); public final SqlColumn active = column("active", JDBCType.INTEGER); + public final SqlColumn logoImage = column("logo_image", JDBCType.CLOB); + public InstitutionRecord() { super("institution"); } 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 39ee80c7..9fd05787 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,55 +32,57 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter; @Mapper public interface InstitutionRecordMapper { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.843+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.970+01:00", comments="Source Table: institution") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.843+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.970+01:00", comments="Source Table: institution") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.843+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.970+01: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="2018-12-17T11:52:41.843+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.970+01:00", comments="Source Table: institution") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), - @Arg(column="authtype", javaType=String.class, jdbcType=JdbcType.VARCHAR), - @Arg(column="active", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + @Arg(column="url_suffix", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="active", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="logo_image", javaType=String.class, jdbcType=JdbcType.CLOB) }) InstitutionRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.844+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR), - @Arg(column="authtype", javaType=String.class, jdbcType=JdbcType.VARCHAR), - @Arg(column="active", javaType=Integer.class, jdbcType=JdbcType.INTEGER) + @Arg(column="url_suffix", javaType=String.class, jdbcType=JdbcType.VARCHAR), + @Arg(column="active", javaType=Integer.class, jdbcType=JdbcType.INTEGER), + @Arg(column="logo_image", javaType=String.class, jdbcType=JdbcType.CLOB) }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.844+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.844+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01: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="2018-12-17T11:52:41.844+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, institutionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.844+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, institutionRecord) .where(id, isEqualTo(id_)) @@ -88,82 +90,88 @@ public interface InstitutionRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.844+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default int insert(InstitutionRecord record) { return insert(SqlBuilder.insert(record) .into(institutionRecord) .map(name).toProperty("name") - .map(authtype).toProperty("authtype") + .map(urlSuffix).toProperty("urlSuffix") .map(active).toProperty("active") + .map(logoImage).toProperty("logoImage") .build() .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.844+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default int insertSelective(InstitutionRecord record) { return insert(SqlBuilder.insert(record) .into(institutionRecord) .map(name).toPropertyWhenPresent("name", record::getName) - .map(authtype).toPropertyWhenPresent("authtype", record::getAuthtype) + .map(urlSuffix).toPropertyWhenPresent("urlSuffix", record::getUrlSuffix) .map(active).toPropertyWhenPresent("active", record::getActive) + .map(logoImage).toPropertyWhenPresent("logoImage", record::getLogoImage) .build() .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.844+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default QueryExpressionDSL>> selectByExample() { - return SelectDSL.selectWithMapper(this::selectMany, id, name, authtype, active) + return SelectDSL.selectWithMapper(this::selectMany, id, name, urlSuffix, active, logoImage) .from(institutionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.844+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default QueryExpressionDSL>> selectDistinctByExample() { - return SelectDSL.selectDistinctWithMapper(this::selectMany, id, name, authtype, active) + return SelectDSL.selectDistinctWithMapper(this::selectMany, id, name, urlSuffix, active, logoImage) .from(institutionRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.844+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default InstitutionRecord selectByPrimaryKey(Long id_) { - return SelectDSL.selectWithMapper(this::selectOne, id, name, authtype, active) + return SelectDSL.selectWithMapper(this::selectOne, id, name, urlSuffix, active, logoImage) .from(institutionRecord) .where(id, isEqualTo(id_)) .build() .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.845+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default UpdateDSL> updateByExample(InstitutionRecord record) { return UpdateDSL.updateWithMapper(this::update, institutionRecord) .set(name).equalTo(record::getName) - .set(authtype).equalTo(record::getAuthtype) - .set(active).equalTo(record::getActive); + .set(urlSuffix).equalTo(record::getUrlSuffix) + .set(active).equalTo(record::getActive) + .set(logoImage).equalTo(record::getLogoImage); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.845+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default UpdateDSL> updateByExampleSelective(InstitutionRecord record) { return UpdateDSL.updateWithMapper(this::update, institutionRecord) .set(name).equalToWhenPresent(record::getName) - .set(authtype).equalToWhenPresent(record::getAuthtype) - .set(active).equalToWhenPresent(record::getActive); + .set(urlSuffix).equalToWhenPresent(record::getUrlSuffix) + .set(active).equalToWhenPresent(record::getActive) + .set(logoImage).equalToWhenPresent(record::getLogoImage); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.845+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default int updateByPrimaryKey(InstitutionRecord record) { return UpdateDSL.updateWithMapper(this::update, institutionRecord) .set(name).equalTo(record::getName) - .set(authtype).equalTo(record::getAuthtype) + .set(urlSuffix).equalTo(record::getUrlSuffix) .set(active).equalTo(record::getActive) + .set(logoImage).equalTo(record::getLogoImage) .where(id, isEqualTo(record::getId)) .build() .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.845+01:00", comments="Source Table: institution") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.971+01:00", comments="Source Table: institution") default int updateByPrimaryKeySelective(InstitutionRecord record) { return UpdateDSL.updateWithMapper(this::update, institutionRecord) .set(name).equalToWhenPresent(record::getName) - .set(authtype).equalToWhenPresent(record::getAuthtype) + .set(urlSuffix).equalToWhenPresent(record::getUrlSuffix) .set(active).equalToWhenPresent(record::getActive) + .set(logoImage).equalToWhenPresent(record::getLogoImage) .where(id, isEqualTo(record::getId)) .build() .execute(); 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 e7c361d8..6f797fe5 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,43 +6,43 @@ import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class LmsSetupRecordDynamicSqlSupport { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.848+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source Table: lms_setup") public static final LmsSetupRecord lmsSetupRecord = new LmsSetupRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.848+01:00", comments="Source field: lms_setup.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.id") public static final SqlColumn id = lmsSetupRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.848+01:00", comments="Source field: lms_setup.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.institution_id") public static final SqlColumn institutionId = lmsSetupRecord.institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.848+01:00", comments="Source field: lms_setup.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.name") public static final SqlColumn name = lmsSetupRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.848+01:00", comments="Source field: lms_setup.lms_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source field: lms_setup.lms_type") public static final SqlColumn lmsType = lmsSetupRecord.lmsType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.848+01:00", comments="Source field: lms_setup.lms_url") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source field: lms_setup.lms_url") public static final SqlColumn lmsUrl = lmsSetupRecord.lmsUrl; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.849+01:00", comments="Source field: lms_setup.lms_clientname") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source field: lms_setup.lms_clientname") public static final SqlColumn lmsClientname = lmsSetupRecord.lmsClientname; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.849+01:00", comments="Source field: lms_setup.lms_clientsecret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source field: lms_setup.lms_clientsecret") public static final SqlColumn lmsClientsecret = lmsSetupRecord.lmsClientsecret; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.849+01:00", comments="Source field: lms_setup.lms_rest_api_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01: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="2018-12-17T11:52:41.849+01:00", comments="Source field: lms_setup.seb_clientname") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source field: lms_setup.seb_clientname") public static final SqlColumn sebClientname = lmsSetupRecord.sebClientname; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.849+01:00", comments="Source field: lms_setup.seb_clientsecret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source field: lms_setup.seb_clientsecret") public static final SqlColumn sebClientsecret = lmsSetupRecord.sebClientsecret; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.849+01:00", comments="Source field: lms_setup.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source field: lms_setup.active") public static final SqlColumn active = lmsSetupRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.848+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01: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 bbf03035..2fd3507c 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="2018-12-17T11:52:41.849+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source Table: lms_setup") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.849+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source Table: lms_setup") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01: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="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source Table: lms_setup") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -62,7 +62,7 @@ public interface LmsSetupRecordMapper { }) LmsSetupRecord selectOne(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source Table: lms_setup") @SelectProvider(type=SqlProviderAdapter.class, method="select") @ConstructorArgs({ @Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true), @@ -79,22 +79,22 @@ public interface LmsSetupRecordMapper { }) List selectMany(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source Table: lms_setup") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01: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="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.974+01:00", comments="Source Table: lms_setup") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, lmsSetupRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.975+01:00", comments="Source Table: lms_setup") default int deleteByPrimaryKey(Long id_) { return DeleteDSL.deleteFromWithMapper(this::delete, lmsSetupRecord) .where(id, isEqualTo(id_)) @@ -102,7 +102,7 @@ public interface LmsSetupRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.975+01:00", comments="Source Table: lms_setup") default int insert(LmsSetupRecord record) { return insert(SqlBuilder.insert(record) .into(lmsSetupRecord) @@ -120,7 +120,7 @@ public interface LmsSetupRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.975+01:00", comments="Source Table: lms_setup") default int insertSelective(LmsSetupRecord record) { return insert(SqlBuilder.insert(record) .into(lmsSetupRecord) @@ -138,19 +138,19 @@ public interface LmsSetupRecordMapper { .render(RenderingStrategy.MYBATIS3)); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.975+01:00", comments="Source Table: lms_setup") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, sebClientname, sebClientsecret, active) .from(lmsSetupRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.850+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.975+01:00", comments="Source Table: lms_setup") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, sebClientname, sebClientsecret, active) .from(lmsSetupRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.851+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.975+01:00", comments="Source Table: lms_setup") default LmsSetupRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, sebClientname, sebClientsecret, active) .from(lmsSetupRecord) @@ -159,7 +159,7 @@ public interface LmsSetupRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.851+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.975+01:00", comments="Source Table: lms_setup") default UpdateDSL> updateByExample(LmsSetupRecord record) { return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -174,7 +174,7 @@ public interface LmsSetupRecordMapper { .set(active).equalTo(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.851+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.975+01:00", comments="Source Table: lms_setup") default UpdateDSL> updateByExampleSelective(LmsSetupRecord record) { return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord) .set(institutionId).equalToWhenPresent(record::getInstitutionId) @@ -189,7 +189,7 @@ public interface LmsSetupRecordMapper { .set(active).equalToWhenPresent(record::getActive); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.851+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.975+01:00", comments="Source Table: lms_setup") default int updateByPrimaryKey(LmsSetupRecord record) { return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord) .set(institutionId).equalTo(record::getInstitutionId) @@ -207,7 +207,7 @@ public interface LmsSetupRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.851+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.975+01: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 3930a9f8..89cb809e 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="2018-12-17T11:52:41.777+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.936+01:00", comments="Source Table: orientation") public static final OrientationRecord orientationRecord = new OrientationRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.778+01:00", comments="Source field: orientation.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.936+01:00", comments="Source field: orientation.id") public static final SqlColumn id = orientationRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.778+01:00", comments="Source field: orientation.config_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.936+01:00", comments="Source field: orientation.config_attribute_id") public static final SqlColumn configAttributeId = orientationRecord.configAttributeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.778+01:00", comments="Source field: orientation.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.936+01:00", comments="Source field: orientation.template") public static final SqlColumn template = orientationRecord.template; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.778+01:00", comments="Source field: orientation.view") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.936+01:00", comments="Source field: orientation.view") public static final SqlColumn view = orientationRecord.view; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.778+01:00", comments="Source field: orientation.group") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.936+01:00", comments="Source field: orientation.group") public static final SqlColumn group = orientationRecord.group; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.779+01:00", comments="Source field: orientation.x_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.936+01:00", comments="Source field: orientation.x_position") public static final SqlColumn xPosition = orientationRecord.xPosition; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.779+01:00", comments="Source field: orientation.y_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.937+01:00", comments="Source field: orientation.y_position") public static final SqlColumn yPosition = orientationRecord.yPosition; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.779+01:00", comments="Source field: orientation.width") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.937+01:00", comments="Source field: orientation.width") public static final SqlColumn width = orientationRecord.width; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.779+01:00", comments="Source field: orientation.height") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.937+01:00", comments="Source field: orientation.height") public static final SqlColumn height = orientationRecord.height; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.778+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.936+01: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 194404f9..b746a1b8 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="2018-12-17T11:52:41.779+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.937+01:00", comments="Source Table: orientation") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.779+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.937+01:00", comments="Source Table: orientation") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.779+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.937+01: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="2018-12-17T11:52:41.780+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.937+01: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="2018-12-17T11:52:41.780+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.937+01: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="2018-12-17T11:52:41.780+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.938+01:00", comments="Source Table: orientation") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.780+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.938+01: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="2018-12-17T11:52:41.780+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.938+01:00", comments="Source Table: orientation") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, orientationRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.780+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.938+01: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="2018-12-17T11:52:41.780+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.938+01: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="2018-12-17T11:52:41.781+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.938+01: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="2018-12-17T11:52:41.781+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.938+01: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="2018-12-17T11:52:41.781+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.938+01: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="2018-12-17T11:52:41.781+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.938+01: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="2018-12-17T11:52:41.782+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.938+01: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="2018-12-17T11:52:41.782+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.939+01: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="2018-12-17T11:52:41.782+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.939+01: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="2018-12-17T11:52:41.782+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.939+01: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 356ea455..e988fff4 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="2018-12-17T11:52:41.864+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01:00", comments="Source Table: user_role") public static final RoleRecord roleRecord = new RoleRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.865+01:00", comments="Source field: user_role.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01:00", comments="Source field: user_role.id") public static final SqlColumn id = roleRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.865+01:00", comments="Source field: user_role.user_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01:00", comments="Source field: user_role.user_id") public static final SqlColumn userId = roleRecord.userId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.865+01:00", comments="Source field: user_role.role_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01:00", comments="Source field: user_role.role_name") public static final SqlColumn roleName = roleRecord.roleName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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 cb33e496..49bd2654 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="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01:00", comments="Source Table: user_role") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01:00", comments="Source Table: user_role") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01:00", comments="Source Table: user_role") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01:00", comments="Source Table: user_role") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, roleRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.865+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.866+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.866+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.866+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.866+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.866+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.992+01: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="2018-12-17T11:52:41.866+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01: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="2018-12-17T11:52:41.866+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01: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="2018-12-17T11:52:41.866+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01: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/UserActivityLogRecordDynamicSqlSupport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/mapper/UserActivityLogRecordDynamicSqlSupport.java index 682849e9..92a20a0f 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="2018-12-17T11:52:41.867+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source Table: user_activity_log") public static final UserActivityLogRecord userActivityLogRecord = new UserActivityLogRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.id") public static final SqlColumn id = userActivityLogRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.868+01:00", comments="Source field: user_activity_log.user_uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01:00", comments="Source field: user_activity_log.user_uuid") public static final SqlColumn userUuid = userActivityLogRecord.userUuid; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.868+01:00", comments="Source field: user_activity_log.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01:00", comments="Source field: user_activity_log.timestamp") public static final SqlColumn timestamp = userActivityLogRecord.timestamp; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.868+01:00", comments="Source field: user_activity_log.activity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01:00", comments="Source field: user_activity_log.activity_type") public static final SqlColumn activityType = userActivityLogRecord.activityType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.868+01:00", comments="Source field: user_activity_log.entity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01:00", comments="Source field: user_activity_log.entity_type") public static final SqlColumn entityType = userActivityLogRecord.entityType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.868+01:00", comments="Source field: user_activity_log.entity_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01:00", comments="Source field: user_activity_log.entity_id") public static final SqlColumn entityId = userActivityLogRecord.entityId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.868+01:00", comments="Source field: user_activity_log.message") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01:00", comments="Source field: user_activity_log.message") public static final SqlColumn message = userActivityLogRecord.message; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01: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 d11b48cd..0287dd93 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="2018-12-17T11:52:41.868+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01: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="2018-12-17T11:52:41.868+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01: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="2018-12-17T11:52:41.868+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01: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="2018-12-17T11:52:41.868+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01: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="2018-12-17T11:52:41.868+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01: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="2018-12-17T11:52:41.868+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01: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="2018-12-17T11:52:41.868+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01: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="2018-12-17T11:52:41.868+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01:00", comments="Source Table: user_activity_log") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, userActivityLogRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.868+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.994+01: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="2018-12-17T11:52:41.869+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.995+01: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="2018-12-17T11:52:41.869+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.995+01: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="2018-12-17T11:52:41.869+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.995+01: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="2018-12-17T11:52:41.869+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.995+01: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="2018-12-17T11:52:41.869+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.995+01: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="2018-12-17T11:52:41.869+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.995+01: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="2018-12-17T11:52:41.869+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.996+01: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="2018-12-17T11:52:41.869+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.996+01: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="2018-12-17T11:52:41.869+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.996+01: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 256e5c3e..2ec8e2d1 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="2018-12-17T11:52:41.858+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source Table: user") public static final UserRecord userRecord = new UserRecord(); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.859+01:00", comments="Source field: user.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source field: user.id") public static final SqlColumn id = userRecord.id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.859+01:00", comments="Source field: user.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.988+01:00", comments="Source field: user.institution_id") public static final SqlColumn institutionId = userRecord.institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.859+01:00", comments="Source field: user.uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.988+01:00", comments="Source field: user.uuid") public static final SqlColumn uuid = userRecord.uuid; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.859+01:00", comments="Source field: user.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.988+01:00", comments="Source field: user.name") public static final SqlColumn name = userRecord.name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.859+01:00", comments="Source field: user.user_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.989+01:00", comments="Source field: user.user_name") public static final SqlColumn userName = userRecord.userName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.859+01:00", comments="Source field: user.password") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.989+01:00", comments="Source field: user.password") public static final SqlColumn password = userRecord.password; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.859+01:00", comments="Source field: user.email") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.989+01:00", comments="Source field: user.email") public static final SqlColumn email = userRecord.email; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.860+01:00", comments="Source field: user.locale") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.989+01:00", comments="Source field: user.locale") public static final SqlColumn locale = userRecord.locale; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.860+01:00", comments="Source field: user.timezone") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.989+01:00", comments="Source field: user.timezone") public static final SqlColumn timezone = userRecord.timezone; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.860+01:00", comments="Source field: user.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.989+01:00", comments="Source field: user.active") public static final SqlColumn active = userRecord.active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.859+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01: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 64c9b1e2..947fc21d 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="2018-12-17T11:52:41.860+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.989+01:00", comments="Source Table: user") @SelectProvider(type=SqlProviderAdapter.class, method="select") long count(SelectStatementProvider selectStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.860+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.989+01:00", comments="Source Table: user") @DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.860+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.989+01: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="2018-12-17T11:52:41.860+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.989+01: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="2018-12-17T11:52:41.860+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01: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="2018-12-17T11:52:41.860+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01:00", comments="Source Table: user") @UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement); - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.860+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01: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="2018-12-17T11:52:41.860+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01:00", comments="Source Table: user") default DeleteDSL> deleteByExample() { return DeleteDSL.deleteFromWithMapper(this::delete, userRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.861+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01: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="2018-12-17T11:52:41.861+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01: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="2018-12-17T11:52:41.861+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01: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="2018-12-17T11:52:41.861+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01:00", comments="Source Table: user") default QueryExpressionDSL>> selectByExample() { return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, uuid, name, userName, password, email, locale, timezone, active) .from(userRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.861+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01:00", comments="Source Table: user") default QueryExpressionDSL>> selectDistinctByExample() { return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, uuid, name, userName, password, email, locale, timezone, active) .from(userRecord); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.861+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01:00", comments="Source Table: user") default UserRecord selectByPrimaryKey(Long id_) { return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, uuid, name, userName, password, email, locale, timezone, active) .from(userRecord) @@ -155,7 +155,7 @@ public interface UserRecordMapper { .execute(); } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.861+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01: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="2018-12-17T11:52:41.861+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.990+01: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="2018-12-17T11:52:41.862+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.991+01: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="2018-12-17T11:52:41.862+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.991+01: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/ClientConnectionRecord.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/model/ClientConnectionRecord.java index 9101f664..ef26c634 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="2018-12-17T11:52:41.812+01:00", comments="Source field: client_connection.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.958+01:00", comments="Source field: client_connection.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.812+01:00", comments="Source field: client_connection.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.958+01:00", comments="Source field: client_connection.exam_id") private Long examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.812+01:00", comments="Source field: client_connection.status") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.958+01:00", comments="Source field: client_connection.status") private String status; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.813+01:00", comments="Source field: client_connection.connection_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.958+01:00", comments="Source field: client_connection.connection_token") private String connectionToken; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.813+01:00", comments="Source field: client_connection.user_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source field: client_connection.user_name") private String userName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.813+01:00", comments="Source field: client_connection.vdi") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source field: client_connection.vdi") private Boolean vdi; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.813+01:00", comments="Source field: client_connection.client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source field: client_connection.client_address") private String clientAddress; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.813+01:00", comments="Source field: client_connection.virtual_client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source field: client_connection.virtual_client_address") private String virtualClientAddress; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.812+01:00", comments="Source Table: client_connection") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.958+01: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="2018-12-17T11:52:41.812+01:00", comments="Source field: client_connection.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.958+01:00", comments="Source field: client_connection.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.812+01:00", comments="Source field: client_connection.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.958+01:00", comments="Source field: client_connection.exam_id") public Long getExamId() { return examId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.812+01:00", comments="Source field: client_connection.status") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.958+01:00", comments="Source field: client_connection.status") public String getStatus() { return status; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.813+01:00", comments="Source field: client_connection.connection_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.958+01:00", comments="Source field: client_connection.connection_token") public String getConnectionToken() { return connectionToken; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.813+01:00", comments="Source field: client_connection.user_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source field: client_connection.user_name") public String getUserName() { return userName; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.813+01:00", comments="Source field: client_connection.vdi") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source field: client_connection.vdi") public Boolean getVdi() { return vdi; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.813+01:00", comments="Source field: client_connection.client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01:00", comments="Source field: client_connection.client_address") public String getClientAddress() { return clientAddress; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.813+01:00", comments="Source field: client_connection.virtual_client_address") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.959+01: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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 abba6a0f..e7d3b278 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="2018-12-17T11:52:41.819+01:00", comments="Source field: client_event.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.962+01:00", comments="Source field: client_event.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.819+01:00", comments="Source field: client_event.connection_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.962+01:00", comments="Source field: client_event.connection_id") private Long connectionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.819+01:00", comments="Source field: client_event.user_identifier") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.user_identifier") private String userIdentifier; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.820+01:00", comments="Source field: client_event.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.type") private Integer type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.820+01:00", comments="Source field: client_event.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.timestamp") private Long timestamp; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.820+01:00", comments="Source field: client_event.numeric_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.numeric_value") private BigDecimal numericValue; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.820+01:00", comments="Source field: client_event.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.text") private String text; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.819+01:00", comments="Source Table: client_event") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.962+01: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="2018-12-17T11:52:41.819+01:00", comments="Source field: client_event.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.962+01:00", comments="Source field: client_event.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.819+01:00", comments="Source field: client_event.connection_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.connection_id") public Long getConnectionId() { return connectionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.820+01:00", comments="Source field: client_event.user_identifier") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.user_identifier") public String getUserIdentifier() { return userIdentifier; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.820+01:00", comments="Source field: client_event.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.type") public Integer getType() { return type; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.820+01:00", comments="Source field: client_event.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.timestamp") public Long getTimestamp() { return timestamp; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.820+01:00", comments="Source field: client_event.numeric_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01:00", comments="Source field: client_event.numeric_value") public BigDecimal getNumericValue() { return numericValue; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.820+01:00", comments="Source field: client_event.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.963+01: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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 158285a4..4c2e475f 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="2018-12-17T11:52:41.560+01:00", comments="Source field: configuration_attribute.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.770+01:00", comments="Source field: configuration_attribute.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.561+01:00", comments="Source field: configuration_attribute.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.771+01:00", comments="Source field: configuration_attribute.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.561+01:00", comments="Source field: configuration_attribute.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.771+01:00", comments="Source field: configuration_attribute.type") private String type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.561+01:00", comments="Source field: configuration_attribute.parent_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01:00", comments="Source field: configuration_attribute.parent_id") private Long parentId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.561+01:00", comments="Source field: configuration_attribute.resources") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01:00", comments="Source field: configuration_attribute.resources") private String resources; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.562+01:00", comments="Source field: configuration_attribute.validator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01:00", comments="Source field: configuration_attribute.validator") private String validator; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.562+01:00", comments="Source field: configuration_attribute.dependencies") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01:00", comments="Source field: configuration_attribute.dependencies") private String dependencies; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.562+01:00", comments="Source field: configuration_attribute.default_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01:00", comments="Source field: configuration_attribute.default_value") private String defaultValue; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.554+01:00", comments="Source Table: configuration_attribute") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.765+01: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="2018-12-17T11:52:41.561+01:00", comments="Source field: configuration_attribute.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.771+01:00", comments="Source field: configuration_attribute.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.561+01:00", comments="Source field: configuration_attribute.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.771+01:00", comments="Source field: configuration_attribute.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.561+01:00", comments="Source field: configuration_attribute.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01:00", comments="Source field: configuration_attribute.type") public String getType() { return type; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.561+01:00", comments="Source field: configuration_attribute.parent_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01:00", comments="Source field: configuration_attribute.parent_id") public Long getParentId() { return parentId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.561+01:00", comments="Source field: configuration_attribute.resources") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01:00", comments="Source field: configuration_attribute.resources") public String getResources() { return resources; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.562+01:00", comments="Source field: configuration_attribute.validator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01:00", comments="Source field: configuration_attribute.validator") public String getValidator() { return validator; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.562+01:00", comments="Source field: configuration_attribute.dependencies") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01:00", comments="Source field: configuration_attribute.dependencies") public String getDependencies() { return dependencies; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.562+01:00", comments="Source field: configuration_attribute.default_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.772+01: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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 2a99d667..2bc2cbc6 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="2018-12-17T11:52:41.792+01:00", comments="Source field: configuration_node.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.944+01:00", comments="Source field: configuration_node.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.792+01:00", comments="Source field: configuration_node.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.945+01:00", comments="Source field: configuration_node.institution_id") private Long institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.792+01:00", comments="Source field: configuration_node.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.owner") private String owner; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.792+01:00", comments="Source field: configuration_node.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.792+01:00", comments="Source field: configuration_node.description") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.description") private String description; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.793+01:00", comments="Source field: configuration_node.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.type") private String type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.793+01:00", comments="Source field: configuration_node.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.template") private String template; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.793+01:00", comments="Source field: configuration_node.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.791+01:00", comments="Source Table: configuration_node") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.944+01: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="2018-12-17T11:52:41.792+01:00", comments="Source field: configuration_node.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.944+01:00", comments="Source field: configuration_node.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.792+01:00", comments="Source field: configuration_node.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.institution_id") public Long getInstitutionId() { return institutionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.792+01:00", comments="Source field: configuration_node.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.owner") public String getOwner() { return owner; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.792+01:00", comments="Source field: configuration_node.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.792+01:00", comments="Source field: configuration_node.description") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.description") public String getDescription() { return description; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.793+01:00", comments="Source field: configuration_node.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.type") public String getType() { return type; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.793+01:00", comments="Source field: configuration_node.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01:00", comments="Source field: configuration_node.template") public String getTemplate() { return template; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.793+01:00", comments="Source field: configuration_node.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.946+01: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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 7b1bf356..cb8f319b 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,22 +4,22 @@ import javax.annotation.Generated; import org.joda.time.DateTime; public class ConfigurationRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source field: configuration.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.940+01:00", comments="Source field: configuration.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source field: configuration.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.940+01:00", comments="Source field: configuration.configuration_node_id") private Long configurationNodeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source field: configuration.version") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.941+01:00", comments="Source field: configuration.version") private String version; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source field: configuration.version_date") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.941+01:00", comments="Source field: configuration.version_date") private DateTime versionDate; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source field: configuration.followup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.941+01:00", comments="Source field: configuration.followup") private Integer followup; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source Table: configuration") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.939+01:00", comments="Source Table: configuration") public ConfigurationRecord(Long id, Long configurationNodeId, String version, DateTime versionDate, Integer followup) { this.id = id; this.configurationNodeId = configurationNodeId; @@ -28,27 +28,27 @@ public class ConfigurationRecord { this.followup = followup; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source field: configuration.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.940+01:00", comments="Source field: configuration.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source field: configuration.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.940+01:00", comments="Source field: configuration.configuration_node_id") public Long getConfigurationNodeId() { return configurationNodeId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source field: configuration.version") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.941+01:00", comments="Source field: configuration.version") public String getVersion() { return version; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source field: configuration.version_date") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.941+01:00", comments="Source field: configuration.version_date") public DateTime getVersionDate() { return versionDate; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.785+01:00", comments="Source field: configuration.followup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.941+01:00", comments="Source field: configuration.followup") public Integer getFollowup() { return followup; } @@ -57,7 +57,7 @@ public class ConfigurationRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public String toString() { @@ -78,7 +78,7 @@ public class ConfigurationRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public boolean equals(Object that) { @@ -103,7 +103,7 @@ public class ConfigurationRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public int 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 c38d9ca0..bce9f9e2 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,25 +3,25 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class ConfigurationValueRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.769+01:00", comments="Source field: configuration_value.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.769+01:00", comments="Source field: configuration_value.configuration_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.configuration_id") private Long configurationId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.770+01:00", comments="Source field: configuration_value.configuration_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.configuration_attribute_id") private Long configurationAttributeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.770+01:00", comments="Source field: configuration_value.list_index") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.list_index") private Integer listIndex; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.770+01:00", comments="Source field: configuration_value.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.value") private String value; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.770+01:00", comments="Source field: configuration_value.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.text") private String text; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.769+01:00", comments="Source Table: configuration_value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source Table: configuration_value") public ConfigurationValueRecord(Long id, Long configurationId, Long configurationAttributeId, Integer listIndex, String value, String text) { this.id = id; this.configurationId = configurationId; @@ -31,32 +31,32 @@ public class ConfigurationValueRecord { this.text = text; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.769+01:00", comments="Source field: configuration_value.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.770+01:00", comments="Source field: configuration_value.configuration_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.configuration_id") public Long getConfigurationId() { return configurationId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.770+01:00", comments="Source field: configuration_value.configuration_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.configuration_attribute_id") public Long getConfigurationAttributeId() { return configurationAttributeId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.770+01:00", comments="Source field: configuration_value.list_index") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.list_index") public Integer getListIndex() { return listIndex; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.770+01:00", comments="Source field: configuration_value.value") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.value") public String getValue() { return value; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.770+01:00", comments="Source field: configuration_value.text") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.930+01:00", comments="Source field: configuration_value.text") public String getText() { return text; } @@ -65,7 +65,7 @@ public class ConfigurationValueRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_value * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public String toString() { @@ -87,7 +87,7 @@ public class ConfigurationValueRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_value * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public boolean equals(Object that) { @@ -113,7 +113,7 @@ public class ConfigurationValueRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table configuration_value * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public int 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 ebaf3f53..70895858 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,19 +3,19 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class ExamConfigurationMapRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.800+01:00", comments="Source field: exam_configuration_map.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.949+01:00", comments="Source field: exam_configuration_map.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.800+01:00", comments="Source field: exam_configuration_map.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source field: exam_configuration_map.exam_id") private Long examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.800+01:00", comments="Source field: exam_configuration_map.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source field: exam_configuration_map.configuration_node_id") private Long configurationNodeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.800+01:00", comments="Source field: exam_configuration_map.user_names") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source field: exam_configuration_map.user_names") private String userNames; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.800+01:00", comments="Source Table: exam_configuration_map") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.949+01:00", comments="Source Table: exam_configuration_map") public ExamConfigurationMapRecord(Long id, Long examId, Long configurationNodeId, String userNames) { this.id = id; this.examId = examId; @@ -23,22 +23,22 @@ public class ExamConfigurationMapRecord { this.userNames = userNames; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.800+01:00", comments="Source field: exam_configuration_map.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.949+01:00", comments="Source field: exam_configuration_map.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.800+01:00", comments="Source field: exam_configuration_map.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source field: exam_configuration_map.exam_id") public Long getExamId() { return examId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.800+01:00", comments="Source field: exam_configuration_map.configuration_node_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source field: exam_configuration_map.configuration_node_id") public Long getConfigurationNodeId() { return configurationNodeId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.800+01:00", comments="Source field: exam_configuration_map.user_names") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.950+01:00", comments="Source field: exam_configuration_map.user_names") public String getUserNames() { return userNames; } @@ -47,7 +47,7 @@ public class ExamConfigurationMapRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam_configuration_map * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public String toString() { @@ -67,7 +67,7 @@ public class ExamConfigurationMapRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam_configuration_map * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public boolean equals(Object that) { @@ -91,7 +91,7 @@ public class ExamConfigurationMapRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam_configuration_map * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public int 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 e73cfbdc..ace21ab8 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,31 +3,31 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class ExamRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.804+01:00", comments="Source field: exam.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.952+01:00", comments="Source field: exam.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.804+01:00", comments="Source field: exam.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.952+01:00", comments="Source field: exam.institution_id") private Long institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.804+01:00", comments="Source field: exam.lms_setup_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.952+01:00", comments="Source field: exam.lms_setup_id") private Long lmsSetupId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.805+01:00", comments="Source field: exam.external_uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source field: exam.external_uuid") private String externalUuid; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.805+01:00", comments="Source field: exam.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source field: exam.owner") private String owner; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.805+01:00", comments="Source field: exam.supporter") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source field: exam.supporter") private String supporter; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.805+01:00", comments="Source field: exam.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source field: exam.type") private String type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.805+01:00", comments="Source field: exam.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source field: exam.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.804+01:00", comments="Source Table: exam") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.952+01:00", comments="Source Table: exam") public ExamRecord(Long id, Long institutionId, Long lmsSetupId, String externalUuid, String owner, String supporter, String type, Integer active) { this.id = id; this.institutionId = institutionId; @@ -39,42 +39,42 @@ public class ExamRecord { this.active = active; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.804+01:00", comments="Source field: exam.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.952+01:00", comments="Source field: exam.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.804+01:00", comments="Source field: exam.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.952+01:00", comments="Source field: exam.institution_id") public Long getInstitutionId() { return institutionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.804+01:00", comments="Source field: exam.lms_setup_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.952+01:00", comments="Source field: exam.lms_setup_id") public Long getLmsSetupId() { return lmsSetupId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.805+01:00", comments="Source field: exam.external_uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source field: exam.external_uuid") public String getExternalUuid() { return externalUuid; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.805+01:00", comments="Source field: exam.owner") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source field: exam.owner") public String getOwner() { return owner; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.805+01:00", comments="Source field: exam.supporter") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source field: exam.supporter") public String getSupporter() { return supporter; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.805+01:00", comments="Source field: exam.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source field: exam.type") public String getType() { return type; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.805+01:00", comments="Source field: exam.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.953+01:00", comments="Source field: exam.active") public Integer getActive() { return active; } @@ -83,7 +83,7 @@ public class ExamRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public String toString() { @@ -107,7 +107,7 @@ public class ExamRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public boolean equals(Object that) { @@ -135,7 +135,7 @@ public class ExamRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table exam * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 a34e4d7e..73d8dfa2 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="2018-12-17T11:52:41.828+01:00", comments="Source field: indicator.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01:00", comments="Source field: indicator.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.828+01:00", comments="Source field: indicator.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01:00", comments="Source field: indicator.exam_id") private Long examId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.828+01:00", comments="Source field: indicator.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01:00", comments="Source field: indicator.type") private String type; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.828+01:00", comments="Source field: indicator.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01:00", comments="Source field: indicator.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.828+01:00", comments="Source field: indicator.color") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01:00", comments="Source field: indicator.color") private String color; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.827+01:00", comments="Source Table: indicator") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01: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="2018-12-17T11:52:41.828+01:00", comments="Source field: indicator.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01:00", comments="Source field: indicator.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.828+01:00", comments="Source field: indicator.exam_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01:00", comments="Source field: indicator.exam_id") public Long getExamId() { return examId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.828+01:00", comments="Source field: indicator.type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01:00", comments="Source field: indicator.type") public String getType() { return type; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.828+01:00", comments="Source field: indicator.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01:00", comments="Source field: indicator.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.828+01:00", comments="Source field: indicator.color") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.966+01: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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 044c5b49..d982a74b 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,51 +3,60 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class InstitutionRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.842+01:00", comments="Source field: institution.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source field: institution.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.842+01:00", comments="Source field: institution.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source field: institution.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.842+01:00", comments="Source field: institution.authtype") - private String authtype; + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source field: institution.url_suffix") + private String urlSuffix; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.842+01:00", comments="Source field: institution.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source field: institution.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.841+01:00", comments="Source Table: institution") - public InstitutionRecord(Long id, String name, String authtype, Integer active) { + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source field: institution.logo_image") + private String logoImage; + + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source Table: institution") + public InstitutionRecord(Long id, String name, String urlSuffix, Integer active, String logoImage) { this.id = id; this.name = name; - this.authtype = authtype; + this.urlSuffix = urlSuffix; this.active = active; + this.logoImage = logoImage; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.842+01:00", comments="Source field: institution.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source field: institution.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.842+01:00", comments="Source field: institution.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source field: institution.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.842+01:00", comments="Source field: institution.authtype") - public String getAuthtype() { - return authtype; + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source field: institution.url_suffix") + public String getUrlSuffix() { + return urlSuffix; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.842+01:00", comments="Source field: institution.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source field: institution.active") public Integer getActive() { return active; } + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.969+01:00", comments="Source field: institution.logo_image") + public String getLogoImage() { + return logoImage; + } + /** * This method was generated by MyBatis Generator. * This method corresponds to the database table institution * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public String toString() { @@ -57,8 +66,9 @@ public class InstitutionRecord { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", name=").append(name); - sb.append(", authtype=").append(authtype); + sb.append(", urlSuffix=").append(urlSuffix); sb.append(", active=").append(active); + sb.append(", logoImage=").append(logoImage); sb.append("]"); return sb.toString(); } @@ -67,7 +77,7 @@ public class InstitutionRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table institution * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public boolean equals(Object that) { @@ -83,15 +93,16 @@ public class InstitutionRecord { InstitutionRecord other = (InstitutionRecord) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) - && (this.getAuthtype() == null ? other.getAuthtype() == null : this.getAuthtype().equals(other.getAuthtype())) - && (this.getActive() == null ? other.getActive() == null : this.getActive().equals(other.getActive())); + && (this.getUrlSuffix() == null ? other.getUrlSuffix() == null : this.getUrlSuffix().equals(other.getUrlSuffix())) + && (this.getActive() == null ? other.getActive() == null : this.getActive().equals(other.getActive())) + && (this.getLogoImage() == null ? other.getLogoImage() == null : this.getLogoImage().equals(other.getLogoImage())); } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table institution * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public int hashCode() { @@ -99,8 +110,9 @@ public class InstitutionRecord { int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); - result = prime * result + ((getAuthtype() == null) ? 0 : getAuthtype().hashCode()); + result = prime * result + ((getUrlSuffix() == null) ? 0 : getUrlSuffix().hashCode()); result = prime * result + ((getActive() == null) ? 0 : getActive().hashCode()); + result = prime * result + ((getLogoImage() == null) ? 0 : getLogoImage().hashCode()); return result; } } \ No newline at end of file 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 c2bfdacb..2c814d07 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,40 +3,40 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model; import javax.annotation.Generated; public class LmsSetupRecord { - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.846+01:00", comments="Source field: lms_setup.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.972+01:00", comments="Source field: lms_setup.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.972+01:00", comments="Source field: lms_setup.institution_id") private Long institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.972+01:00", comments="Source field: lms_setup.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.lms_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.lms_type") private String lmsType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.lms_url") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.lms_url") private String lmsUrl; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.lms_clientname") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.lms_clientname") private String lmsClientname; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.lms_clientsecret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.lms_clientsecret") private String lmsClientsecret; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.lms_rest_api_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.lms_rest_api_token") private String lmsRestApiToken; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.seb_clientname") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.seb_clientname") private String sebClientname; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.seb_clientsecret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.seb_clientsecret") private String sebClientsecret; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.846+01:00", comments="Source Table: lms_setup") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.972+01:00", comments="Source Table: lms_setup") public LmsSetupRecord(Long id, Long institutionId, String name, String lmsType, String lmsUrl, String lmsClientname, String lmsClientsecret, String lmsRestApiToken, String sebClientname, String sebClientsecret, Integer active) { this.id = id; this.institutionId = institutionId; @@ -51,57 +51,57 @@ public class LmsSetupRecord { this.active = active; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.846+01:00", comments="Source field: lms_setup.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.972+01:00", comments="Source field: lms_setup.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.972+01:00", comments="Source field: lms_setup.institution_id") public Long getInstitutionId() { return institutionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.972+01:00", comments="Source field: lms_setup.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.lms_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.lms_type") public String getLmsType() { return lmsType; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.lms_url") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.lms_url") public String getLmsUrl() { return lmsUrl; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.lms_clientname") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.lms_clientname") public String getLmsClientname() { return lmsClientname; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.lms_clientsecret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.lms_clientsecret") public String getLmsClientsecret() { return lmsClientsecret; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.lms_rest_api_token") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.lms_rest_api_token") public String getLmsRestApiToken() { return lmsRestApiToken; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.seb_clientname") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.seb_clientname") public String getSebClientname() { return sebClientname; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.seb_clientsecret") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.seb_clientsecret") public String getSebClientsecret() { return sebClientsecret; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.847+01:00", comments="Source field: lms_setup.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.973+01:00", comments="Source field: lms_setup.active") public Integer getActive() { return active; } @@ -110,7 +110,7 @@ public class LmsSetupRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table lms_setup * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public String toString() { @@ -137,7 +137,7 @@ public class LmsSetupRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table lms_setup * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public boolean equals(Object that) { @@ -168,7 +168,7 @@ public class LmsSetupRecord { * This method was generated by MyBatis Generator. * This method corresponds to the database table lms_setup * - * @mbg.generated Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 1922cba1..37e38cb6 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="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.934+01:00", comments="Source field: orientation.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.config_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.934+01:00", comments="Source field: orientation.config_attribute_id") private Long configAttributeId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.template") private String template; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.view") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.view") private String view; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.group") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.group") private String group; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.x_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.x_position") private Integer xPosition; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.777+01:00", comments="Source field: orientation.y_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.y_position") private Integer yPosition; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.777+01:00", comments="Source field: orientation.width") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.width") private Integer width; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.777+01:00", comments="Source field: orientation.height") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.height") private Integer height; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.775+01:00", comments="Source Table: orientation") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.934+01: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="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.934+01:00", comments="Source field: orientation.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.config_attribute_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.934+01:00", comments="Source field: orientation.config_attribute_id") public Long getConfigAttributeId() { return configAttributeId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.template") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.template") public String getTemplate() { return template; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.view") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.view") public String getView() { return view; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.776+01:00", comments="Source field: orientation.group") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.group") public String getGroup() { return group; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.777+01:00", comments="Source field: orientation.x_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.x_position") public Integer getxPosition() { return xPosition; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.777+01:00", comments="Source field: orientation.y_position") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.y_position") public Integer getyPosition() { return yPosition; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.777+01:00", comments="Source field: orientation.width") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01:00", comments="Source field: orientation.width") public Integer getWidth() { return width; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.777+01:00", comments="Source field: orientation.height") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.935+01: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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 72d65d6b..6b43ccb5 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="2018-12-17T11:52:41.864+01:00", comments="Source field: user_role.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.991+01:00", comments="Source field: user_role.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.864+01:00", comments="Source field: user_role.user_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.991+01:00", comments="Source field: user_role.user_id") private Long userId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.864+01:00", comments="Source field: user_role.role_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.991+01:00", comments="Source field: user_role.role_name") private String roleName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.864+01:00", comments="Source Table: user_role") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.991+01: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="2018-12-17T11:52:41.864+01:00", comments="Source field: user_role.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.991+01:00", comments="Source field: user_role.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.864+01:00", comments="Source field: user_role.user_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.991+01:00", comments="Source field: user_role.user_id") public Long getUserId() { return userId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.864+01:00", comments="Source field: user_role.role_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.991+01: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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 2162e921..b47acf68 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="2018-12-17T11:52:41.866+01:00", comments="Source field: user_activity_log.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.user_uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.user_uuid") private String userUuid; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.timestamp") private Long timestamp; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.activity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.activity_type") private String activityType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.entity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.entity_type") private String entityType; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.entity_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.entity_id") private String entityId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.message") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.message") private String message; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.866+01:00", comments="Source Table: user_activity_log") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01: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="2018-12-17T11:52:41.866+01:00", comments="Source field: user_activity_log.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.user_uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.user_uuid") public String getUserUuid() { return userUuid; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.timestamp") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.timestamp") public Long getTimestamp() { return timestamp; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.activity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.activity_type") public String getActivityType() { return activityType; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.entity_type") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.entity_type") public String getEntityType() { return entityType; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.entity_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01:00", comments="Source field: user_activity_log.entity_id") public String getEntityId() { return entityId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.867+01:00", comments="Source field: user_activity_log.message") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.993+01: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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 a5804cc1..3f61d713 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="2018-12-17T11:52:41.856+01:00", comments="Source field: user.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source field: user.id") private Long id; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.856+01:00", comments="Source field: user.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source field: user.institution_id") private Long institutionId; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.856+01:00", comments="Source field: user.uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source field: user.uuid") private String uuid; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.856+01:00", comments="Source field: user.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source field: user.name") private String name; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.857+01:00", comments="Source field: user.user_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source field: user.user_name") private String userName; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.857+01:00", comments="Source field: user.password") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source field: user.password") private String password; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.857+01:00", comments="Source field: user.email") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source field: user.email") private String email; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.858+01:00", comments="Source field: user.locale") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source field: user.locale") private String locale; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.858+01:00", comments="Source field: user.timezone") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source field: user.timezone") private String timezone; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.858+01:00", comments="Source field: user.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source field: user.active") private Integer active; - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.856+01:00", comments="Source Table: user") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source Table: user") public UserRecord(Long id, Long institutionId, String uuid, String name, String userName, String password, String email, String locale, 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="2018-12-17T11:52:41.856+01:00", comments="Source field: user.id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source field: user.id") public Long getId() { return id; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.856+01:00", comments="Source field: user.institution_id") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source field: user.institution_id") public Long getInstitutionId() { return institutionId; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.856+01:00", comments="Source field: user.uuid") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source field: user.uuid") public String getUuid() { return uuid; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.857+01:00", comments="Source field: user.name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source field: user.name") public String getName() { return name; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.857+01:00", comments="Source field: user.user_name") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.986+01:00", comments="Source field: user.user_name") public String getUserName() { return userName; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.857+01:00", comments="Source field: user.password") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source field: user.password") public String getPassword() { return password; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.857+01:00", comments="Source field: user.email") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source field: user.email") public String getEmail() { return email; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.858+01:00", comments="Source field: user.locale") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source field: user.locale") public String getLocale() { return locale; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.858+01:00", comments="Source field: user.timezone") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01:00", comments="Source field: user.timezone") public String getTimezone() { return timezone; } - @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-17T11:52:41.858+01:00", comments="Source field: user.active") + @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-12-19T13:27:34.987+01: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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @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 Mon Dec 17 11:52:41 CET 2018 + * @mbg.generated Wed Dec 19 13:27:34 CET 2018 */ @Override public int hashCode() { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationEvent.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationEvent.java index 3cd03ac3..fabe5449 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationEvent.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationEvent.java @@ -16,8 +16,8 @@ public final class EntityActivationEvent extends ApplicationEvent { private static final long serialVersionUID = -6712364320755441148L; - public final boolean activated; - public final Entity entity; + public final transient boolean activated; + public final transient Entity entity; public EntityActivationEvent(final Entity source, final boolean activated) { super(source); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/DeletionReport.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/DeletionReport.java new file mode 100644 index 00000000..46e569ff --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/DeletionReport.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018 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.Entity; + +public class DeletionReport { + + // TODO + + public DeletionReport add(final Entity entity) { + // TODO + return this; + } + +} 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 ba4d37a1..442054c2 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,11 +8,88 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao; +import java.util.Collection; +import java.util.function.Predicate; + import ch.ethz.seb.sebserver.gbl.model.Entity; import ch.ethz.seb.sebserver.gbl.model.EntityType; +import ch.ethz.seb.sebserver.gbl.util.Result; public interface EntityDAO { + /** Get the entity type for a concrete EntityDAO implementation. + * + * @return The EntityType for a concrete EntityDAO implementation */ EntityType entityType(); + /** Use this to get an Entity instance of concrete type by database identifier + * + * @param id the data base identifier of the entity + * @return Result refer the Entity instance with the specified database identifier or refer to an error if + * happened */ + Result byId(Long id); + + /** Use this to get a Collection of all entities of concrete type that matches a given predicate. + * + * NOTE: This first gets all records from database, for each creates new Entity instance and then + * tests then matching predicate. So predicate filtering is not really fast + * If you need a fast filtering implement a specific filtering in SQL level + * + * @param predicate Predicate expecting instance of type specific entity type + * @param onlyActive indicates if only active entities should be included (on SQL level) + * @return Result of Collection of Entity that matches a given predicate. Or an exception result on error + * case */ + Result> all(Predicate predicate, boolean onlyActive); + + /** Use this to get a Collection of all entities of concrete type that matches a given predicate. + * + * NOTE: This first gets all records from database, for each creates new Entity instance and then + * tests then matching predicate. So predicate filtering is not really fast + * If you need a fast filtering implement a specific filtering in SQL level + * + * @param predicate Predicate expecting instance of type specific entity type + * @return Result of Collection of Entity that matches a given predicate. Or an exception result on error + * case */ + default Result> all(final Predicate predicate) { + return all(predicate, true); + } + + /** Use this to get a Collection of all active entities of concrete type + * + * @return Result of Collection of all active entities or an exception result on error case */ + default Result> all() { + return all(entity -> true, true); + } + + /** Use this to delete an Entity and all its relationships by id + * + * @param id the identifier if the entity to delete + * @param archive indicates whether the Entity and all its relations should be archived (inactive and anonymous) or + * hard deleted + * @return Result of a collection of all entities that has been deleted (or archived) or refer to an error if + * happened */ + Result delete(Long id, boolean archive); + + /** Utility method to extract an expected single resource entry form a Collection of specified type. + * Gets a Result refer to an expected single resource entry form a Collection of specified type or refer + * to a ResourceNotFoundException if specified collection is null or empty or refer to a + * unexpected RuntimeException if there are more then the expected single element in the given collection + * + * @param id The resource id to wrap within a ResourceNotFoundException if needed + * @param resources the collection of resource entries + * @return Result refer to an expected single resource entry form a Collection of specified type or refer to an + * error if happened */ + default Result getSingleResource(final String id, final Collection resources) { + + if (resources == null || resources.isEmpty()) { + return Result.ofError(new ResourceNotFoundException(entityType(), id)); + } else if (resources.size() > 1) { + return Result.ofError( + new RuntimeException("Unexpected resource count result. Expected is exactly one resource but is: " + + resources.size())); + } + + return Result.of(resources.iterator().next()); + } + } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/InstitutionDAO.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/InstitutionDAO.java new file mode 100644 index 00000000..a551d371 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/InstitutionDAO.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018 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 java.util.Collection; + +import ch.ethz.seb.sebserver.gbl.model.institution.Institution; +import ch.ethz.seb.sebserver.gbl.util.Result; + +public interface InstitutionDAO extends EntityDAO, ActivatableEntityDAO { + + Result> allMatching(String name, boolean active); + + Result save(Institution institution); + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/TransactionHandler.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/TransactionHandler.java new file mode 100644 index 00000000..e3533537 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/TransactionHandler.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2018 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 org.springframework.transaction.interceptor.TransactionInterceptor; + +public interface TransactionHandler { + + /** Use this to mark the current transaction within the calling thread as "to rollback". + * This uses Springs; TransactionInterceptor.currentTransactionStatus().setRollbackOnly() + * + * Set the transaction rollback-only. This instructs the transaction manager + * that the only possible outcome of the transaction may be a rollback, as + * alternative to throwing an exception which would in turn trigger a rollback. + *

+ * This is mainly intended for transactions managed by + * {@link org.springframework.transaction.support.TransactionTemplate} or + * {@link org.springframework.transaction.interceptor.TransactionInterceptor}, + * where the actual commit/rollback decision is made by the container. + * + * @see org.springframework.transaction.support.TransactionCallback#doInTransaction + * @see org.springframework.transaction.interceptor.TransactionAttribute#rollbackOn */ + static void rollback() { + TransactionInterceptor.currentTransactionStatus().setRollbackOnly(); + } + + /** Use this to mark the current transaction within the calling thread as "to rollback". + * This uses Springs; TransactionInterceptor.currentTransactionStatus().setRollbackOnly() + * + * Set the transaction rollback-only. This instructs the transaction manager + * that the only possible outcome of the transaction may be a rollback, as + * alternative to throwing an exception which would in turn trigger a rollback. + *

+ * This is mainly intended for transactions managed by + * {@link org.springframework.transaction.support.TransactionTemplate} or + * {@link org.springframework.transaction.interceptor.TransactionInterceptor}, + * where the actual commit/rollback decision is made by the container. + * + * @see org.springframework.transaction.support.TransactionCallback#doInTransaction + * @see org.springframework.transaction.interceptor.TransactionAttribute#rollbackOn */ + static void rollback(final Throwable t) { + TransactionInterceptor.currentTransactionStatus().setRollbackOnly(); + } + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/UserDAO.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/UserDAO.java index 4d7e144c..035c44ae 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/UserDAO.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/UserDAO.java @@ -9,9 +9,7 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao; import java.util.Collection; -import java.util.function.Predicate; -import ch.ethz.seb.sebserver.gbl.model.Entity; import ch.ethz.seb.sebserver.gbl.model.user.UserFilter; import ch.ethz.seb.sebserver.gbl.model.user.UserInfo; import ch.ethz.seb.sebserver.gbl.model.user.UserMod; @@ -23,13 +21,6 @@ import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.SEBServerUser * within SEBServerUser. */ public interface UserDAO extends EntityDAO, ActivatableEntityDAO { - /** Use this to get UserInfo by database identifier - * - * @param id the data base identifier of the user - * @return a Result of UserInfo data from user with the specified database identifier. Or an exception result on - * error case */ - Result byId(Long id); - /** Use this to get UserInfo by users UUID * * @param uuid The UUID of the user to get UserInfo from @@ -48,17 +39,6 @@ public interface UserDAO extends EntityDAO, ActivatableEntityDAO sebServerUserByUsername(String username); - /** Use this to get a Collection of UserInfo that matches a given predicate. - * - * NOTE: This first gets all UserRecord from database, for each creates new UserInfo - * tests then matching predicate. So predicate filtering is not really fast - * If you need a fast filtering user all with UserFilter - * - * @param predicate Predicate expecting instance of type UserInfo - * @return a Result of Collection of UserInfo that matches a given predicate. Or an exception result on error - * case */ - Result> all(Predicate predicate); - /** Use this to a Collection of filtered UserInfo. The filter criteria * from given UserFilter instance will be translated to SQL query and * the filtering happens on data-base level @@ -77,12 +57,4 @@ public interface UserDAO extends EntityDAO, ActivatableEntityDAO save(UserMod userMod); - /** Use this to delete a user and all its relationships by id - * - * @param id the identifier if the user to delete - * @param archive indicates whether the user and all its relations should be archived (inactive and anonymous) or - * hard deleted - * @return Result of a collection of all entities that has been deleted (or archived) */ - Result> delete(Long id, boolean archive); - } 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 new file mode 100644 index 00000000..425baed3 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/InstitutionDAOImpl.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2018 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 java.util.Collection; +import java.util.List; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.BooleanUtils; +import org.mybatis.dynamic.sql.SqlBuilder; +import org.mybatis.dynamic.sql.select.MyBatis3SelectModelAdapter; +import org.mybatis.dynamic.sql.select.QueryExpressionDSL; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import ch.ethz.seb.sebserver.gbl.model.Entity; +import ch.ethz.seb.sebserver.gbl.model.EntityType; +import ch.ethz.seb.sebserver.gbl.model.institution.Institution; +import ch.ethz.seb.sebserver.gbl.util.Result; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.InstitutionRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.InstitutionRecordMapper; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.UserRecordDynamicSqlSupport; +import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.InstitutionRecord; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.DeletionReport; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.InstitutionDAO; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ResourceNotFoundException; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.TransactionHandler; + +@Lazy +@Component +public class InstitutionDAOImpl implements InstitutionDAO { + + private final InstitutionRecordMapper institutionRecordMapper; + + public InstitutionDAOImpl(final InstitutionRecordMapper institutionRecordMapper) { + this.institutionRecordMapper = institutionRecordMapper; + } + + @Override + public EntityType entityType() { + return EntityType.INSTITUTION; + } + + @Override + @Transactional(readOnly = true) + public Result byId(final Long id) { + return recordById(id) + .flatMap(InstitutionDAOImpl::toDomainModel); + } + + @Override + @Transactional(readOnly = true) + public Result> allActive() { + return allMatching(null, true); + } + + @Override + @Transactional(readOnly = true) + public Result> all(final Predicate predicate, final boolean onlyActive) { + return Result.tryCatch(() -> { + final QueryExpressionDSL>> example = + this.institutionRecordMapper.selectByExample(); + + final List records = (onlyActive) + ? example.where(UserRecordDynamicSqlSupport.active, isEqualTo(BooleanUtils.toInteger(true))) + .build() + .execute() + : example.build().execute(); + + return records.stream() + .map(InstitutionDAOImpl::toDomainModel) + .flatMap(Result::skipWithError) + .filter(predicate) + .collect(Collectors.toList()); + }); + } + + @Override + @Transactional(readOnly = true) + public Result> allMatching(final String name, final boolean active) { + return Result.tryCatch(() -> this.institutionRecordMapper + .selectByExample() + .where(InstitutionRecordDynamicSqlSupport.active, + SqlBuilder.isEqualTo(BooleanUtils.toInteger(active))) + .and(InstitutionRecordDynamicSqlSupport.name, SqlBuilder.isEqualToWhenPresent(name)) + .build() + .execute() + .stream() + .map(InstitutionDAOImpl::toDomainModel) + .flatMap(Result::skipWithError) + .collect(Collectors.toList())); + } + + @Override + @Transactional + public Result save(final Institution institution) { + if (institution == null) { + return Result.ofError(new NullPointerException("institution has null-reference")); + } + + return (institution.id != null) + ? updateUser(institution) + .flatMap(InstitutionDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback) + : createNewUser(institution) + .flatMap(InstitutionDAOImpl::toDomainModel) + .onErrorDo(TransactionHandler::rollback); + } + + @Override + @Transactional + public Result setActive(final String entityId, final boolean active) { + return Result.tryCatch(() -> { + final Long institutionId = Long.valueOf(entityId); + + this.institutionRecordMapper.updateByPrimaryKeySelective(new InstitutionRecord( + institutionId, null, null, BooleanUtils.toInteger(active), null)); + + return this.institutionRecordMapper.selectByPrimaryKey(institutionId); + }).flatMap(InstitutionDAOImpl::toDomainModel); + } + + @Override + public void notifyActivation(final Entity source) { + // No dependencies of activation on Institution + } + + @Override + public void notifyDeactivation(final Entity source) { + // No dependencies of activation on Institution + } + + @Override + @Transactional + public Result delete(final Long id, final boolean archive) { + // TODO Auto-generated method stub + return null; + } + + private Result recordById(final Long id) { + return Result.tryCatch(() -> { + final InstitutionRecord record = this.institutionRecordMapper.selectByPrimaryKey(id); + if (record == null) { + throw new ResourceNotFoundException( + EntityType.INSTITUTION, + String.valueOf(id)); + } + return record; + }); + } + + private Result createNewUser(final Institution institution) { + return Result.tryCatch(() -> { + final InstitutionRecord newRecord = new InstitutionRecord( + null, + institution.name, + institution.urlSuffix, + BooleanUtils.toInteger(false), + institution.logoImage); + + this.institutionRecordMapper.insert(newRecord); + return newRecord; + }); + } + + private Result updateUser(final Institution institution) { + return recordById(institution.id) + .flatMap(record -> Result.tryCatch(() -> { + + final InstitutionRecord newRecord = new InstitutionRecord( + institution.id, + institution.name, + institution.urlSuffix, + null, + institution.logoImage); + + this.institutionRecordMapper.updateByPrimaryKeySelective(newRecord); + return this.institutionRecordMapper.selectByPrimaryKey(institution.id); + })); + } + + private static Result toDomainModel(final InstitutionRecord record) { + return Result.tryCatch(() -> new Institution( + record.getId(), + record.getName(), + record.getUrlSuffix(), + record.getLogoImage(), + BooleanUtils.toBooleanObject(record.getActive()))); + } + +} 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 1b07081a..ebca439c 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 @@ -9,7 +9,6 @@ package ch.ethz.seb.sebserver.webservice.servicelayer.dao.impl; import java.util.Collection; -import java.util.Collections; import java.util.List; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -35,6 +34,8 @@ import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.Authorization import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.PrivilegeType; import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.SEBServerUser; import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.UserService; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.DeletionReport; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.TransactionHandler; import ch.ethz.seb.sebserver.webservice.servicelayer.dao.UserActivityLogDAO; @Lazy @@ -92,7 +93,7 @@ public class UserActivityLogDAOImpl implements UserActivityLogDAO { System.currentTimeMillis(), activityType.name(), entity.entityType().name(), - entity.getId(), + entity.getModelId(), message)); return Result.of(entity); @@ -104,7 +105,7 @@ public class UserActivityLogDAOImpl implements UserActivityLogDAO { user.getUserInfo().uuid, activityType, entity.entityType().name(), - entity.getId(), + entity.getModelId(), t); TransactionInterceptor .currentTransactionStatus() @@ -114,6 +115,27 @@ public class UserActivityLogDAOImpl implements UserActivityLogDAO { } } + @Override + @Transactional(readOnly = true) + public Result byId(final Long id) { + return Result.tryCatch(() -> this.userLogRecordMapper.selectByPrimaryKey(id)) + .flatMap(UserActivityLogDAOImpl::toDomainModel); + } + + @Override + @Transactional + public Result delete(final Long id, final boolean archive) { + return Result.tryCatch(() -> { + final DeletionReport report = new DeletionReport(); + + final UserActivityLog log = byId(id).getOrThrow(); + this.userLogRecordMapper.deleteByPrimaryKey(id); + report.add(log); + + return report; + }).onErrorDo(TransactionHandler::rollback); + } + @Override @Transactional(readOnly = true) public Result> getAllForUser(final String userUuid) { @@ -128,11 +150,10 @@ public class UserActivityLogDAOImpl implements UserActivityLogDAO { final Long to, final Predicate predicate) { - final Predicate _predicate = (predicate != null) - ? predicate - : model -> true; - - try { + return Result.tryCatch(() -> { + final Predicate _predicate = (predicate != null) + ? predicate + : model -> true; final boolean basePrivilege = this.authorizationGrantService.hasBasePrivilege( EntityType.USER_ACTIVITY_LOG, @@ -142,70 +163,83 @@ public class UserActivityLogDAOImpl implements UserActivityLogDAO { ? null : this.userService.getCurrentUser().institutionId(); - if (institutionId == null) { + return (institutionId == null) + ? this.userLogRecordMapper.selectByExample() + .where(UserActivityLogRecordDynamicSqlSupport.userUuid, + SqlBuilder.isEqualToWhenPresent(userId)) + .and(UserActivityLogRecordDynamicSqlSupport.timestamp, + SqlBuilder.isGreaterThanOrEqualToWhenPresent(from)) + .and(UserActivityLogRecordDynamicSqlSupport.timestamp, SqlBuilder.isLessThanWhenPresent(to)) + .build() + .execute() + .stream() + .filter(_predicate) + .map(UserActivityLogDAOImpl::toDomainModel) + .flatMap(Result::skipWithError) + .collect(Collectors.toList()) - final List records = this.userLogRecordMapper.selectByExample() - .where(UserActivityLogRecordDynamicSqlSupport.userUuid, SqlBuilder.isEqualToWhenPresent(userId)) - .and(UserActivityLogRecordDynamicSqlSupport.timestamp, - SqlBuilder.isGreaterThanOrEqualToWhenPresent(from)) - .and(UserActivityLogRecordDynamicSqlSupport.timestamp, SqlBuilder.isLessThanWhenPresent(to)) - .build() - .execute(); + : this.userLogRecordMapper.selectByExample() + .join(UserRecordDynamicSqlSupport.userRecord) + .on(UserRecordDynamicSqlSupport.uuid, + SqlBuilder.equalTo(UserActivityLogRecordDynamicSqlSupport.userUuid)) + .where(UserActivityLogRecordDynamicSqlSupport.userUuid, + SqlBuilder.isEqualToWhenPresent(userId)) + .and(UserRecordDynamicSqlSupport.institutionId, + SqlBuilder.isEqualToWhenPresent(institutionId)) + .and(UserActivityLogRecordDynamicSqlSupport.timestamp, + SqlBuilder.isGreaterThanOrEqualToWhenPresent(from)) + .and(UserActivityLogRecordDynamicSqlSupport.timestamp, SqlBuilder.isLessThanWhenPresent(to)) + .build() + .execute() + .stream() + .filter(_predicate) + .map(UserActivityLogDAOImpl::toDomainModel) + .flatMap(Result::skipWithError) + .collect(Collectors.toList()); - return getAllFromRecords(_predicate, records); + }); + } - } else { + @Override + @Transactional(readOnly = true) + public Result> all( + final Predicate predicate, + final boolean onlyActive) { - final List records = this.userLogRecordMapper.selectByExample() - .join(UserRecordDynamicSqlSupport.userRecord) - .on(UserRecordDynamicSqlSupport.uuid, - SqlBuilder.equalTo(UserActivityLogRecordDynamicSqlSupport.userUuid)) - .where(UserActivityLogRecordDynamicSqlSupport.userUuid, SqlBuilder.isEqualToWhenPresent(userId)) - .and(UserRecordDynamicSqlSupport.institutionId, SqlBuilder.isEqualToWhenPresent(institutionId)) - .and(UserActivityLogRecordDynamicSqlSupport.timestamp, - SqlBuilder.isGreaterThanOrEqualToWhenPresent(from)) - .and(UserActivityLogRecordDynamicSqlSupport.timestamp, SqlBuilder.isLessThanWhenPresent(to)) - .build() - .execute(); - - return getAllFromRecords(_predicate, records); - - } - - } catch (final Throwable t) { - log.error("Unexpected error while trying to get all activity logs in the time-frame form: {} to: {}", - from, - to); - return Result.ofError(t); - } + // TODO Auto-generated method stub + return null; } @Override @Transactional(readOnly = true) public Result overwriteUserReferences(final String userUuid, final boolean deactivate) { - try { - + return Result.tryCatch(() -> { final List records = this.userLogRecordMapper.selectByExample() .where(UserActivityLogRecordDynamicSqlSupport.userUuid, SqlBuilder.isEqualTo(userUuid)) .build() .execute(); if (CollectionUtils.isEmpty(records)) { - return Result.of(0); + return 0; } records .stream() .forEach(this::overwriteUser); - return Result.of(records.size()); + return records.size(); + }); + } - } catch (final Throwable t) { - log.error( - "Unexpected error while trying to delete all user references form activity logs for user with id: {}", - userUuid); - return Result.ofError(t); - } + @Override + @Transactional + public Result deleteUserEnities(final String userUuid) { + return Result.tryCatch(() -> { + return this.userLogRecordMapper.deleteByExample() + .where(UserActivityLogRecordDynamicSqlSupport.userUuid, SqlBuilder.isEqualToWhenPresent(userUuid)) + .build() + .execute(); + }); } private void overwriteUser(final UserActivityLogRecord record) { @@ -217,51 +251,17 @@ public class UserActivityLogDAOImpl implements UserActivityLogDAO { this.userLogRecordMapper.updateByPrimaryKeySelective(selective); } - @Override - public Result deleteUserEnities(final String userUuid) { - try { - - return Result.of(this.userLogRecordMapper.deleteByExample() - .where(UserActivityLogRecordDynamicSqlSupport.userUuid, SqlBuilder.isEqualToWhenPresent(userUuid)) - .build() - .execute()); - - } catch (final Throwable t) { - log.error("Unexpected error while trying to delete all activity logs for user with id: {}", userUuid); - return Result.ofError(t); - } - } - - private Result> getAllFromRecords( - final Predicate predicate, - final List records) { - - if (CollectionUtils.isEmpty(records)) { - return Result.of(Collections.emptyList()); - } - - return Result.of(records.stream() - .filter(predicate) - .flatMap(record -> fromRecord(record).stream()) - .collect(Collectors.toList())); - } - - private Result fromRecord(final UserActivityLogRecord record) { - try { - - return Result.of(new UserActivityLog( + private static Result toDomainModel(final UserActivityLogRecord record) { + return Result.tryCatch(() -> { + return new UserActivityLog( record.getId(), record.getUserUuid(), record.getTimestamp(), ActivityType.valueOf(record.getActivityType()), EntityType.valueOf(record.getEntityType()), record.getEntityId(), - record.getMessage())); - - } catch (final Throwable t) { - log.error("Unexpected error while trying to convert UserActivityLogRecord to UserActivityLog: ", t); - return Result.ofError(t); - } + record.getMessage()); + }); } } 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 ee0baf5c..374fd7d2 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 @@ -23,6 +23,8 @@ import javax.validation.constraints.NotNull; import org.apache.commons.lang3.BooleanUtils; import org.joda.time.DateTimeZone; +import org.mybatis.dynamic.sql.select.MyBatis3SelectModelAdapter; +import org.mybatis.dynamic.sql.select.QueryExpressionDSL; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Qualifier; @@ -30,8 +32,6 @@ import org.springframework.context.annotation.Lazy; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; -import org.springframework.transaction.interceptor.TransactionInterceptor; -import org.springframework.util.CollectionUtils; import ch.ethz.seb.sebserver.WebSecurityConfig; import ch.ethz.seb.sebserver.gbl.model.APIMessage.APIMessageException; @@ -42,7 +42,6 @@ import ch.ethz.seb.sebserver.gbl.model.user.UserFilter; import ch.ethz.seb.sebserver.gbl.model.user.UserInfo; import ch.ethz.seb.sebserver.gbl.model.user.UserMod; import ch.ethz.seb.sebserver.gbl.util.Result; -import ch.ethz.seb.sebserver.gbl.util.Utils; import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.RoleRecordDynamicSqlSupport; import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.RoleRecordMapper; import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.UserRecordDynamicSqlSupport; @@ -50,7 +49,8 @@ import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.UserRecordMapper; import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.RoleRecord; import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.UserRecord; import ch.ethz.seb.sebserver.webservice.servicelayer.authorization.SEBServerUser; -import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ResourceNotFoundException; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.DeletionReport; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.TransactionHandler; import ch.ethz.seb.sebserver.webservice.servicelayer.dao.UserDAO; @Lazy @@ -81,29 +81,28 @@ public class UserDaoImpl implements UserDAO { @Override @Transactional(readOnly = true) public Result byId(final Long id) { - return toDomainModel( - String.valueOf(id), - this.userRecordMapper.selectByPrimaryKey(id)); + return Result.tryCatch(() -> this.userRecordMapper.selectByPrimaryKey(id)) + .flatMap(this::toDomainModel); } @Override @Transactional(readOnly = true) public Result byUuid(final String uuid) { return recordByUUID(uuid) - .flatMap(rec -> toDomainModel(uuid, rec)); + .flatMap(this::toDomainModel); } @Override @Transactional(readOnly = true) public Result byUsername(final String username) { - return recordByUUID(username) - .flatMap(rec -> toDomainModel(username, rec)); + return recordByUsername(username) + .flatMap(this::toDomainModel); } @Override @Transactional(readOnly = true) public Result sebServerUserByUsername(final String username) { - return recordByUsername(username, true) + return recordByUsername(username) .flatMap(rec -> sebServerUserFromRecord(rec)); } @@ -115,48 +114,42 @@ public class UserDaoImpl implements UserDAO { @Override @Transactional(readOnly = true) - public Result> all(final Predicate predicate) { - try { + public Result> all(final Predicate predicate, final boolean onlyActive) { + return Result.tryCatch(() -> { + final QueryExpressionDSL>> example = + this.userRecordMapper.selectByExample(); - final List records = this.userRecordMapper - .selectByExample() - .build() - .execute(); + final List records = (onlyActive) + ? example.where(UserRecordDynamicSqlSupport.active, isEqualTo(BooleanUtils.toInteger(true))) + .build() + .execute() + : example.build().execute(); - if (records == null) { - return Result.of(Collections.emptyList()); - } - - return fromRecords(records, predicate); - - } catch (final Exception e) { - log.error("Unexpected error while trying to get all users: ", e); - return Result.ofError(e); - } + return records.stream() + .map(this::toDomainModel) + .flatMap(Result::skipWithError) + .filter(predicate) + .collect(Collectors.toList()); + }); } @Override @Transactional(readOnly = true) public Result> all(final UserFilter filter) { - try { - - final List records = this.userRecordMapper.selectByExample().where( - UserRecordDynamicSqlSupport.active, - isEqualTo(BooleanUtils.toInteger(filter.active))) - .and(UserRecordDynamicSqlSupport.institutionId, isEqualToWhenPresent(filter.institutionId)) - .and(UserRecordDynamicSqlSupport.name, isLikeWhenPresent(filter.getNameLike())) - .and(UserRecordDynamicSqlSupport.userName, isLikeWhenPresent(filter.getUserNameLike())) - .and(UserRecordDynamicSqlSupport.email, isLikeWhenPresent(filter.getEmailLike())) - .and(UserRecordDynamicSqlSupport.locale, isLikeWhenPresent(filter.locale)) - .build() - .execute(); - - return fromRecords(records, record -> true); - - } catch (final Exception e) { - log.error("Unexpected error while trying to get fitered users, filter: {}", filter, e); - return Result.ofError(e); - } + return Result.tryCatch(() -> this.userRecordMapper.selectByExample().where( + UserRecordDynamicSqlSupport.active, + isEqualTo(BooleanUtils.toInteger(filter.active))) + .and(UserRecordDynamicSqlSupport.institutionId, isEqualToWhenPresent(filter.institutionId)) + .and(UserRecordDynamicSqlSupport.name, isLikeWhenPresent(filter.getNameLike())) + .and(UserRecordDynamicSqlSupport.userName, isLikeWhenPresent(filter.getUserNameLike())) + .and(UserRecordDynamicSqlSupport.email, isLikeWhenPresent(filter.getEmailLike())) + .and(UserRecordDynamicSqlSupport.locale, isLikeWhenPresent(filter.locale)) + .build() + .execute() + .stream() + .map(this::toDomainModel) + .flatMap(Result::skipWithError) + .collect(Collectors.toList())); } @Override @@ -166,24 +159,20 @@ public class UserDaoImpl implements UserDAO { return Result.ofError(new NullPointerException("userMod has null-reference")); } - try { - - return (userMod.uuid != null) - ? updateUser(userMod) - : createNewUser(userMod); - - } catch (final Throwable t) { - log.error("Unexpected error while saving User data: ", t); - TransactionInterceptor.currentTransactionStatus().setRollbackOnly(); - return Result.ofError(t); - } + return (userMod.uuid != null) + ? updateUser(userMod) + .flatMap(this::toDomainModel) + .onErrorDo(TransactionHandler::rollback) + : createNewUser(userMod) + .flatMap(this::toDomainModel) + .onErrorDo(TransactionHandler::rollback); } @Override @Transactional - public Result> delete(final Long id, final boolean force) { + public Result delete(final Long id, final boolean force) { - // TODO clarify within discussion about inactivate, archive and delete user related data + // TODO clarify within discussion about deactivate, archive and delete user related data return Result.ofError(new RuntimeException("TODO")); } @@ -191,9 +180,9 @@ public class UserDaoImpl implements UserDAO { @Override @Transactional public Result setActive(final String entityId, final boolean active) { - try { + return Result.tryCatch(() -> { - this.userRecordMapper.updateByExampleSelective( + return this.userRecordMapper.updateByExampleSelective( new UserRecord( null, null, null, null, null, null, null, null, null, BooleanUtils.toIntegerObject(active))) @@ -201,19 +190,14 @@ public class UserDaoImpl implements UserDAO { .build() .execute(); - return byUuid(entityId); - - } catch (final Exception e) { - log.error("unexpected error: ", e); - return Result.ofError(e); - } + }).flatMap(count -> byUuid(entityId)); } @Override public void notifyActivation(final Entity source) { // If an Institution has been deactivated, all its user accounts gets also be deactivated if (source.entityType() == EntityType.INSTITUTION) { - setAllActiveForInstitution(Long.parseLong(source.getId()), true); + setAllActiveForInstitution(Long.parseLong(source.getModelId()), true); } } @@ -221,7 +205,7 @@ public class UserDaoImpl implements UserDAO { public void notifyDeactivation(final Entity source) { // If an Institution has been deactivated, all its user accounts gets also be deactivated if (source.entityType() == EntityType.INSTITUTION) { - setAllActiveForInstitution(Long.parseLong(source.getId()), false); + setAllActiveForInstitution(Long.parseLong(source.getModelId()), false); } } @@ -245,26 +229,12 @@ public class UserDaoImpl implements UserDAO { } } - private Result> fromRecords( - final List records, - final Predicate predicate) { - - if (CollectionUtils.isEmpty(records)) { - return Result.of(Collections.emptyList()); - } - - return Result.of(records.stream() - .flatMap(record -> fromRecord(record).stream()) - .filter(predicate) - .collect(Collectors.toList())); - } - - private Result updateUser(final UserMod userMod) { + private Result updateUser(final UserMod userMod) { return recordByUUID(userMod.uuid) - .flatMap(record -> { + .flatMap(record -> Result.tryCatch(() -> { final boolean changePWD = userMod.passwordChangeRequest(); if (changePWD && !userMod.newPasswordMatch()) { - return Result.ofError(new APIMessageException(ErrorMessage.PASSWORD_MISSMATCH)); + throw new APIMessageException(ErrorMessage.PASSWORD_MISSMATCH); } final UserRecord newRecord = new UserRecord( @@ -281,33 +251,35 @@ public class UserDaoImpl implements UserDAO { this.userRecordMapper.updateByPrimaryKeySelective(newRecord); updateRolesForUser(record.getId(), userMod.roles); - - return byId(record.getId()); - }); + return this.userRecordMapper.selectByPrimaryKey(record.getId()); + })); } - private Result createNewUser(final UserMod userMod) { + private Result createNewUser(final UserMod userMod) { + return Result.tryCatch(() -> { - if (!userMod.newPasswordMatch()) { - return Result.ofError(new APIMessageException(ErrorMessage.PASSWORD_MISSMATCH)); - } + if (!userMod.newPasswordMatch()) { + throw new APIMessageException(ErrorMessage.PASSWORD_MISSMATCH); + } - final UserRecord newRecord = new UserRecord( - null, - userMod.institutionId, - UUID.randomUUID().toString(), - userMod.name, - userMod.userName, - this.userPasswordEncoder.encode(userMod.getNewPassword()), - userMod.email, - userMod.locale.toLanguageTag(), - userMod.timeZone.getID(), - BooleanUtils.toInteger(false)); + final UserRecord newRecord = new UserRecord( + null, + userMod.institutionId, + UUID.randomUUID().toString(), + userMod.name, + userMod.userName, + this.userPasswordEncoder.encode(userMod.getNewPassword()), + userMod.email, + userMod.locale.toLanguageTag(), + userMod.timeZone.getID(), + BooleanUtils.toInteger(false)); - this.userRecordMapper.insert(newRecord); - final Long newUserId = newRecord.getId(); - insertRolesForUser(newUserId, userMod.roles); - return byId(newUserId); + this.userRecordMapper.insert(newRecord); + final Long newUserId = newRecord.getId(); + insertRolesForUser(newUserId, userMod.roles); + return newRecord; + + }); } private void updateRolesForUser(final Long userId, @NotNull final Set roles) { @@ -326,18 +298,21 @@ public class UserDaoImpl implements UserDAO { .forEach(roleRecord -> this.roleRecordMapper.insert(roleRecord)); } - private Result recordByUsername(final String username, final Boolean active) { - return Utils.getSingle( + private Result recordByUsername(final String username) { + return getSingleResource( + username, this.userRecordMapper .selectByExample() .where(UserRecordDynamicSqlSupport.userName, isEqualTo(username)) - .and(UserRecordDynamicSqlSupport.active, isEqualToWhenPresent(BooleanUtils.toInteger(active))) + .and(UserRecordDynamicSqlSupport.active, + isEqualToWhenPresent(BooleanUtils.toInteger(true))) .build() .execute()); } private Result recordByUUID(final String uuid) { - return Utils.getSingle( + return getSingleResource( + uuid, this.userRecordMapper .selectByExample() .where(UserRecordDynamicSqlSupport.uuid, isEqualTo(uuid)) @@ -345,16 +320,6 @@ public class UserDaoImpl implements UserDAO { .execute()); } - private Result toDomainModel(final String nameId, final UserRecord record) { - if (record == null) { - return Result.ofError(new ResourceNotFoundException( - EntityType.USER, - String.valueOf(nameId))); - } - - return fromRecord(record); - } - private List getRoles(final UserRecord record) { final List roles = this.roleRecordMapper.selectByExample() .where(RoleRecordDynamicSqlSupport.userId, isEqualTo(record.getId())) @@ -363,9 +328,9 @@ public class UserDaoImpl implements UserDAO { return roles; } - private Result fromRecord(final UserRecord record) { + private Result toDomainModel(final UserRecord record) { - try { + return Result.tryCatch(() -> { final List roles = getRoles(record); Set userRoles = Collections.emptySet(); @@ -376,7 +341,7 @@ public class UserDaoImpl implements UserDAO { .collect(Collectors.toSet()); } - return Result.of(new UserInfo( + return new UserInfo( record.getUuid(), record.getInstitutionId(), record.getName(), @@ -385,15 +350,12 @@ public class UserDaoImpl implements UserDAO { BooleanUtils.toBooleanObject(record.getActive()), Locale.forLanguageTag(record.getLocale()), DateTimeZone.forID(record.getTimezone()), - userRoles)); - - } catch (final Exception e) { - return Result.ofError(e); - } + userRoles); + }); } private Result sebServerUserFromRecord(final UserRecord record) { - return fromRecord(record) + return toDomainModel(record) .map(userInfo -> new SEBServerUser( record.getId(), userInfo, diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/LMSConnectionService.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/LMSConnectionService.java new file mode 100644 index 00000000..b6047bf2 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/LMSConnectionService.java @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2018 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.lms; + +public interface LMSConnectionService { + + LMSConnectionTemplate createConnectionTemplate(Long lmsSetupId); + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/LMSConnectionTemplate.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/LMSConnectionTemplate.java new file mode 100644 index 00000000..a60dd7b2 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/LMSConnectionTemplate.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2018 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.lms; + +import java.util.Collection; + +import ch.ethz.seb.sebserver.gbl.model.institution.CourseData; +import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup; + +public interface LMSConnectionTemplate { + + LmsSetup lmsSetup(); + + Collection courseNames(); + + Collection searchCourses(String name, Long from, Long to); + + CourseData course(String uuid); + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/UserAccountController.java b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/UserAccountController.java index 6069faa2..5e93e145 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/UserAccountController.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/UserAccountController.java @@ -76,12 +76,8 @@ public class UserAccountController { EntityType.USER, PrivilegeType.READ_ONLY); - final UserFilter userFilter = ((institutionId != null) || - (active != null) || - (name != null) || - (userName != null) || - (email != null) || - (locale != null)) + final UserFilter userFilter = (institutionId != null || active != null || name != null || + userName != null || email != null || locale != null) ? new UserFilter(institutionId, name, userName, email, active, locale) : null; diff --git a/src/main/resources/schema-dev.sql b/src/main/resources/schema-dev.sql index 2f91cabc..2d6bb9f6 100644 --- a/src/main/resources/schema-dev.sql +++ b/src/main/resources/schema-dev.sql @@ -10,7 +10,8 @@ DROP TABLE IF EXISTS `institution` ; CREATE TABLE IF NOT EXISTS `institution` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, - `authType` VARCHAR(45) NOT NULL, + `url_suffix` VARCHAR(45) NULL, + `logo_image` MEDIUMTEXT NULL, `active` INT(1) NOT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `name_UNIQUE` (`name` ASC)) diff --git a/src/test/java/ch/ethz/seb/sebserver/gbl/model/user/UserActivityLogTest.java b/src/test/java/ch/ethz/seb/sebserver/gbl/model/user/UserActivityLogTest.java index f6cf6390..2252062e 100644 --- a/src/test/java/ch/ethz/seb/sebserver/gbl/model/user/UserActivityLogTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/gbl/model/user/UserActivityLogTest.java @@ -36,8 +36,7 @@ public class UserActivityLogTest { final String jsonValue = this.jsonMapper.writeValueAsString(testModel); assertEquals( - "{\"id\":\"1\"," - + "\"userUuid\":\"testUser\"," + "{\"userUuid\":\"testUser\"," + "\"timestamp\":123," + "\"activityType\":\"CREATE\"," + "\"entityType\":\"EXAM\"," diff --git a/src/test/java/ch/ethz/seb/sebserver/gbl/util/UtilsTest.java b/src/test/java/ch/ethz/seb/sebserver/gbl/util/UtilsTest.java index d1c570aa..c7fe27b2 100644 --- a/src/test/java/ch/ethz/seb/sebserver/gbl/util/UtilsTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/gbl/util/UtilsTest.java @@ -8,38 +8,15 @@ package ch.ethz.seb.sebserver.gbl.util; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; import java.util.Collection; -import java.util.Collections; import java.util.Set; import org.junit.Test; public class UtilsTest { - @Test - public void testGetSingle() { - final Collection singleCollection = Utils.immutableCollectionOf("ONE"); - final Collection collection = Utils.immutableCollectionOf("ONE", "TWO"); - - final Result r1 = Utils.getSingle(null); - final Result r2 = Utils.getSingle(Collections.emptyList()); - final Result r3 = Utils.getSingle(singleCollection); - final Result r4 = Utils.getSingle(collection); - - assertTrue(r1.hasError()); - assertTrue(r2.hasError()); - assertFalse(r3.hasError()); - assertTrue(r4.hasError()); - - assertEquals("ONE", r3.get()); - assertEquals("Collection has no or more then one element. Expected is exaclty one. Size: null", - r1.getError().getMessage()); - assertEquals("Collection has no or more then one element. Expected is exaclty one. Size: 2", - r4.getError().getMessage()); - } - @Test public void testImmutableCollectionOf() { final Collection r1 = Utils.immutableCollectionOf((String[]) null); diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/UserAPITest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/UserAPITest.java index f3a2c49f..7bef673d 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/UserAPITest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/UserAPITest.java @@ -246,6 +246,65 @@ public class UserAPITest extends AdministrationAPIIntegrationTest { assertEquals(createdUserGet.uuid, userActivityLog.entityId); } +// NOTE: this tests transaction rollback is working but for now only if a runtime exception is thrown on +// UserDaoImpl.updateUser after the main record (UserRecord) is stored but the new roles are not +// updated so far. +// TODO: make this test running separately in an test with UserDaoImpl mockup + +// @Test +// public void modifyUserTestTransaction() throws Exception { +// final String token = getSebAdminAccess(); +// final UserInfo user = this.jsonMapper.readValue( +// this.mockMvc.perform(get(this.endpoint + RestAPI.ENDPOINT_USER_ACCOUNT + "/user7") +// .header("Authorization", "Bearer " + token)) +// .andExpect(status().isOk()) +// .andReturn().getResponse().getContentAsString(), +// new TypeReference() { +// }); +// +// assertNotNull(user); +// assertEquals("User", user.name); +// assertEquals("user1", user.userName); +// assertEquals("user@nomail.nomail", user.email); +// assertEquals("[EXAM_SUPPORTER]", String.valueOf(user.roles)); +// +// // change userName, email and roles +// final UserMod modifyUser = new UserMod(new UserInfo( +// user.getUuid(), +// user.getInstitutionId(), +// user.getName(), +// "newUser1", +// "newUser@nomail.nomail", +// user.getActive(), +// user.getLocale(), +// user.getTimeZone(), +// Stream.of(UserRole.EXAM_ADMIN.name(), UserRole.EXAM_SUPPORTER.name()).collect(Collectors.toSet())), +// null, null); +// final String modifyUserJson = this.jsonMapper.writeValueAsString(modifyUser); +// +// final String contentAsString = this.mockMvc +// .perform(post(this.endpoint + RestAPI.ENDPOINT_USER_ACCOUNT + "/save") +// .header("Authorization", "Bearer " + token) +// .contentType(MediaType.APPLICATION_JSON_UTF8) +// .content(modifyUserJson)) +// .andReturn().getResponse().getContentAsString(); +// +// // double check by getting the user by UUID +// final UserInfo unmodifiedUserResult = this.jsonMapper.readValue( +// this.mockMvc.perform(get(this.endpoint + RestAPI.ENDPOINT_USER_ACCOUNT + "/" + user.uuid) +// .header("Authorization", "Bearer " + token)) +// .andExpect(status().isOk()) +// .andReturn().getResponse().getContentAsString(), +// new TypeReference() { +// }); +// +// assertNotNull(unmodifiedUserResult); +// assertEquals("User", unmodifiedUserResult.name); +// assertEquals("user1", unmodifiedUserResult.userName); +// assertEquals("user@nomail.nomail", unmodifiedUserResult.email); +// assertEquals("[EXAM_SUPPORTER]", String.valueOf(unmodifiedUserResult.roles)); +// } + @Test public void modifyUserTest() throws Exception { final String token = getSebAdminAccess(); @@ -264,7 +323,7 @@ public class UserAPITest extends AdministrationAPIIntegrationTest { assertEquals("[EXAM_SUPPORTER]", String.valueOf(user.roles)); // change userName, email and roles - final UserMod modifiedUser = new UserMod(new UserInfo( + final UserMod modifyUser = new UserMod(new UserInfo( user.getUuid(), user.getInstitutionId(), user.getName(), @@ -275,25 +334,26 @@ public class UserAPITest extends AdministrationAPIIntegrationTest { user.getTimeZone(), Stream.of(UserRole.EXAM_ADMIN.name(), UserRole.EXAM_SUPPORTER.name()).collect(Collectors.toSet())), null, null); - final String modifiedUserJson = this.jsonMapper.writeValueAsString(modifiedUser); + final String modifyUserJson = this.jsonMapper.writeValueAsString(modifyUser); UserInfo modifiedUserResult = this.jsonMapper.readValue( this.mockMvc.perform(post(this.endpoint + RestAPI.ENDPOINT_USER_ACCOUNT + "/save") .header("Authorization", "Bearer " + token) .contentType(MediaType.APPLICATION_JSON_UTF8) - .content(modifiedUserJson)) + .content(modifyUserJson)) .andExpect(status().isOk()) .andReturn().getResponse().getContentAsString(), new TypeReference() { }); assertNotNull(modifiedUserResult); + assertEquals(user.uuid, modifiedUserResult.uuid); assertEquals("User", modifiedUserResult.name); assertEquals("newUser1", modifiedUserResult.userName); assertEquals("newUser@nomail.nomail", modifiedUserResult.email); assertEquals("[EXAM_ADMIN, EXAM_SUPPORTER]", String.valueOf(modifiedUserResult.roles)); - // double check by getting the user by uuis + // double check by getting the user by UUID modifiedUserResult = this.jsonMapper.readValue( this.mockMvc.perform(get(this.endpoint + RestAPI.ENDPOINT_USER_ACCOUNT + "/" + modifiedUserResult.uuid) .header("Authorization", "Bearer " + token)) @@ -519,7 +579,7 @@ public class UserAPITest extends AdministrationAPIIntegrationTest { // With SEB Administrator it should work final String sebAdminToken = getSebAdminAccess(); - final UserInfo deactivatedUser = this.jsonMapper.readValue( + final UserInfo activatedUser = this.jsonMapper.readValue( this.mockMvc.perform(post(this.endpoint + RestAPI.ENDPOINT_USER_ACCOUNT + "/user6/activate") .header("Authorization", "Bearer " + sebAdminToken)) .andExpect(status().isOk()) @@ -527,8 +587,8 @@ public class UserAPITest extends AdministrationAPIIntegrationTest { new TypeReference() { }); - assertNotNull(deactivatedUser); - assertTrue(deactivatedUser.isActive()); + assertNotNull(activatedUser); + assertTrue(activatedUser.isActive()); } private UserInfo getUserInfo(final String name, final Collection infos) { diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/authorization/AuthorizationGrantServiceTest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/authorization/AuthorizationGrantServiceTest.java index 4214bc1f..447a3f83 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/authorization/AuthorizationGrantServiceTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/authorization/AuthorizationGrantServiceTest.java @@ -96,7 +96,7 @@ public class AuthorizationGrantServiceTest { } @Override - public String getId() { + public String getModelId() { return "1"; } diff --git a/src/test/resources/data-test.sql b/src/test/resources/data-test.sql index aab345e1..69a3e22e 100644 --- a/src/test/resources/data-test.sql +++ b/src/test/resources/data-test.sql @@ -1,6 +1,6 @@ INSERT INTO institution VALUES - (1, 'Institution1', 'INTERNAL', 1), - (2, 'Institution2', 'INTERNAL', 1) + (1, 'Institution1', 'inst1', null, 1), + (2, 'Institution2', 'inst2', null, 1) ; INSERT INTO user VALUES diff --git a/src/test/resources/schema-test.sql b/src/test/resources/schema-test.sql index 2f91cabc..2d6bb9f6 100644 --- a/src/test/resources/schema-test.sql +++ b/src/test/resources/schema-test.sql @@ -10,7 +10,8 @@ DROP TABLE IF EXISTS `institution` ; CREATE TABLE IF NOT EXISTS `institution` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, - `authType` VARCHAR(45) NOT NULL, + `url_suffix` VARCHAR(45) NULL, + `logo_image` MEDIUMTEXT NULL, `active` INT(1) NOT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `name_UNIQUE` (`name` ASC))