created exam config properties from

This commit is contained in:
anhefti 2019-04-30 17:09:08 +02:00
parent a7f7920d3e
commit 8bbf515717
149 changed files with 3584 additions and 1402 deletions

View file

@ -80,6 +80,8 @@ public final class API {
public static final String ORIENTATION_ENDPOINT = "/orientation";
public static final String VIEW_ENDPOINT = ORIENTATION_ENDPOINT + "/view";
public static final String EXAM_CONFIGURATION_MAP_ENDPOINT = "/exam_configuration_map";
public static final String USER_ACTIVITY_LOG_ENDPOINT = "/useractivity";

View file

@ -2,10 +2,11 @@ package ch.ethz.seb.sebserver.gbl.api;
import javax.annotation.Generated;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2019-04-23T15:30:54.700+02:00")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2019-04-30T14:19:48.997+02:00")
public enum EntityType {
CONFIGURATION_ATTRIBUTE,
CONFIGURATION_VALUE,
VIEW,
ORIENTATION,
CONFIGURATION,
CONFIGURATION_NODE,

View file

@ -5,7 +5,7 @@ import javax.annotation.Generated;
/** Defines the global names of the domain model and domain model fields.
* This shall be used as a static overall domain model names reference within SEB Server Web-Service as well as within the integrated GUI
* This file is generated by the org.eth.demo.sebserver.gen.DomainModelNameReferencePlugin and must not be edited manually.**/
@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2019-04-23T15:30:54.599+02:00")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2019-04-30T14:19:48.912+02:00")
public interface Domain {
interface CONFIGURATION_ATTRIBUTE {
@ -33,14 +33,22 @@ public interface Domain {
String ATTR_TEXT = "text";
}
interface VIEW {
String TYPE_NAME = "View";
String REFERENCE_NAME = "views";
String ATTR_ID = "id";
String ATTR_NAME = "name";
String ATTR_POSITION = "position";
}
interface ORIENTATION {
String TYPE_NAME = "Orientation";
String REFERENCE_NAME = "orientations";
String ATTR_ID = "id";
String ATTR_CONFIG_ATTRIBUTE_ID = "configAttributeId";
String ATTR_TEMPLATE_ID = "templateId";
String ATTR_VIEW = "view";
String ATTR_GROUP = "group";
String ATTR_VIEW_ID = "viewId";
String ATTR_GROUP_ID = "groupId";
String ATTR_X_POSITION = "xPosition";
String ATTR_Y_POSITION = "yPosition";
String ATTR_WIDTH = "width";
@ -69,7 +77,7 @@ public interface Domain {
String ATTR_NAME = "name";
String ATTR_DESCRIPTION = "description";
String ATTR_TYPE = "type";
String ATTR_ACTIVE = "active";
String ATTR_STATUS = "status";
}
interface EXAM_CONFIGURATION_MAP {

View file

@ -16,6 +16,9 @@ public enum AttributeType {
LABEL(NONE),
/** Single lined text value */
TEXT_FIELD(TEXT),
/** Password (Base 16 encoded SHA256)
* Displayed as two text input fields (confirm) */
PASSWORD_FIELD(TEXT),
/** Multiple lined text value */
TEXT_AREA(TEXT),
/** Check Box or boolean type */

View file

@ -17,23 +17,31 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.api.POSTMapper;
import ch.ethz.seb.sebserver.gbl.model.Activatable;
import ch.ethz.seb.sebserver.gbl.model.Domain;
import ch.ethz.seb.sebserver.gbl.model.Domain.CONFIGURATION_NODE;
import ch.ethz.seb.sebserver.gbl.model.GrantEntity;
@JsonIgnoreProperties(ignoreUnknown = true)
public final class ConfigurationNode implements GrantEntity, Activatable {
public final class ConfigurationNode implements GrantEntity {
public static final Long DEFAULT_TEMPLATE_ID = 0L;
public static final String FILTER_ATTR_TEMPLATE_ID = "templateId";
public static final String FILTER_ATTR_DESCRIPTION = "description";
public static final String FILTER_ATTR_TYPE = "type";
public static final String FILTER_ATTR_STATUS = "status";
public enum ConfigurationType {
TEMPLATE,
EXAM_CONFIG
}
public enum ConfigurationStatus {
CONSTRUCTION,
READY_TO_USE,
IN_USE
}
@JsonProperty(CONFIGURATION_NODE.ATTR_ID)
public final Long id;
@ -59,9 +67,8 @@ public final class ConfigurationNode implements GrantEntity, Activatable {
@JsonProperty(CONFIGURATION_NODE.ATTR_OWNER)
public final String owner;
/** Indicates whether this Configuration is active or not */
@JsonProperty(CONFIGURATION_NODE.ATTR_ACTIVE)
public final Boolean active;
@JsonProperty(CONFIGURATION_NODE.ATTR_STATUS)
public final ConfigurationStatus status;
@JsonCreator
public ConfigurationNode(
@ -72,27 +79,34 @@ public final class ConfigurationNode implements GrantEntity, Activatable {
@JsonProperty(CONFIGURATION_NODE.ATTR_DESCRIPTION) final String description,
@JsonProperty(CONFIGURATION_NODE.ATTR_TYPE) final ConfigurationType type,
@JsonProperty(CONFIGURATION_NODE.ATTR_OWNER) final String owner,
@JsonProperty(CONFIGURATION_NODE.ATTR_ACTIVE) final Boolean active) {
@JsonProperty(CONFIGURATION_NODE.ATTR_STATUS) final ConfigurationStatus status) {
this.id = id;
this.institutionId = institutionId;
this.templateId = templateId;
this.templateId = (templateId != null) ? templateId : DEFAULT_TEMPLATE_ID;
this.name = name;
this.description = description;
this.type = type;
this.owner = owner;
this.active = active;
this.status = status;
}
public ConfigurationNode(final Long institutionId, final POSTMapper postParams) {
this.id = null;
this.institutionId = institutionId;
this.templateId = postParams.getLong(Domain.CONFIGURATION_NODE.ATTR_TEMPLATE_ID);
final Long tplId = postParams.getLong(Domain.CONFIGURATION_NODE.ATTR_TEMPLATE_ID);
this.templateId = (tplId != null) ? tplId : DEFAULT_TEMPLATE_ID;
this.name = postParams.getString(Domain.CONFIGURATION_NODE.ATTR_NAME);
this.description = postParams.getString(Domain.CONFIGURATION_NODE.ATTR_DESCRIPTION);
this.type = postParams.getEnum(Domain.CONFIGURATION_NODE.ATTR_TYPE, ConfigurationType.class);
this.type = postParams.getEnum(
Domain.CONFIGURATION_NODE.ATTR_TYPE,
ConfigurationType.class,
ConfigurationType.EXAM_CONFIG);
this.owner = postParams.getString(Domain.CONFIGURATION_NODE.ATTR_OWNER);
this.active = postParams.getBoolean(Domain.CONFIGURATION_NODE.ATTR_ACTIVE);
this.status = postParams.getEnum(
Domain.CONFIGURATION_NODE.ATTR_STATUS,
ConfigurationStatus.class,
ConfigurationStatus.CONSTRUCTION);
}
@Override
@ -138,22 +152,8 @@ public final class ConfigurationNode implements GrantEntity, Activatable {
return this.templateId;
}
public Boolean getActive() {
return this.active;
}
@Override
public boolean isActive() {
return this.active;
}
@Override
public String toString() {
return "ConfigurationNode [id=" + this.id + ", institutionId=" + this.institutionId + ", templateId="
+ this.templateId
+ ", name=" + this.name + ", description=" + this.description + ", type=" + this.type + ", owner="
+ this.owner
+ ", active=" + this.active + "]";
public ConfigurationStatus getStatus() {
return this.status;
}
public static ConfigurationNode createNewExamConfig(final Long institutionId) {
@ -165,7 +165,7 @@ public final class ConfigurationNode implements GrantEntity, Activatable {
null,
ConfigurationType.EXAM_CONFIG,
null,
false);
ConfigurationStatus.CONSTRUCTION);
}
public static ConfigurationNode createNewTemplate(final Long institutionId) {
@ -177,7 +177,7 @@ public final class ConfigurationNode implements GrantEntity, Activatable {
null,
ConfigurationType.TEMPLATE,
null,
false);
ConfigurationStatus.CONSTRUCTION);
}
}

View file

@ -8,8 +8,6 @@
package ch.ethz.seb.sebserver.gbl.model.sebconfig;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@ -29,7 +27,6 @@ public final class ConfigurationValue implements GrantEntity {
@JsonProperty(CONFIGURATION_VALUE.ATTR_ID)
public final Long id;
@NotNull
@JsonProperty(CONFIGURATION_VALUE.ATTR_INSTITUTION_ID)
public final Long institutionId;
@ -37,7 +34,7 @@ public final class ConfigurationValue implements GrantEntity {
public final Long configurationId;
@JsonProperty(CONFIGURATION_VALUE.ATTR_CONFIGURATION_ATTRIBUTE_ID)
public final long attributeId;
public final Long attributeId;
@JsonProperty(CONFIGURATION_VALUE.ATTR_LIST_INDEX)
public final Integer listIndex;

View file

@ -24,8 +24,8 @@ import ch.ethz.seb.sebserver.gbl.model.Entity;
public final class Orientation implements Entity {
public static final String FILTER_ATTR_TEMPLATE_ID = "templateId";
public static final String FILTER_ATTR_VIEW = "view";
public static final String FILTER_ATTR_GROUP = "group";
public static final String FILTER_ATTR_VIEW_ID = "viewId";
public static final String FILTER_ATTR_GROUP_ID = "groupId";
@JsonProperty(ORIENTATION.ATTR_ID)
public final Long id;
@ -37,11 +37,11 @@ public final class Orientation implements Entity {
@JsonProperty(ORIENTATION.ATTR_TEMPLATE_ID)
public final Long templateId;
@JsonProperty(ORIENTATION.ATTR_VIEW)
public final String view;
@JsonProperty(ORIENTATION.ATTR_VIEW_ID)
public final Long viewId;
@JsonProperty(ORIENTATION.ATTR_GROUP)
public final String group;
@JsonProperty(ORIENTATION.ATTR_GROUP_ID)
public final String groupId;
@JsonProperty(ORIENTATION.ATTR_X_POSITION)
public final Integer xPosition;
@ -63,8 +63,8 @@ public final class Orientation implements Entity {
@JsonProperty(ORIENTATION.ATTR_ID) final Long id,
@JsonProperty(ORIENTATION.ATTR_CONFIG_ATTRIBUTE_ID) final Long attributeId,
@JsonProperty(ORIENTATION.ATTR_TEMPLATE_ID) final Long templateId,
@JsonProperty(ORIENTATION.ATTR_VIEW) final String view,
@JsonProperty(ORIENTATION.ATTR_GROUP) final String group,
@JsonProperty(ORIENTATION.ATTR_VIEW_ID) final Long viewId,
@JsonProperty(ORIENTATION.ATTR_GROUP_ID) final String groupId,
@JsonProperty(ORIENTATION.ATTR_X_POSITION) final Integer xPosition,
@JsonProperty(ORIENTATION.ATTR_Y_POSITION) final Integer yPosition,
@JsonProperty(ORIENTATION.ATTR_WIDTH) final Integer width,
@ -74,8 +74,8 @@ public final class Orientation implements Entity {
this.id = id;
this.attributeId = attributeId;
this.templateId = templateId;
this.view = view;
this.group = group;
this.viewId = viewId;
this.groupId = groupId;
this.xPosition = xPosition;
this.yPosition = yPosition;
this.width = width;
@ -87,8 +87,8 @@ public final class Orientation implements Entity {
this.id = null;
this.attributeId = attr.id;
this.templateId = postParams.getLong(Domain.ORIENTATION.ATTR_TEMPLATE_ID);
this.view = postParams.getString(Domain.ORIENTATION.ATTR_VIEW);
this.group = postParams.getString(Domain.ORIENTATION.ATTR_GROUP);
this.viewId = postParams.getLong(Domain.ORIENTATION.ATTR_VIEW_ID);
this.groupId = postParams.getString(Domain.ORIENTATION.ATTR_GROUP_ID);
this.xPosition = postParams.getInteger(Domain.ORIENTATION.ATTR_X_POSITION);
this.yPosition = postParams.getInteger(Domain.ORIENTATION.ATTR_Y_POSITION);
this.width = postParams.getInteger(Domain.ORIENTATION.ATTR_WIDTH);
@ -128,12 +128,12 @@ public final class Orientation implements Entity {
return this.templateId;
}
public String getView() {
return this.view;
public Long getViewId() {
return this.viewId;
}
public String getGroup() {
return this.group;
public String getGroupId() {
return this.groupId;
}
public Integer getXPosition() {
@ -156,13 +156,28 @@ public final class Orientation implements Entity {
return this.title;
}
public int xpos() {
return this.xPosition != null ? this.xPosition.intValue() : -1;
}
public int ypos() {
return this.yPosition != null ? this.yPosition.intValue() : -1;
}
public int width() {
return this.width != null ? this.width.intValue() : -1;
}
public int height() {
return this.height != null ? this.height.intValue() : -1;
}
@Override
public String toString() {
return "Orientation [id=" + this.id + ", attributeId=" + this.attributeId + ", templateId=" + this.templateId
+ ", view="
+ this.view + ", group=" + this.group + ", xPosition=" + this.xPosition + ", yPosition="
+ ", viewId="
+ this.viewId + ", groupId=" + this.groupId + ", xPosition=" + this.xPosition + ", yPosition="
+ this.yPosition + ", width="
+ this.width + ", height=" + this.height + ", title=" + this.title + "]";
}
}

View file

@ -0,0 +1,89 @@
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package ch.ethz.seb.sebserver.gbl.model.sebconfig;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.api.POSTMapper;
import ch.ethz.seb.sebserver.gbl.model.Domain;
import ch.ethz.seb.sebserver.gbl.model.Domain.VIEW;
import ch.ethz.seb.sebserver.gbl.model.Entity;
@JsonIgnoreProperties(ignoreUnknown = true)
public class View implements Entity {
@JsonProperty(VIEW.ATTR_ID)
public final Long id;
@JsonProperty(VIEW.ATTR_NAME)
public final String name;
@NotNull
@JsonProperty(VIEW.ATTR_POSITION)
public final Integer position;
public View(
@JsonProperty(VIEW.ATTR_ID) final Long id,
@JsonProperty(VIEW.ATTR_NAME) final String name,
@JsonProperty(VIEW.ATTR_POSITION) final Integer position) {
this.id = id;
this.name = name;
this.position = position;
}
public View(final POSTMapper postParams) {
this.id = null;
this.name = postParams.getString(Domain.VIEW.ATTR_NAME);
this.position = postParams.getInteger(Domain.VIEW.ATTR_POSITION);
}
public Integer getPosition() {
return this.position;
}
public Long getId() {
return this.id;
}
@Override
public String getModelId() {
return (this.id != null)
? String.valueOf(this.id)
: null;
}
@Override
public EntityType entityType() {
return EntityType.VIEW;
}
@Override
public String getName() {
return this.name;
}
@Override
public String toString() {
final StringBuilder builder = new StringBuilder();
builder.append("View [id=");
builder.append(this.id);
builder.append(", name=");
builder.append(this.name);
builder.append(", position=");
builder.append(this.position);
builder.append("]");
return builder.toString();
}
}

View file

@ -230,7 +230,7 @@ public final class Result<T> {
*
* @param errorHandler the error handler
* @return self reference */
public Result<T> onErrorDo(final Consumer<Throwable> errorHandler) {
public Result<T> onError(final Consumer<Throwable> errorHandler) {
if (this.error != null) {
errorHandler.accept(this.error);
}

View file

@ -62,6 +62,10 @@ public final class Utils {
});
}
public static <T> T toSingleton(final Collection<T> collection) {
return collection.stream().collect(toSingleton());
}
/** Get an immutable List from a Collection of elements
*
* @param collection Collection of elements

View file

@ -332,7 +332,7 @@ public class ExamForm implements TemplateComposer {
}
return this.resourceService.getI18nSupport()
.getText("sebserver.exam.indicator.type." + indicator.type.name());
.getText(ResourceService.EXAM_INDICATOR_TYPE_PREFIX + indicator.type.name());
}
private static String thresholdsValue(final Indicator indicator) {

View file

@ -35,7 +35,7 @@ import ch.ethz.seb.sebserver.gui.service.page.PageService.PageActionBuilder;
import ch.ethz.seb.sebserver.gui.service.page.TemplateComposer;
import ch.ethz.seb.sebserver.gui.service.page.impl.PageAction;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.exam.GetExams;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.exam.GetExamPage;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser.GrantCheck;
import ch.ethz.seb.sebserver.gui.table.ColumnDefinition;
@ -63,6 +63,8 @@ public class ExamList implements TemplateComposer {
new LocTextKey("sebserver.exam.list.column.type");
private final static LocTextKey noModifyOfOutDatedExams =
new LocTextKey("sebserver.exam.list.modify.out.dated");
private final static LocTextKey emptyListTextKey =
new LocTextKey("sebserver.exam.list.empty");
private final TableFilterAttribute lmsFilter;
private final TableFilterAttribute nameFilter =
@ -102,8 +104,8 @@ public class ExamList implements TemplateComposer {
// table
final EntityTable<Exam> table =
this.pageService.entityTableBuilder(restService.getRestCall(GetExams.class))
.withEmptyMessage(new LocTextKey("sebserver.exam.list.empty"))
this.pageService.entityTableBuilder(restService.getRestCall(GetExamPage.class))
.withEmptyMessage(emptyListTextKey)
.withPaging(this.pageSize)
.withColumn(new ColumnDefinition<>(
Domain.EXAM.ATTR_LMS_SETUP_ID,
@ -179,7 +181,7 @@ public class ExamList implements TemplateComposer {
}
return this.resourceService.getI18nSupport()
.getText("sebserver.exam.type." + exam.type.name());
.getText(ResourceService.EXAM_TYPE_PREFIX + exam.type.name());
}
}

View file

@ -19,6 +19,7 @@ import ch.ethz.seb.sebserver.gbl.model.Domain;
import ch.ethz.seb.sebserver.gbl.model.EntityKey;
import ch.ethz.seb.sebserver.gbl.model.exam.Exam;
import ch.ethz.seb.sebserver.gbl.model.exam.Indicator;
import ch.ethz.seb.sebserver.gbl.model.exam.QuizData;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.form.FormBuilder;
@ -120,7 +121,7 @@ public class IndicatorForm implements TemplateComposer {
Domain.INDICATOR.ATTR_EXAM_ID,
parentEntityKey.getModelId())
.addField(FormBuilder.text(
"examName",
QuizData.QUIZ_ATTR_NAME,
FORM_EXAM_TEXT_KEY,
exam.name)
.readonly(true))

View file

@ -24,7 +24,7 @@ import ch.ethz.seb.sebserver.gui.service.page.PageService.PageActionBuilder;
import ch.ethz.seb.sebserver.gui.service.page.TemplateComposer;
import ch.ethz.seb.sebserver.gui.service.page.impl.PageAction;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.institution.GetInstitutions;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.institution.GetInstitutionPage;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser.GrantCheck;
import ch.ethz.seb.sebserver.gui.table.ColumnDefinition;
@ -73,7 +73,7 @@ public class InstitutionList implements TemplateComposer {
// table
final EntityTable<Institution> table =
this.pageService.entityTableBuilder(this.restService.getRestCall(GetInstitutions.class))
this.pageService.entityTableBuilder(this.restService.getRestCall(GetInstitutionPage.class))
.withEmptyMessage(EMPTY_LIST_TEXT_KEY)
.withPaging(3)
.withColumn(new ColumnDefinition<>(

View file

@ -246,7 +246,7 @@ public class LmsSetupForm implements TemplateComposer {
API.PARAM_MODEL_ID,
action.pageContext().getAttribute(AttributeKeys.ENTITY_ID))
.call()
.onErrorDo(t -> action.pageContext().notifyError(t));
.onError(t -> action.pageContext().notifyError(t));
return testLmsSetup;
}

View file

@ -31,7 +31,7 @@ import ch.ethz.seb.sebserver.gui.service.page.PageService.PageActionBuilder;
import ch.ethz.seb.sebserver.gui.service.page.TemplateComposer;
import ch.ethz.seb.sebserver.gui.service.page.impl.PageAction;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.lmssetup.GetLmsSetups;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.lmssetup.GetLmsSetupPage;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser.GrantCheck;
import ch.ethz.seb.sebserver.gui.table.ColumnDefinition;
@ -105,7 +105,7 @@ public class LmsSetupList implements TemplateComposer {
// table
final EntityTable<LmsSetup> table =
this.pageService.entityTableBuilder(restService.getRestCall(GetLmsSetups.class))
this.pageService.entityTableBuilder(restService.getRestCall(GetLmsSetupPage.class))
.withEmptyMessage(EMPTY_LIST_TEXT_KEY)
.withPaging(this.pageSize)
.withColumnIf(
@ -161,7 +161,7 @@ public class LmsSetupList implements TemplateComposer {
}
return this.resourceService.getI18nSupport()
.getText("sebserver.lmssetup.type." + lmsSetup.lmsType.name());
.getText(ResourceService.LMSSETUP_TYPE_PREFIX + lmsSetup.lmsType.name());
}
private static Function<LmsSetup, String> lmsSetupInstitutionNameFunction(final ResourceService resourceService) {

View file

@ -36,7 +36,7 @@ import ch.ethz.seb.sebserver.gui.service.page.TemplateComposer;
import ch.ethz.seb.sebserver.gui.service.page.impl.ModalInputDialog;
import ch.ethz.seb.sebserver.gui.service.page.impl.PageAction;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.quiz.GetQuizzes;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.quiz.GetQuizPage;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser.GrantCheck;
import ch.ethz.seb.sebserver.gui.table.ColumnDefinition;
@ -122,7 +122,7 @@ public class QuizDiscoveryList implements TemplateComposer {
// table
final EntityTable<QuizData> table =
this.pageService.entityTableBuilder(restService.getRestCall(GetQuizzes.class))
this.pageService.entityTableBuilder(restService.getRestCall(GetQuizPage.class))
.withEmptyMessage(EMPTY_LIST_TEXT_KEY)
.withPaging(this.pageSize)
.withColumn(new ColumnDefinition<>(

View file

@ -34,7 +34,7 @@ import ch.ethz.seb.sebserver.gui.service.page.PageService.PageActionBuilder;
import ch.ethz.seb.sebserver.gui.service.page.TemplateComposer;
import ch.ethz.seb.sebserver.gui.service.page.impl.PageAction;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.GetClientConfigs;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.GetClientConfigPage;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser.GrantCheck;
import ch.ethz.seb.sebserver.gui.table.ColumnDefinition;
@ -107,7 +107,7 @@ public class SebClientConfigList implements TemplateComposer {
// table
final EntityTable<SebClientConfig> table =
this.pageService.entityTableBuilder(this.restService.getRestCall(GetClientConfigs.class))
this.pageService.entityTableBuilder(this.restService.getRestCall(GetClientConfigPage.class))
.withEmptyMessage(EMPTY_LIST_TEXT_KEY)
.withPaging(this.pageSize)
.withColumnIf(

View file

@ -24,14 +24,12 @@ import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.form.FormBuilder;
import ch.ethz.seb.sebserver.gui.form.FormHandle;
import ch.ethz.seb.sebserver.gui.service.ResourceService;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
import ch.ethz.seb.sebserver.gui.service.page.PageContext;
import ch.ethz.seb.sebserver.gui.service.page.PageService;
import ch.ethz.seb.sebserver.gui.service.page.TemplateComposer;
import ch.ethz.seb.sebserver.gui.service.page.impl.PageUtils;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.ActivateExamConfig;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.DeactivateExamConfig;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetExamConfigNode;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.NewExamConfig;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.SaveExamConfig;
@ -54,6 +52,8 @@ public class SebExamConfigForm implements TemplateComposer {
new LocTextKey("sebserver.examconfig.form.name");
private static final LocTextKey FORM_DESCRIPTION_TEXT_KEY =
new LocTextKey("sebserver.examconfig.form.description");
private static final LocTextKey FORM_STATUS_TEXT_KEY =
new LocTextKey("sebserver.examconfig.form.status");
private final PageService pageService;
private final RestService restService;
@ -72,6 +72,7 @@ public class SebExamConfigForm implements TemplateComposer {
@Override
public void compose(final PageContext pageContext) {
final WidgetFactory widgetFactory = this.pageService.getWidgetFactory();
final ResourceService resourceService = this.pageService.getResourceService();
final UserInfo user = this.currentUser.get();
final EntityKey entityKey = pageContext.getEntityKey();
@ -134,6 +135,11 @@ public class SebExamConfigForm implements TemplateComposer {
Domain.CONFIGURATION_NODE.ATTR_DESCRIPTION,
FORM_DESCRIPTION_TEXT_KEY,
examConfig.description).asArea())
.addField(FormBuilder.singleSelection(
Domain.CONFIGURATION_NODE.ATTR_STATUS,
FORM_STATUS_TEXT_KEY,
examConfig.status.name(),
resourceService::examConfigStatusResources))
.buildFor((isNew)
? this.restService.getRestCall(NewExamConfig.class)
: this.restService.getRestCall(SaveExamConfig.class));
@ -147,17 +153,6 @@ public class SebExamConfigForm implements TemplateComposer {
.withEntityKey(entityKey)
.publishIf(() -> modifyGrant && isReadonly)
.newAction(ActionDefinition.SEB_EXAM_CONFIG_DEACTIVATE)
.withEntityKey(entityKey)
.withSimpleRestCall(this.restService, DeactivateExamConfig.class)
.withConfirm(PageUtils.confirmDeactivation(examConfig, this.restService))
.publishIf(() -> writeGrant && isReadonly && examConfig.isActive())
.newAction(ActionDefinition.SEB_EXAM_CONFIG_ACTIVATE)
.withEntityKey(entityKey)
.withSimpleRestCall(this.restService, ActivateExamConfig.class)
.publishIf(() -> writeGrant && isReadonly && !examConfig.isActive())
.newAction(ActionDefinition.SEB_EXAM_CONFIG_SAVE)
.withEntityKey(entityKey)
.withExec(formHandle::processFormSave)

View file

@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import ch.ethz.seb.sebserver.gbl.Constants;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.model.Domain;
import ch.ethz.seb.sebserver.gbl.model.Entity;
@ -30,7 +31,7 @@ import ch.ethz.seb.sebserver.gui.service.page.PageService.PageActionBuilder;
import ch.ethz.seb.sebserver.gui.service.page.TemplateComposer;
import ch.ethz.seb.sebserver.gui.service.page.impl.PageAction;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetExamConfigNodes;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetExamConfigNodePage;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser.GrantCheck;
import ch.ethz.seb.sebserver.gui.table.ColumnDefinition;
@ -53,14 +54,15 @@ public class SebExamConfigList implements TemplateComposer {
new LocTextKey("sebserver.examconfig.list.column.name");
private static final LocTextKey DESCRIPTION_TEXT_KEY =
new LocTextKey("sebserver.examconfig.list.column.description");
private static final LocTextKey ACTIVE_TEXT_KEY =
new LocTextKey("sebserver.examconfig.list.column.active");
private static final LocTextKey STATUS_TEXT_KEY =
new LocTextKey("sebserver.examconfig.list.column.status");
private static final LocTextKey EMPTY_SELECTION_TEXT_KEY =
new LocTextKey("sebserver.examconfig.info.pleaseSelect");
private final TableFilterAttribute institutionFilter;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, Entity.FILTER_ATTR_NAME);
private final TableFilterAttribute statusFilter;
private final PageService pageService;
private final RestService restService;
@ -84,6 +86,11 @@ public class SebExamConfigList implements TemplateComposer {
CriteriaType.SINGLE_SELECTION,
Entity.FILTER_ATTR_INSTITUTION,
this.resourceService::institutionResource);
this.statusFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
ConfigurationNode.FILTER_ATTR_STATUS,
this.resourceService::examConfigStatusResources);
}
@Override
@ -99,7 +106,7 @@ public class SebExamConfigList implements TemplateComposer {
// table
final EntityTable<ConfigurationNode> table =
this.pageService.entityTableBuilder(this.restService.getRestCall(GetExamConfigNodes.class))
this.pageService.entityTableBuilder(this.restService.getRestCall(GetExamConfigNodePage.class))
.withEmptyMessage(EMPTY_LIST_TEXT_KEY)
.withPaging(this.pageSize)
.withColumnIf(
@ -123,9 +130,10 @@ public class SebExamConfigList implements TemplateComposer {
this.nameFilter,
true))
.withColumn(new ColumnDefinition<>(
Domain.CONFIGURATION_NODE.ATTR_ACTIVE,
ACTIVE_TEXT_KEY,
entity -> entity.active,
Domain.CONFIGURATION_NODE.ATTR_STATUS,
STATUS_TEXT_KEY,
this::examConfigStatusName,
this.statusFilter,
true))
.withDefaultAction(pageActionBuilder
.newAction(ActionDefinition.SEB_EXAM_CONFIG_VIEW_FROM_LIST)
@ -159,4 +167,13 @@ public class SebExamConfigList implements TemplateComposer {
.apply(String.valueOf(config.institutionId));
}
private String examConfigStatusName(final ConfigurationNode config) {
if (config.status == null) {
return Constants.EMPTY_NOTE;
}
return this.resourceService.getI18nSupport()
.getText(ResourceService.EXAMCONFIG_STATUS_PREFIX + config.status.name());
}
}

View file

@ -8,25 +8,124 @@
package ch.ethz.seb.sebserver.gui.content;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import ch.ethz.seb.sebserver.gbl.Constants;
import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.model.EntityKey;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.View;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.service.examconfig.ExamConfigurationService;
import ch.ethz.seb.sebserver.gui.service.examconfig.impl.AttributeMapping;
import ch.ethz.seb.sebserver.gui.service.examconfig.impl.ViewContext;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
import ch.ethz.seb.sebserver.gui.service.page.PageContext;
import ch.ethz.seb.sebserver.gui.service.page.PageService;
import ch.ethz.seb.sebserver.gui.service.page.TemplateComposer;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetConfigurations;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetExamConfigNode;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser;
import ch.ethz.seb.sebserver.gui.widget.WidgetFactory;
@Lazy
@Component
@GuiProfile
public class SebExamConfigPropertiesForm implements TemplateComposer {
public SebExamConfigPropertiesForm() {
// TODO Auto-generated constructor stub
private static final String VIEW_TEXT_KEY_PREFIX = "sebserver.examconfig.props.form.views.";
private static final String VIEW_TOOLTIP_TEXT_KEY_PREFIX = "tooltip";
private static final LocTextKey TITLE_TEXT_KEY =
new LocTextKey("sebserver.examconfig.props.from.title");
private final PageService pageService;
private final RestService restService;
private final CurrentUser currentUser;
private final ExamConfigurationService examConfigurationService;
protected SebExamConfigPropertiesForm(
final PageService pageService,
final RestService restService,
final CurrentUser currentUser,
final ExamConfigurationService examConfigurationService) {
this.pageService = pageService;
this.restService = restService;
this.currentUser = currentUser;
this.examConfigurationService = examConfigurationService;
}
@Override
public void compose(final PageContext pageContext) {
// TODO Auto-generated method stub
final WidgetFactory widgetFactory = this.pageService.getWidgetFactory();
final EntityKey entityKey = pageContext.getEntityKey();
final EntityKey parentEntityKey = pageContext.getParentEntityKey();
final ConfigurationNode configNode = this.restService.getBuilder(GetExamConfigNode.class)
.withURIVariable(API.PARAM_MODEL_ID, entityKey.modelId)
.call()
.onError(pageContext::notifyError)
.getOrThrow();
final Configuration configuration = this.restService.getBuilder(GetConfigurations.class)
.withQueryParam(Configuration.FILTER_ATTR_CONFIGURATION_NODE_ID, configNode.getModelId())
.withQueryParam(Configuration.FILTER_ATTR_FOLLOWUP, Constants.TRUE_STRING)
.call()
.map(Utils::toSingleton)
.onError(pageContext::notifyError)
.getOrThrow();
final Composite content = widgetFactory.defaultPageLayout(
pageContext.getParent(),
TITLE_TEXT_KEY);
final AttributeMapping attributes = this.examConfigurationService
.getAttributes(configNode.templateId)
.onError(pageContext::notifyError)
.getOrThrow();
final List<View> views = this.examConfigurationService.getViews(attributes);
final TabFolder tabFolder = widgetFactory.tabFolderLocalized(content);
tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
final List<ViewContext> viewContexts = new ArrayList<>();
for (final View view : views) {
final ViewContext viewContext = this.examConfigurationService.createViewContext(
pageContext,
configuration,
view,
attributes,
4,
20);
viewContexts.add(viewContext);
final Composite viewGrid = this.examConfigurationService.createViewGrid(
tabFolder,
viewContext);
final TabItem tabItem = widgetFactory.tabItemLocalized(
tabFolder,
new LocTextKey(VIEW_TEXT_KEY_PREFIX + view.name),
new LocTextKey(VIEW_TEXT_KEY_PREFIX + view.name + VIEW_TOOLTIP_TEXT_KEY_PREFIX));
tabItem.setControl(viewGrid);
}
this.examConfigurationService.initInputFieldValues(configuration.id, viewContexts);
}

View file

@ -32,7 +32,7 @@ import ch.ethz.seb.sebserver.gui.service.page.PageService.PageActionBuilder;
import ch.ethz.seb.sebserver.gui.service.page.TemplateComposer;
import ch.ethz.seb.sebserver.gui.service.page.impl.PageAction;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.GetUserAccounts;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.GetUserAccountPage;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser.GrantCheck;
import ch.ethz.seb.sebserver.gui.table.ColumnDefinition;
@ -114,7 +114,7 @@ public class UserAccountList implements TemplateComposer {
// table
final EntityTable<UserInfo> table = this.pageService.entityTableBuilder(
restService.getRestCall(GetUserAccounts.class))
restService.getRestCall(GetUserAccountPage.class))
.withEmptyMessage(new LocTextKey("sebserver.useraccount.list.empty"))
.withPaging(this.pageSize)

View file

@ -333,21 +333,11 @@ public enum ActionDefinition {
ImageIcon.SAVE,
PageStateDefinition.SEB_EXAM_CONFIG_VIEW,
ActionCategory.FORM),
SEB_EXAM_CONFIG_ACTIVATE(
new LocTextKey("sebserver.examconfig.action.activate"),
ImageIcon.INACTIVE,
PageStateDefinition.SEB_EXAM_CONFIG_VIEW,
ActionCategory.FORM),
SEB_EXAM_CONFIG_DEACTIVATE(
new LocTextKey("sebserver.examconfig.action.deactivate"),
ImageIcon.ACTIVE,
PageStateDefinition.SEB_EXAM_CONFIG_VIEW,
ActionCategory.FORM),
SEB_EXAM_CONFIG_MODIFY_PROPERTIES_FROM_LIST(
new LocTextKey("sebserver.examconfig.properties.action.list.modify"),
new LocTextKey("sebserver.examconfig.props.action.list.modify"),
ImageIcon.EDIT,
PageStateDefinition.SEB_EXAM_CONFIG_EDIT,
PageStateDefinition.SEB_EXAM_CONFIG_PROPERTIES_EDIT,
ActionCategory.SEB_EXAM_CONFIG_LIST),
;

View file

@ -58,7 +58,6 @@ public enum PageStateDefinition implements PageState {
SEB_EXAM_CONFIG_LIST(Type.LIST_VIEW, SebExamConfigList.class, ActivityDefinition.SEB_EXAM_CONFIG),
SEB_EXAM_CONFIG_VIEW(Type.FORM_VIEW, SebExamConfigForm.class, ActivityDefinition.SEB_EXAM_CONFIG),
SEB_EXAM_CONFIG_EDIT(Type.FORM_EDIT, SebExamConfigForm.class, ActivityDefinition.SEB_EXAM_CONFIG),
SEB_EXAM_CONFIG_PROPERTIES_EDIT(Type.FORM_VIEW, SebExamConfigPropertiesForm.class,
ActivityDefinition.SEB_EXAM_CONFIG),

View file

@ -108,7 +108,7 @@ public class FormHandle<T extends Entity> {
return resultAction;
})
.onErrorDo(this::handleError)
.onError(this::handleError)
.getOrThrow();
}

View file

@ -27,6 +27,7 @@ import ch.ethz.seb.sebserver.gbl.model.Entity;
import ch.ethz.seb.sebserver.gbl.model.exam.Exam.ExamType;
import ch.ethz.seb.sebserver.gbl.model.exam.Indicator.IndicatorType;
import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup.LmsType;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode.ConfigurationStatus;
import ch.ethz.seb.sebserver.gbl.model.user.UserInfo;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
@ -46,6 +47,11 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser;
* combo-box content. */
public class ResourceService {
public static final String EXAMCONFIG_STATUS_PREFIX = "sebserver.examconfig.status.";
public static final String EXAM_TYPE_PREFIX = "sebserver.exam.type.";
public static final String USERACCOUNT_ROLE_PREFIX = "sebserver.useraccount.role.";
public static final String EXAM_INDICATOR_TYPE_PREFIX = "sebserver.exam.indicator.type.";
public static final String LMSSETUP_TYPE_PREFIX = "sebserver.lmssetup.type.";
public static final LocTextKey ACTIVE_TEXT_KEY = new LocTextKey("sebserver.overall.status.active");
public static final LocTextKey INACTIVE_TEXT_KEY = new LocTextKey("sebserver.overall.status.inactive");
@ -86,7 +92,7 @@ public class ResourceService {
.stream()
.map(lmsType -> new Tuple<>(
lmsType.name(),
this.i18nSupport.getText("sebserver.lmssetup.type." + lmsType.name())))
this.i18nSupport.getText(LMSSETUP_TYPE_PREFIX + lmsType.name())))
.collect(Collectors.toList());
}
@ -95,7 +101,7 @@ public class ResourceService {
.stream()
.map(type -> new Tuple<>(
type.name(),
this.i18nSupport.getText("sebserver.exam.indicator.type." + type.name())))
this.i18nSupport.getText(EXAM_INDICATOR_TYPE_PREFIX + type.name())))
.collect(Collectors.toList());
}
@ -104,7 +110,7 @@ public class ResourceService {
.stream()
.map(ur -> new Tuple<>(
ur.name(),
this.i18nSupport.getText("sebserver.useraccount.role." + ur.name())))
this.i18nSupport.getText(USERACCOUNT_ROLE_PREFIX + ur.name())))
.collect(Collectors.toList());
}
@ -198,7 +204,16 @@ public class ResourceService {
.stream()
.map(type -> new Tuple<>(
type.name(),
this.i18nSupport.getText("sebserver.exam.type." + type.name())))
this.i18nSupport.getText(EXAM_TYPE_PREFIX + type.name())))
.collect(Collectors.toList());
}
public List<Tuple<String>> examConfigStatusResources() {
return Arrays.asList(ConfigurationStatus.values())
.stream()
.map(type -> new Tuple<>(
type.name(),
this.i18nSupport.getText(EXAMCONFIG_STATUS_PREFIX + type.name())))
.collect(Collectors.toList());
}

View file

@ -8,40 +8,50 @@
package ch.ethz.seb.sebserver.gui.service.examconfig;
import java.util.Collection;
import java.util.List;
import org.eclipse.swt.widgets.Composite;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Orientation;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.View;
import ch.ethz.seb.sebserver.gbl.util.Result;
import ch.ethz.seb.sebserver.gui.service.examconfig.impl.AttributeMapping;
import ch.ethz.seb.sebserver.gui.service.examconfig.impl.ViewContext;
import ch.ethz.seb.sebserver.gui.service.page.PageContext;
import ch.ethz.seb.sebserver.gui.widget.WidgetFactory;
public interface ExamConfigurationService {
AttributeMapping getAttributes(String template);
public static final String ATTRIBUTE_LABEL_LOC_TEXT_PREFIX = "sebserver.examconfig.props.label.";
public static final String GROUP_LABEL_LOC_TEXT_PREFIX = "sebserver.examconfig.props.group.";
default ViewContext createViewContext(
final String template,
final Composite parent,
final String name,
final String configurationId,
final int columns,
final int rows) {
WidgetFactory getWidgetFactory();
return createViewContext(
getAttributes(template),
parent,
name,
configurationId,
columns,
rows);
}
InputFieldBuilder getInputFieldBuilder(
ConfigurationAttribute attribute,
Orientation orientation);
Result<AttributeMapping> getAttributes(Long templateId);
List<View> getViews(AttributeMapping allAttributes);
ViewContext createViewContext(
final AttributeMapping attributeMapping,
final Composite parent,
final String name,
final String configurationId,
final int columns,
final int rows);
PageContext pageContext,
Configuration configuration,
View view,
AttributeMapping attributeMapping,
int columns,
int rows);
ViewContext initInputFieldValues(final ViewContext viewContext);
Composite createViewGrid(
Composite parent,
ViewContext viewContext);
void initInputFieldValues(
Long configurationId,
Collection<ViewContext> viewContexts);
}

View file

@ -8,14 +8,17 @@
package ch.ethz.seb.sebserver.gui.service.examconfig;
import java.util.Set;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue;
import ch.ethz.seb.sebserver.gui.service.examconfig.impl.ViewContext;
public interface ValueChangeRule {
Set<String> observedAttributeNames();
boolean observesAttribute(ConfigurationAttribute attribute);
void applyRule(ViewContext context, String attributeName, String value);
void applyRule(
ViewContext context,
ConfigurationAttribute attribut,
ConfigurationValue value);
}

View file

@ -9,8 +9,10 @@
package ch.ethz.seb.sebserver.gui.service.examconfig.impl;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -22,7 +24,7 @@ import ch.ethz.seb.sebserver.gbl.util.Utils;
public class AttributeMapping {
public final String template;
public final Long templateId;
public final Map<Long, ConfigurationAttribute> attributeIdMapping;
public final Map<String, Long> attributeNameIdMapping;
@ -34,11 +36,15 @@ public class AttributeMapping {
public final Map<String, List<ConfigurationAttribute>> attributeGroupMapping;
AttributeMapping(
final String template,
final Long templateId,
final Collection<ConfigurationAttribute> attributes,
final Collection<Orientation> orientations) {
this.template = template;
Objects.requireNonNull(templateId);
Objects.requireNonNull(attributes);
Objects.requireNonNull(orientations);
this.templateId = templateId;
this.attributeIdMapping = Utils.immutableMapOf(attributes
.stream()
.collect(Collectors.toMap(
@ -71,7 +77,7 @@ public class AttributeMapping {
this.attributeGroupMapping = Utils.immutableMapOf(orientations
.stream()
.map(o -> o.group)
.map(o -> o.groupId)
.collect(Collectors.toSet())
.stream()
.collect(Collectors.toMap(
@ -79,10 +85,18 @@ public class AttributeMapping {
this::getAttributesOfGroup)));
}
public Collection<ConfigurationAttribute> getAttributes() {
return Collections.unmodifiableCollection(this.attributeIdMapping.values());
}
public ConfigurationAttribute getAttribute(final Long attributeId) {
return this.attributeIdMapping.get(attributeId);
}
public Orientation getOrientation(final Long attributeId) {
return this.orientationAttributeMapping.get(attributeId);
}
public Orientation getOrientation(final String attributeName) {
return this.orientationAttributeNameMapping.get(attributeName);
}
@ -91,21 +105,21 @@ public class AttributeMapping {
return this.attributeIdMapping.get(this.attributeNameIdMapping.get(attributeName));
}
public List<ConfigurationAttribute> getAttributes(final String view) {
if (StringUtils.isBlank(view)) {
public List<ConfigurationAttribute> getAttributes(final Long viewId) {
if (viewId == null) {
return Utils.immutableListOf(this.attributeIdMapping.values());
} else {
return Utils.immutableListOf(this.attributeIdMapping
.values()
.stream()
.filter(attr -> this.orientationAttributeMapping.containsKey(attr.id)
&& view.equals(this.orientationAttributeMapping.get(attr.id).view))
&& viewId.equals(this.orientationAttributeMapping.get(attr.id).viewId))
.collect(Collectors.toList()));
}
}
public List<String> getAttributeNames(final String view) {
if (StringUtils.isBlank(view)) {
public List<String> getAttributeNames(final Long viewId) {
if (viewId == null) {
return Utils.immutableListOf(this.attributeIdMapping
.values()
.stream()
@ -116,12 +130,36 @@ public class AttributeMapping {
.values()
.stream()
.filter(attr -> this.orientationAttributeMapping.containsKey(attr.id)
&& view.equals(this.orientationAttributeMapping.get(attr.id).view))
&& viewId.equals(this.orientationAttributeMapping.get(attr.id).viewId))
.map(attr -> attr.name)
.collect(Collectors.toList()));
}
}
public Collection<Long> getViewIds() {
return this.orientationAttributeMapping.values()
.stream()
.map(o -> o.viewId)
.collect(Collectors.toSet());
}
public Collection<Orientation> getOrientationsOfGroup(final ConfigurationAttribute attribute) {
final Orientation orientation = this.orientationAttributeMapping.get(attribute.id);
if (orientation == null) {
return Collections.emptyList();
}
if (StringUtils.isBlank(orientation.groupId)) {
return Collections.emptyList();
}
return Collections.unmodifiableCollection(this.orientationAttributeMapping
.values()
.stream()
.filter(o -> orientation.groupId.equals(o.groupId))
.collect(Collectors.toList()));
}
private List<ConfigurationAttribute> getChildAttributes(final ConfigurationAttribute attribute) {
return this.attributeIdMapping
.values()
@ -141,7 +179,7 @@ public class AttributeMapping {
return this.orientationAttributeMapping
.values()
.stream()
.filter(o -> groupName.equals(o.group))
.filter(o -> groupName.equals(o.groupId))
.sorted((o1, o2) -> (o1.yPosition == o2.yPosition)
? o1.xPosition.compareTo(o2.xPosition)
: o1.yPosition.compareTo(o2.yPosition))

View file

@ -0,0 +1,105 @@
/*
* 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.gui.service.examconfig.impl;
import java.util.Collection;
import java.util.Objects;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.AttributeType;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Orientation;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputField;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputFieldBuilder;
@Lazy
@Component
@GuiProfile
public class CheckBoxBuilder implements InputFieldBuilder {
@Override
public boolean builderFor(
final ConfigurationAttribute attribute,
final Orientation orientation) {
if (attribute == null) {
return false;
}
return attribute.type == AttributeType.CHECK_FIELD ||
attribute.type == AttributeType.CHECKBOX;
}
@Override
public InputField createInputField(
final Composite parent,
final ConfigurationAttribute attribute,
final ViewContext viewContext) {
Objects.requireNonNull(parent);
Objects.requireNonNull(attribute);
Objects.requireNonNull(viewContext);
final Button checkbox = new Button(parent, SWT.CHECK);
if (attribute.type == AttributeType.CHECKBOX) {
checkbox.setText(attribute.name);
}
checkbox.addListener(
SWT.Selection,
event -> viewContext.getValueChangeListener().valueChanged(
viewContext,
attribute,
String.valueOf(checkbox.getSelection()),
0));
return new CheckboxField(
attribute,
viewContext.attributeMapping.getOrientation(attribute.id),
checkbox);
}
static final class CheckboxField extends ControlFieldAdapter<Button> {
private boolean initValue = false;
CheckboxField(
final ConfigurationAttribute attribute,
final Orientation orientation,
final Button control) {
super(attribute, orientation, control, null);
}
@Override
public void initValue(final Collection<ConfigurationValue> values) {
values.stream()
.filter(v -> this.attribute.id.equals(v.attributeId))
.findFirst()
.map(v -> {
this.initValue = Boolean.valueOf(v.value);
this.control.setSelection(this.initValue);
return this.initValue;
});
}
@Override
protected void setDefaultValue() {
this.control.setSelection(this.initValue);
}
}
}

View file

@ -0,0 +1,97 @@
/*
* 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.gui.service.examconfig.impl;
import java.util.Collection;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Orientation;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputField;
public abstract class ControlFieldAdapter<T extends Control> implements InputField {
protected final ConfigurationAttribute attribute;
protected final Orientation orientation;
protected final T control;
protected final Label errorLabel;
ControlFieldAdapter(
final ConfigurationAttribute attribute,
final Orientation orientation,
final T control,
final Label errorLabel) {
this.attribute = attribute;
this.orientation = orientation;
this.control = control;
this.errorLabel = errorLabel;
}
@Override
public final ConfigurationAttribute getAttribute() {
return this.attribute;
}
@Override
public final Control getControl() {
return this.control;
}
@Override
public void disable() {
if (this.control.isEnabled()) {
setDefaultValue();
this.control.setEnabled(false);
}
}
@Override
public void enable() {
if (!this.control.isEnabled()) {
this.control.setEnabled(true);
}
}
@Override
public Orientation getOrientation() {
return this.orientation;
}
@Override
public void showError(final String errorMessage) {
if (this.errorLabel == null) {
return;
}
this.errorLabel.setText(errorMessage);
this.errorLabel.setVisible(true);
}
@Override
public void clearError() {
if (this.errorLabel == null) {
return;
}
this.errorLabel.setVisible(false);
this.errorLabel.setText("rfbvgregre");
}
@Override
public void initValue(final Collection<ConfigurationValue> values) {
// Does Nothing for default
}
protected abstract void setDefaultValue();
}

View file

@ -9,100 +9,267 @@
package ch.ethz.seb.sebserver.gui.service.examconfig.impl;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.tomcat.util.buf.StringUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import ch.ethz.seb.sebserver.gbl.Constants;
import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.api.JSONMapper;
import ch.ethz.seb.sebserver.gbl.model.Domain;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationTableValue;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Orientation;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.View;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Result;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.service.examconfig.ExamConfigurationService;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputFieldBuilder;
import ch.ethz.seb.sebserver.gui.service.examconfig.ValueChangeListener;
import ch.ethz.seb.sebserver.gui.service.examconfig.ValueChangeRule;
import ch.ethz.seb.sebserver.gui.service.page.PageContext;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetConfigAttributes;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetConfigurationValues;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetOrientations;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetViewList;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.SaveExamConfigValue;
import ch.ethz.seb.sebserver.gui.widget.WidgetFactory;
@Lazy
@Service
@GuiProfile
public class ExamConfigurationServiceImpl implements ExamConfigurationService, ValueChangeListener {
public class ExamConfigurationServiceImpl implements ExamConfigurationService {
private static final Logger log = LoggerFactory.getLogger(ExamConfigurationServiceImpl.class);
private final RestService restService;
private final JSONMapper jsonMapper;
private final WidgetFactory widgetFactory;
private final Collection<InputFieldBuilder> inputFieldBuilderMapping;
private final Collection<InputFieldBuilder> inputFieldBuilder;
private final Collection<ValueChangeRule> valueChangeRules;
protected ExamConfigurationServiceImpl(
final RestService restService,
final JSONMapper jsonMapper,
final WidgetFactory widgetFactory,
final Collection<InputFieldBuilder> inputFieldBuilder,
final Collection<ValueChangeRule> valueChangeRules) {
this.restService = restService;
this.jsonMapper = jsonMapper;
this.inputFieldBuilderMapping = Utils.immutableCollectionOf(inputFieldBuilder);
this.widgetFactory = widgetFactory;
this.inputFieldBuilder = Utils.immutableCollectionOf(inputFieldBuilder);
this.valueChangeRules = Utils.immutableCollectionOf(valueChangeRules);
}
@Override
public AttributeMapping getAttributes(final String template) {
final List<ConfigurationAttribute> attributes = this.restService
.getBuilder(GetConfigAttributes.class)
.call()
.getOrThrow();
public WidgetFactory getWidgetFactory() {
return this.widgetFactory;
}
final List<Orientation> orientations = this.restService
.getBuilder(GetOrientations.class)
.withQueryParam(Domain.ORIENTATION.ATTR_TEMPLATE_ID, template)
.call()
.getOrThrow();
@Override
public InputFieldBuilder getInputFieldBuilder(
final ConfigurationAttribute attribute,
final Orientation orientation) {
return new AttributeMapping(template, attributes, orientations);
return this.inputFieldBuilder
.stream()
.filter(b -> b.builderFor(attribute, orientation))
.findFirst()
.orElseThrow();
}
@Override
public Result<AttributeMapping> getAttributes(final Long templateId) {
return Result.tryCatch(() -> {
return new AttributeMapping(
templateId,
this.restService
.getBuilder(GetConfigAttributes.class)
.call()
.onError(t -> log.error("Failed to get all ConfigurationAttribute"))
.getOrThrow(),
this.restService
.getBuilder(GetOrientations.class)
.withQueryParam(Orientation.FILTER_ATTR_TEMPLATE_ID, String.valueOf(templateId))
.call()
.onError(t -> log.error("Failed to get all Orientation of template {}", templateId))
.getOrThrow());
});
}
@Override
public List<View> getViews(final AttributeMapping allAttributes) {
final Collection<Long> viewIds = allAttributes.getViewIds();
if (viewIds == null || viewIds.isEmpty()) {
return Collections.emptyList();
}
final String ids = StringUtils.join(
viewIds
.stream()
.map(id -> String.valueOf(id))
.collect(Collectors.toList()),
Constants.LIST_SEPARATOR_CHAR);
return this.restService.getBuilder(GetViewList.class)
.withQueryParam(API.PARAM_MODEL_ID_LIST, ids)
.call()
.getOrThrow()
.stream()
.sorted((v1, v2) -> v1.position.compareTo(v2.position))
.collect(Collectors.toList());
}
@Override
public ViewContext createViewContext(
final PageContext pageContext,
final Configuration configuration,
final View view,
final AttributeMapping attributeMapping,
final Composite parent,
final String name,
final String configurationId,
final int columns,
final int rows) {
// TODO Auto-generated method stub
return null;
}
@Override
public ViewContext initInputFieldValues(final ViewContext viewContext) {
// TODO Auto-generated method stub
return null;
}
@Override
public void valueChanged(
final ViewContext context,
final ConfigurationAttribute attribute,
final String value,
final int listIndex) {
// TODO Auto-generated method stub
return new ViewContext(
configuration,
view,
columns,
rows,
attributeMapping,
new ValueChangeListenerImpl(
pageContext,
this.restService,
this.jsonMapper,
this.valueChangeRules));
}
@Override
public void tableChanged(final ConfigurationTableValue tableValue) {
// TODO Auto-generated method stub
public Composite createViewGrid(final Composite parent, final ViewContext viewContext) {
final Composite composite = new Composite(parent, SWT.NONE);
final GridLayout gridLayout = new GridLayout(viewContext.columns, true);
gridLayout.marginTop = 10;
gridLayout.verticalSpacing = 5;
gridLayout.horizontalSpacing = 10;
composite.setLayout(gridLayout);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
final ViewGridBuilder viewGridBuilder = new ViewGridBuilder(
composite,
viewContext,
this);
for (final ConfigurationAttribute attribute : viewContext.attributeMapping.getAttributes()) {
viewGridBuilder.add(attribute);
}
viewGridBuilder.compose();
return composite;
}
@Override
public void initInputFieldValues(
final Long configurationId,
final Collection<ViewContext> viewContexts) {
if (viewContexts == null || viewContexts.size() < 1) {
log.warn("No viewContexts available");
return;
}
final Collection<ConfigurationValue> attributeValues = this.restService
.getBuilder(GetConfigurationValues.class)
.withQueryParam(
ConfigurationValue.FILTER_ATTR_CONFIGURATION_ID,
String.valueOf(configurationId))
.call()
.onError(t -> log.error(
"Failed to get all ConfigurationValue for configuration with id: {}",
configurationId))
.getOrElse(Collections::emptyList);
viewContexts
.forEach(vc -> vc.setValuesToInputFields(attributeValues));
}
private static final class ValueChangeListenerImpl implements ValueChangeListener {
private final PageContext pageContext;
private final RestService restService;
private final JSONMapper jsonMapper;
private final Collection<ValueChangeRule> valueChangeRules;
protected ValueChangeListenerImpl(
final PageContext pageContext,
final RestService restService,
final JSONMapper jsonMapper,
final Collection<ValueChangeRule> valueChangeRules) {
this.pageContext = pageContext;
this.restService = restService;
this.jsonMapper = jsonMapper;
this.valueChangeRules = valueChangeRules;
}
@Override
public void valueChanged(
final ViewContext context,
final ConfigurationAttribute attribute,
final String value,
final int listIndex) {
final ConfigurationValue configurationValue = new ConfigurationValue(
null,
context.getInstitutionId(),
context.getConfigurationId(),
attribute.id,
listIndex,
value);
try {
final String jsonValue = this.jsonMapper.writeValueAsString(configurationValue);
final Result<ConfigurationValue> savedValue = this.restService.getBuilder(SaveExamConfigValue.class)
.withBody(jsonValue)
.call();
if (savedValue.hasError()) {
context.showError(attribute.id, verifyErrorMessage(savedValue.getError()));
} else {
this.valueChangeRules.stream()
.filter(rule -> rule.observesAttribute(attribute))
.forEach(rule -> rule.applyRule(context, attribute, savedValue.get()));
}
} catch (final Exception e) {
this.pageContext.notifyError(e);
}
}
@Override
public void tableChanged(final ConfigurationTableValue tableValue) {
// TODO Auto-generated method stub
}
private String verifyErrorMessage(final Throwable error) {
// TODO Auto-generated method stub
return "TODO";
}
}
}

View file

@ -0,0 +1,79 @@
/*
* 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.gui.service.examconfig.impl;
import java.util.Objects;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.AttributeType;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Orientation;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputField;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputFieldBuilder;
@Lazy
@Component
@GuiProfile
public class LabelBuilder implements InputFieldBuilder {
@Override
public boolean builderFor(
final ConfigurationAttribute attribute,
final Orientation orientation) {
if (attribute == null) {
return false;
}
return attribute.type == AttributeType.LABEL;
};
@Override
public InputField createInputField(
final Composite parent,
final ConfigurationAttribute attribute,
final ViewContext viewContext) {
Objects.requireNonNull(parent);
Objects.requireNonNull(attribute);
Objects.requireNonNull(viewContext);
final Label label = new Label(parent, SWT.NONE);
label.setText(attribute.name);
return new LabelField(
attribute,
viewContext.attributeMapping.getOrientation(attribute.id),
label);
}
static final class LabelField extends ControlFieldAdapter<Label> {
LabelField(
final ConfigurationAttribute attribute,
final Orientation orientation,
final Label control) {
super(attribute, orientation, control, null);
}
@Override
protected void setDefaultValue() {
// Does Nothing, Label has no default value
}
}
}

View file

@ -0,0 +1,170 @@
/*
* 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.gui.service.examconfig.impl;
import java.util.Collection;
import java.util.function.Consumer;
import org.eclipse.rap.rwt.RWT;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.AttributeType;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Orientation;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputField;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputFieldBuilder;
import ch.ethz.seb.sebserver.gui.service.examconfig.ValueChangeListener;
@Lazy
@Component
@GuiProfile
public class TextFieldBuilder implements InputFieldBuilder {
@Override
public boolean builderFor(
final ConfigurationAttribute attribute,
final Orientation orientation) {
if (attribute == null) {
return false;
}
return attribute.type == AttributeType.TEXT_FIELD ||
attribute.type == AttributeType.TEXT_AREA ||
attribute.type == AttributeType.INTEGER ||
attribute.type == AttributeType.DECIMAL;
}
@Override
public InputField createInputField(
final Composite parent,
final ConfigurationAttribute attribute,
final ViewContext viewContext) {
final Orientation orientation = viewContext.attributeMapping
.getOrientation(attribute.id);
final Composite comp = new Composite(parent, SWT.NONE);
final GridLayout gridLayout = new GridLayout();
gridLayout.verticalSpacing = 0;
comp.setLayout(gridLayout);
final GridData gridData = new GridData(
SWT.FILL, SWT.FILL,
true, false,
(orientation != null) ? orientation.width() : 1,
(orientation != null) ? orientation.height() : 1);
comp.setLayoutData(gridData);
final Text text;
if (attribute.type == AttributeType.INTEGER ||
attribute.type == AttributeType.DECIMAL) {
text = new Text(comp, SWT.RIGHT | SWT.BORDER);
} else {
text = new Text(comp, SWT.LEFT | SWT.BORDER);
}
text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
final Label errorLabel = new Label(comp, SWT.NONE);
errorLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
errorLabel.setVisible(false);
errorLabel.setData(RWT.CUSTOM_VARIANT, "error");
addValueChangeListener(
text,
attribute,
orientation,
viewContext);
return new TextInputField(attribute, orientation, text, errorLabel);
}
private void addValueChangeListener(
final Text control,
final ConfigurationAttribute attribute,
final Orientation orientation,
final ViewContext viewContext) {
final ValueChangeListener valueListener = viewContext.getValueChangeListener();
if (attribute.type == AttributeType.INTEGER) {
addNumberCheckListener(control, attribute, s -> Integer.parseInt(s), viewContext);
} else if (attribute.type == AttributeType.DECIMAL) {
addNumberCheckListener(control, attribute, s -> Double.parseDouble(s), viewContext);
} else {
control.addListener(
SWT.FocusOut,
event -> valueListener.valueChanged(
viewContext,
attribute,
String.valueOf(control.getText()),
0));
}
}
private void addNumberCheckListener(
final Text control,
final ConfigurationAttribute attribute,
final Consumer<String> numberCheck,
final ViewContext viewContext) {
final ValueChangeListener valueListener = viewContext.getValueChangeListener();
control.addListener(SWT.FocusOut, event -> {
try {
final String text = control.getText();
numberCheck.accept(text);
viewContext.clearError(attribute.id);
valueListener.valueChanged(viewContext, attribute, text, 0);
} catch (final NumberFormatException e) {
viewContext.showError(attribute.id, "Not A Number");
}
});
}
static final class TextInputField extends ControlFieldAdapter<Text> {
private String initValue = "";
TextInputField(
final ConfigurationAttribute attribute,
final Orientation orientation,
final Text control,
final Label errorLabel) {
super(attribute, orientation, control, errorLabel);
}
@Override
public void initValue(final Collection<ConfigurationValue> values) {
values.stream()
.filter(a -> this.attribute.id.equals(a.attributeId))
.findFirst()
.map(v -> {
this.initValue = v.value;
setDefaultValue();
return this.initValue;
});
}
@Override
protected void setDefaultValue() {
this.control.setText(this.initValue);
}
}
}

View file

@ -11,46 +11,61 @@ package ch.ethz.seb.sebserver.gui.service.examconfig.impl;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.View;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputField;
import ch.ethz.seb.sebserver.gui.service.examconfig.ValueChangeListener;
public final class ViewContext {
public final String name;
public final String configurationId;
public final Configuration configuration;
public final View view;
public final int columns, rows;
public final AttributeMapping attributeContext;
private final Map<String, InputField> inputFieldMapping;
public final AttributeMapping attributeMapping;
private final Map<Long, InputField> inputFieldMapping;
private final ValueChangeListener valueChangeListener;
ViewContext(
final String name,
final String configurationId,
final Configuration configuration,
final View view,
final int columns,
final int rows,
final AttributeMapping attributeContext,
final ValueChangeListener valueChangeListener) {
this.name = name;
this.configurationId = configurationId;
Objects.requireNonNull(configuration);
Objects.requireNonNull(view);
Objects.requireNonNull(attributeContext);
Objects.requireNonNull(valueChangeListener);
this.configuration = configuration;
this.view = view;
this.columns = columns;
this.rows = rows;
this.attributeContext = attributeContext;
this.attributeMapping = attributeContext;
this.inputFieldMapping = new HashMap<>();
this.valueChangeListener = valueChangeListener;
}
public String getName() {
return this.name;
public Long getId() {
return this.view.id;
}
public String getConfigurationId() {
return this.configurationId;
public String getName() {
return this.view.name;
}
public Long getConfigurationId() {
return this.configuration.id;
}
public Long getInstitutionId() {
return this.configuration.institutionId;
}
public int getColumns() {
@ -65,9 +80,27 @@ public final class ViewContext {
return this.valueChangeListener;
}
public void showError(final Long attributeId, final String errorMessage) {
final InputField inputField = this.inputFieldMapping.get(attributeId);
if (inputField == null) {
return;
}
inputField.showError(errorMessage);
}
public void clearError(final Long attributeId) {
final InputField inputField = this.inputFieldMapping.get(attributeId);
if (inputField == null) {
return;
}
inputField.clearError();
}
void registerInputField(final InputField inputField) {
this.inputFieldMapping.put(
inputField.getAttribute().getName(),
inputField.getAttribute().id,
inputField);
}

View file

@ -0,0 +1,281 @@
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package ch.ethz.seb.sebserver.gui.service.examconfig.impl;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Orientation;
import ch.ethz.seb.sebserver.gui.service.examconfig.ExamConfigurationService;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputField;
import ch.ethz.seb.sebserver.gui.service.examconfig.InputFieldBuilder;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
import ch.ethz.seb.sebserver.gui.widget.WidgetFactory;
public class ViewGridBuilder {
private final ExamConfigurationService examConfigurationService;
private final Composite parent;
private final ViewContext viewContext;
private final CellFieldBuilderAdapter[][] grid;
private final Set<String> registeredGroups;
ViewGridBuilder(
final Composite parent,
final ViewContext viewContext,
final ExamConfigurationService examConfigurationService) {
this.examConfigurationService = examConfigurationService;
this.parent = parent;
this.viewContext = viewContext;
this.grid = new CellFieldBuilderAdapter[viewContext.rows][viewContext.columns];
this.registeredGroups = new HashSet<>();
fillDummy(0, 0, viewContext.columns, viewContext.rows);
}
ViewGridBuilder add(final ConfigurationAttribute attribute) {
// ignore nested attributes here
if (attribute.parentId != null) {
return this;
}
final Orientation orientation = this.viewContext.attributeMapping
.getOrientation(attribute.id);
// create group builder
if (StringUtils.isNotBlank(orientation.groupId)) {
if (this.registeredGroups.contains(orientation.groupId)) {
return this;
}
final GroupCellFieldBuilderAdapter groupBuilder =
new GroupCellFieldBuilderAdapter(this, attribute);
fillDummy(groupBuilder.x, groupBuilder.y, groupBuilder.width, groupBuilder.height);
this.grid[groupBuilder.y][groupBuilder.x] = groupBuilder;
this.registeredGroups.add(orientation.groupId);
return this;
}
// create single input field with label
final int xpos = orientation.xpos();
final int ypos = orientation.ypos();
final InputFieldBuilder inputFieldBuilder = this.examConfigurationService.getInputFieldBuilder(
attribute,
orientation);
final CellFieldBuilderAdapter fieldBuilderAdapter = fieldBuilderAdapter(
inputFieldBuilder,
attribute);
switch (orientation.title) {
case RIGHT: {
this.grid[ypos][xpos] = fieldBuilderAdapter;
this.grid[ypos][xpos + 1] = labelBuilder(attribute, orientation);
break;
}
case LEFT: {
this.grid[ypos][xpos] = labelBuilder(attribute, orientation);
this.grid[ypos][xpos + 1] = fieldBuilderAdapter;
break;
}
case TOP: {
this.grid[ypos][xpos] = labelBuilder(attribute, orientation);
this.grid[ypos + 1][xpos] = fieldBuilderAdapter;
}
default: {
this.grid[ypos][xpos] = fieldBuilderAdapter;
}
}
return this;
}
void compose() {
for (int y = 0; y < this.grid.length; y++) {
for (int x = 0; x < this.grid[y].length; x++) {
if (this.grid[y][x] == null) {
final Label empty = new Label(this.parent, SWT.LEFT);
empty.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
empty.setText("");
} else {
this.grid[y][x].createCell(this);
}
}
}
}
private static interface CellFieldBuilderAdapter {
void createCell(ViewGridBuilder builder);
}
private CellFieldBuilderAdapter dummyBuilderAdapter() {
return new CellFieldBuilderAdapter() {
@Override
public void createCell(final ViewGridBuilder builder) {
}
};
}
private final CellFieldBuilderAdapter fieldBuilderAdapter(
final InputFieldBuilder inputFieldBuilder,
final ConfigurationAttribute attribute) {
return new CellFieldBuilderAdapter() {
@Override
public void createCell(final ViewGridBuilder builder) {
final InputField inputField = inputFieldBuilder.createInputField(
ViewGridBuilder.this.parent,
attribute,
ViewGridBuilder.this.viewContext);
// final Orientation orientation =
// ViewGridBuilder.this.viewContext.attributeMapping.getOrientation(attribute.id);
//
// //inputField.setSpan(orientation.width, orientation.height);
ViewGridBuilder.this.viewContext.registerInputField(inputField);
}
};
}
private CellFieldBuilderAdapter labelBuilder(
final ConfigurationAttribute attribute,
final Orientation orientation) {
return new CellFieldBuilderAdapter() {
@Override
public void createCell(final ViewGridBuilder builder) {
final WidgetFactory widgetFactory = builder.examConfigurationService.getWidgetFactory();
final Label label = widgetFactory.labelLocalized(
ViewGridBuilder.this.parent,
new LocTextKey(ExamConfigurationService.ATTRIBUTE_LABEL_LOC_TEXT_PREFIX + attribute.name),
attribute.name);
final GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false);
switch (orientation.title) {
case LEFT:
case RIGHT: {
label.setAlignment(SWT.LEFT);
gridData.verticalIndent = 5;
break;
}
case TOP: {
label.setAlignment(SWT.BOTTOM);
break;
}
default: {
label.setAlignment(SWT.LEFT);
}
}
label.setLayoutData(gridData);
}
};
}
private static class GroupCellFieldBuilderAdapter implements CellFieldBuilderAdapter {
final ViewGridBuilder builder;
final ConfigurationAttribute attribute;
final Collection<Orientation> orientationsOfGroup;
int x = 0;
final int y = 0;
int width = 1;
int height = 1;
GroupCellFieldBuilderAdapter(
final ViewGridBuilder builder,
final ConfigurationAttribute attribute) {
this.builder = builder;
this.attribute = attribute;
this.orientationsOfGroup =
builder.viewContext.attributeMapping.getOrientationsOfGroup(attribute);
for (final Orientation o : this.orientationsOfGroup) {
this.x = (this.x < o.xpos()) ? o.xpos() : this.x;
this.x = (this.y < o.ypos()) ? o.ypos() : this.y;
this.width = (this.width < o.xpos() + o.width()) ? o.xpos() + o.width() : this.width;
this.height = (this.height < o.ypos() + o.height()) ? o.ypos() + o.height() : this.height;
}
this.width = this.width - this.x;
this.height = this.height - this.y + 2;
}
@Override
public void createCell(final ViewGridBuilder builder) {
final Group group = new Group(builder.parent, SWT.NONE);
group.setLayout(new GridLayout(this.width, true));
group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, this.width, this.height));
// TODO needs localization?
final Orientation o = this.orientationsOfGroup.stream().findFirst().get();
if (o != null) {
group.setText(o.groupId);
}
for (final Orientation orientation : this.orientationsOfGroup) {
final InputFieldBuilder inputComponentBuilder = builder.examConfigurationService
.getInputFieldBuilder(this.attribute, orientation);
createSingleInputField(group, orientation, inputComponentBuilder);
}
}
private void createSingleInputField(
final Group group,
final Orientation orientation,
final InputFieldBuilder inputFieldBuilder) {
final ConfigurationAttribute attr = this.builder.viewContext.attributeMapping
.getAttribute(orientation.attributeId);
final InputField inputField = inputFieldBuilder.createInputField(
group,
attr,
this.builder.viewContext);
final GridData gridData = new GridData(
SWT.FILL, SWT.FILL,
true, false,
orientation.width(), orientation.height());
inputField.getControl().setLayoutData(gridData);
inputField.getControl().setToolTipText(attr.name);
this.builder.viewContext.registerInputField(inputField);
}
}
private void fillDummy(final int x, final int y, final int width, final int height) {
final int upperBoundX = x + width;
final int upperBoundY = y + height;
for (int _y = y; _y < upperBoundY; _y++) {
for (int _x = x; _x < upperBoundX; _x++) {
this.grid[_y][_x] = dummyBuilderAdapter();
}
}
}
}

View file

@ -43,16 +43,29 @@ public interface I18nSupport {
/** Get localized text of specified key for currently set Locale.
*
* @param key the key name of localized text
* @param args additional arguments to parse the localized text
* @param key LocTextKey instance
* @return the text in current language parsed from localized text */
String getText(String key, Object... args);
default String getText(final LocTextKey key) {
return getText(key.name, key.args);
}
/** Get localized text of specified key for currently set Locale.
*
* @param key LocTextKey instance
* @param def default text that is returned if no localized test with specified key was found
* @return the text in current language parsed from localized text */
String getText(LocTextKey key);
default String getText(final LocTextKey key, final String def) {
return getText(key.name, def, key.args);
}
/** Get localized text of specified key for currently set Locale.
*
* @param key the key name of localized text
* @param args additional arguments to parse the localized text
* @return the text in current language parsed from localized text */
default String getText(final String key, final Object... args) {
return getText(key, key, args);
}
/** Get localized text of specified key for currently set Locale.
*
@ -68,7 +81,9 @@ public interface I18nSupport {
* @param locale the Locale
* @param args additional arguments to parse the localized text
* @return the text in current language parsed from localized text */
String getText(String key, Locale locale, Object... args);
default String getText(final String key, final Locale locale, final Object... args) {
return getText(key, locale, key, args);
}
/** Get localized text of specified key and Locale.
*

View file

@ -15,8 +15,8 @@ import org.eclipse.swt.widgets.Composite;
public interface PolyglotPageService {
String POLYGLOT_WIDGET_FUNCTION_KEY = "POLYGLOT_WIDGET_FUNCTION";
String POLYGLOT_TREE_ITEM_TEXT_DATA_KEY = "POLYGLOT_TREE_ITEM_TEXT_DATA";
String POLYGLOT_TREE_ITEM_TOOLTIP_DATA_KEY = "POLYGLOT_TREE_ITEM_TOOLTIP_DATA";
String POLYGLOT_ITEM_TEXT_DATA_KEY = "POLYGLOT_ITEM_TEXT_DATA";
String POLYGLOT_ITEM_TOOLTIP_DATA_KEY = "POLYGLOT_ITEM_TOOLTIP_DATA";
/** Gets the underling I18nSupport
*

View file

@ -32,7 +32,6 @@ import ch.ethz.seb.sebserver.gbl.model.user.UserInfo;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.service.i18n.I18nSupport;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.CurrentUser;
@Lazy
@ -162,26 +161,11 @@ public class I18nSupportImpl implements I18nSupport {
}
}
@Override
public String getText(final LocTextKey key) {
return getText(key.name, key.args);
}
@Override
public String getText(final String key, final Object... args) {
return getText(key, key, args);
}
@Override
public String getText(final String key, final String def, final Object... args) {
return this.messageSource.getMessage(key, args, def, this.getCurrentLocale());
}
@Override
public String getText(final String key, final Locale locale, final Object... args) {
return getText(key, locale, key, args);
}
@Override
public String getText(final String key, final Locale locale, final String def, final Object... args) {
return this.messageSource.getMessage(key, args, def, locale);

View file

@ -246,7 +246,7 @@ public interface PageService {
API.PARAM_MODEL_ID,
action.pageContext().getAttribute(AttributeKeys.ENTITY_ID))
.call()
.onErrorDo(t -> action.pageContext().notifyError(t));
.onError(t -> action.pageContext().notifyError(t));
return action;
};

View file

@ -0,0 +1,75 @@
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package ch.ethz.seb.sebserver.gui.service.remote.webservice.api;
import java.util.ArrayList;
import java.util.List;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.model.Page;
import ch.ethz.seb.sebserver.gbl.util.Result;
public abstract class PageToListCallAdapter<T> extends RestCall<List<T>> {
private final static int PAGE_SIZE_OF_PAGER = 100;
private final Class<? extends RestCall<Page<T>>> pageCallerType;
protected PageToListCallAdapter(
final Class<? extends RestCall<Page<T>>> pageCallerType,
final EntityType entityType,
final TypeReference<List<T>> typeRef,
final String path) {
super(new TypeKey<>(
CallType.GET_LIST,
entityType,
typeRef),
HttpMethod.GET,
MediaType.APPLICATION_FORM_URLENCODED,
path);
this.pageCallerType = pageCallerType;
}
@Override
protected Result<List<T>> exchange(final RestCall<List<T>>.RestCallBuilder builder) {
return Result.tryCatch(() -> {
final RestCall<Page<T>> pageCall = this.restService.getRestCall(this.pageCallerType);
final List<T> collector = new ArrayList<>();
this.collectPage(collector, pageCall, builder, 1);
return collector;
});
}
private void collectPage(
final List<T> collector,
final RestCall<Page<T>> pageCall,
final RestCall<List<T>>.RestCallBuilder builder,
final int pageNumber) {
final RestCall<Page<T>>.RestCallBuilder newBuilder = pageCall.newBuilder(builder)
.withPaging(pageNumber, PAGE_SIZE_OF_PAGER);
final Page<T> page = pageCall
.exchange(newBuilder)
.getOrThrow();
collector.addAll(page.content);
if (page.getPageNumber() < page.getNumberOfPages()) {
collectPage(collector, pageCall, builder, page.getPageNumber() + 1);
}
}
}

View file

@ -142,6 +142,10 @@ public abstract class RestCall<T> {
return new RestCallBuilder();
}
public RestCall<T>.RestCallBuilder newBuilder(final RestCall<?>.RestCallBuilder builder) {
return new RestCallBuilder(builder);
}
private Result<T> handleRestCallError(final ResponseEntity<String> responseEntity)
throws IOException, JsonParseException, JsonMappingException {

View file

@ -25,9 +25,9 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetExams extends RestCall<Page<Exam>> {
public class GetExamPage extends RestCall<Page<Exam>> {
protected GetExams() {
protected GetExamPage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.EXAM,

View file

@ -25,9 +25,9 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetInstitutions extends RestCall<Page<Institution>> {
public class GetInstitutionPage extends RestCall<Page<Institution>> {
protected GetInstitutions() {
protected GetInstitutionPage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.INSTITUTION,

View file

@ -25,9 +25,9 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetLmsSetups extends RestCall<Page<LmsSetup>> {
public class GetLmsSetupPage extends RestCall<Page<LmsSetup>> {
protected GetLmsSetups() {
protected GetLmsSetupPage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.LMS_SETUP,

View file

@ -25,9 +25,9 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetQuizzes extends RestCall<Page<QuizData>> {
public class GetQuizPage extends RestCall<Page<QuizData>> {
protected GetQuizzes() {
protected GetQuizPage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.EXAM,

View file

@ -25,9 +25,9 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetClientConfigs extends RestCall<Page<SebClientConfig>> {
public class GetClientConfigPage extends RestCall<Page<SebClientConfig>> {
protected GetClientConfigs() {
protected GetClientConfigPage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.SEB_CLIENT_CONFIGURATION,

View file

@ -0,0 +1,41 @@
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.model.Page;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetConfigurationPage extends RestCall<Page<Configuration>> {
protected GetConfigurationPage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.CONFIGURATION,
new TypeReference<Page<Configuration>>() {
}),
HttpMethod.GET,
MediaType.APPLICATION_FORM_URLENCODED,
API.CONFIGURATION_ENDPOINT);
}
}

View file

@ -0,0 +1,41 @@
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.model.Page;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetConfigurationValuePage extends RestCall<Page<ConfigurationValue>> {
protected GetConfigurationValuePage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.CONFIGURATION_VALUE,
new TypeReference<Page<ConfigurationValue>>() {
}),
HttpMethod.GET,
MediaType.APPLICATION_FORM_URLENCODED,
API.CONFIGURATION_VALUE_ENDPOINT);
}
}

View file

@ -0,0 +1,38 @@
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig;
import java.util.List;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.PageToListCallAdapter;
@Lazy
@Component
@GuiProfile
public class GetConfigurationValues extends PageToListCallAdapter<ConfigurationValue> {
protected GetConfigurationValues() {
super(
GetConfigurationValuePage.class,
EntityType.CONFIGURATION_VALUE,
new TypeReference<List<ConfigurationValue>>() {
},
API.CONFIGURATION_VALUE_ENDPOINT);
}
}

View file

@ -8,33 +8,30 @@
package ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig;
import java.util.List;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.model.Page;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.PageToListCallAdapter;
@Lazy
@Component
@GuiProfile
public class GetConfigurations extends RestCall<Page<Configuration>> {
public class GetConfigurations extends PageToListCallAdapter<Configuration> {
protected GetConfigurations() {
super(new TypeKey<>(
CallType.GET_PAGE,
super(
GetConfigurationPage.class,
EntityType.CONFIGURATION,
new TypeReference<Page<Configuration>>() {
}),
HttpMethod.GET,
MediaType.APPLICATION_FORM_URLENCODED,
new TypeReference<List<Configuration>>() {
},
API.CONFIGURATION_ENDPOINT);
}

View file

@ -25,9 +25,9 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetExamConfigNodes extends RestCall<Page<ConfigurationNode>> {
public class GetExamConfigNodePage extends RestCall<Page<ConfigurationNode>> {
protected GetExamConfigNodes() {
protected GetExamConfigNodePage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.CONFIGURATION_NODE,

View file

@ -0,0 +1,41 @@
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.model.Page;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Orientation;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetOrientationPage extends RestCall<Page<Orientation>> {
protected GetOrientationPage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.ORIENTATION,
new TypeReference<Page<Orientation>>() {
}),
HttpMethod.GET,
MediaType.APPLICATION_FORM_URLENCODED,
API.ORIENTATION_ENDPOINT);
}
}

View file

@ -8,104 +8,31 @@
package ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig;
import java.util.ArrayList;
import java.util.List;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.api.JSONMapper;
import ch.ethz.seb.sebserver.gbl.model.Page;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Orientation;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Result;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestService;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.PageToListCallAdapter;
@Lazy
@Component
@GuiProfile
public class GetOrientations extends RestCall<List<Orientation>> {
public class GetOrientations extends PageToListCallAdapter<Orientation> {
private final GetOrientationPage getOrientationPage;
public GetOrientations() {
super(new TypeKey<>(
CallType.GET_LIST,
protected GetOrientations() {
super(
GetOrientationPage.class,
EntityType.ORIENTATION,
new TypeReference<List<Orientation>>() {
}),
HttpMethod.GET,
MediaType.APPLICATION_FORM_URLENCODED,
},
API.ORIENTATION_ENDPOINT);
this.getOrientationPage = new GetOrientationPage();
}
@Override
protected RestCall<List<Orientation>> init(final RestService restService, final JSONMapper jsonMapper) {
this.getOrientationPage.init(restService, jsonMapper);
return super.init(restService, jsonMapper);
}
@Override
protected Result<List<Orientation>> exchange(final RestCall<List<Orientation>>.RestCallBuilder builder) {
return Result.tryCatch(() -> {
final List<Orientation> collector = new ArrayList<>();
collectPage(collector, this.getOrientationPage.newBuilder(builder), 1);
return collector;
});
}
private void collectPage(
final List<Orientation> collector,
final RestCall<Page<Orientation>>.RestCallBuilder builder,
final int pageNumber) {
final RestCall<Page<Orientation>>.RestCallBuilder builderWithPaging = builder.withPaging(pageNumber, 100);
final Page<Orientation> page = this.getOrientationPage
.exchange(builderWithPaging)
.getOrThrow();
collector.addAll(page.content);
if (page.getPageNumber() < page.getNumberOfPages()) {
collectPage(collector, builder, page.getPageNumber() + 1);
}
}
private final class GetOrientationPage extends RestCall<Page<Orientation>> {
public GetOrientationPage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.ORIENTATION,
new TypeReference<Page<Orientation>>() {
}),
HttpMethod.GET,
MediaType.APPLICATION_FORM_URLENCODED,
API.ORIENTATION_ENDPOINT);
}
public RestCall<Page<Orientation>>.RestCallBuilder newBuilder(
final RestCall<List<Orientation>>.RestCallBuilder builder) {
return new RestCallBuilder(builder);
}
@Override
protected RestCall<Page<Orientation>> init(final RestService restService, final JSONMapper jsonMapper) {
return super.init(restService, jsonMapper);
}
@Override
protected Result<Page<Orientation>> exchange(final RestCall<Page<Orientation>>.RestCallBuilder builder) {
return super.exchange(builder);
}
}
}

View file

@ -0,0 +1,42 @@
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig;
import java.util.List;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.View;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetViewList extends RestCall<List<View>> {
protected GetViewList() {
super(new TypeKey<>(
CallType.GET_LIST,
EntityType.VIEW,
new TypeReference<List<View>>() {
}),
HttpMethod.GET,
MediaType.APPLICATION_FORM_URLENCODED,
API.VIEW_ENDPOINT + API.LIST_PATH_SEGMENT);
}
}

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.ethz.seb.sebserver.gbl.api.API;
import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationValue;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class SaveExamConfigValue extends RestCall<ConfigurationValue> {
protected SaveExamConfigValue() {
super(new TypeKey<>(
CallType.SAVE,
EntityType.CONFIGURATION_VALUE,
new TypeReference<ConfigurationValue>() {
}),
HttpMethod.PUT,
MediaType.APPLICATION_JSON_UTF8,
API.CONFIGURATION_VALUE_ENDPOINT);
}
}

View file

@ -25,9 +25,9 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall;
@Lazy
@Component
@GuiProfile
public class GetUserAccounts extends RestCall<Page<UserInfo>> {
public class GetUserAccountPage extends RestCall<Page<UserInfo>> {
protected GetUserAccounts() {
protected GetUserAccountPage() {
super(new TypeKey<>(
CallType.GET_PAGE,
EntityType.USER,

View file

@ -295,7 +295,7 @@ public class EntityTable<ROW extends Entity> {
.call()
.map(this::createTableRowsFromPage)
.map(this.navigator::update)
.onErrorDo(t -> {
.onError(t -> {
// TODO error handling
});

View file

@ -17,6 +17,7 @@ import java.util.Locale;
import java.util.function.Consumer;
import java.util.function.Supplier;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.rap.rwt.RWT;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Device;
@ -28,6 +29,8 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
@ -208,6 +211,23 @@ public class WidgetFactory {
return label;
}
public Label labelLocalized(
final Composite parent,
final LocTextKey locTextKey,
final String defaultValue) {
final Label label = new Label(parent, SWT.NONE);
final String text = this.i18nSupport.getText(locTextKey, "");
if (StringUtils.isNoneBlank(text)) {
this.injectI18n(label, locTextKey);
} else {
this.injectI18n(label, new LocTextKey(defaultValue));
}
return label;
}
public Label labelLocalized(final Composite parent, final CustomVariant variant, final LocTextKey locTextKey) {
final Label label = new Label(parent, SWT.NONE);
this.injectI18n(label, locTextKey);
@ -322,6 +342,22 @@ public class WidgetFactory {
return tableColumn;
}
public TabFolder tabFolderLocalized(final Composite parent) {
final TabFolder tabs = new TabFolder(parent, SWT.NONE);
this.injectI18n(tabs);
return tabs;
}
public TabItem tabItemLocalized(
final TabFolder parent,
final LocTextKey locTextKey,
final LocTextKey toolTipKey) {
final TabItem tabItem = new TabItem(parent, SWT.NONE);
this.injectI18n(tabItem, locTextKey, toolTipKey);
return tabItem;
}
public Label labelSeparator(final Composite parent) {
final Label label = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
final GridData data = new GridData(SWT.FILL, SWT.TOP, true, true);
@ -437,7 +473,7 @@ public class WidgetFactory {
}
public void injectI18n(final TreeItem treeItem, final LocTextKey locTextKey) {
treeItem.setData(POLYGLOT_TREE_ITEM_TEXT_DATA_KEY, locTextKey);
treeItem.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
treeItem.setText(this.i18nSupport.getText(locTextKey));
}
@ -450,12 +486,18 @@ public class WidgetFactory {
});
}
public void injectI18n(final TabFolder tabFolder) {
tabFolder.setData(
POLYGLOT_WIDGET_FUNCTION_KEY,
(Consumer<TabFolder>) t -> updateLocale(t.getItems(), this.i18nSupport));
}
public void injectI18n(final TableColumn tableColumn, final LocTextKey locTextKey, final LocTextKey locTooltipKey) {
tableColumn.setData(POLYGLOT_TREE_ITEM_TEXT_DATA_KEY, locTextKey);
tableColumn.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
tableColumn.setText(this.i18nSupport.getText(locTextKey));
if (locTooltipKey != null) {
tableColumn.setData(POLYGLOT_TREE_ITEM_TOOLTIP_DATA_KEY, locTooltipKey);
tableColumn.setData(POLYGLOT_ITEM_TOOLTIP_DATA_KEY, locTooltipKey);
tableColumn.setToolTipText(this.i18nSupport.getText(locTooltipKey));
}
}
@ -465,12 +507,22 @@ public class WidgetFactory {
return;
}
tableItem.setData(POLYGLOT_TREE_ITEM_TEXT_DATA_KEY, locTextKey);
tableItem.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
for (int i = 0; i < locTextKey.length; i++) {
tableItem.setText(i, this.i18nSupport.getText(locTextKey[i]));
}
}
private void injectI18n(final TabItem tabItem, final LocTextKey locTextKey, final LocTextKey locTooltipKey) {
tabItem.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
tabItem.setText(this.i18nSupport.getText(locTextKey));
if (locTooltipKey != null) {
tabItem.setData(POLYGLOT_ITEM_TOOLTIP_DATA_KEY, locTooltipKey);
tabItem.setToolTipText(this.i18nSupport.getText(locTooltipKey));
}
}
public void createLanguageSelector(final PageContext composerCtx) {
for (final Locale locale : this.i18nSupport.supportedLanguages()) {
final Label languageSelection = new Label(composerCtx.getParent(), SWT.NONE);
@ -516,13 +568,26 @@ public class WidgetFactory {
};
}
private static final void updateLocale(final TabItem[] items, final I18nSupport i18nSupport) {
if (items == null) {
return;
}
for (final TabItem childItem : items) {
final LocTextKey locTextKey = (LocTextKey) childItem.getData(POLYGLOT_ITEM_TEXT_DATA_KEY);
if (locTextKey != null) {
childItem.setText(i18nSupport.getText(locTextKey));
}
}
}
private static final void updateLocale(final TreeItem[] items, final I18nSupport i18nSupport) {
if (items == null) {
return;
}
for (final TreeItem childItem : items) {
final LocTextKey locTextKey = (LocTextKey) childItem.getData(POLYGLOT_TREE_ITEM_TEXT_DATA_KEY);
final LocTextKey locTextKey = (LocTextKey) childItem.getData(POLYGLOT_ITEM_TEXT_DATA_KEY);
if (locTextKey != null) {
childItem.setText(i18nSupport.getText(locTextKey));
}
@ -536,7 +601,7 @@ public class WidgetFactory {
}
for (final TableItem childItem : items) {
final LocTextKey[] locTextKey = (LocTextKey[]) childItem.getData(POLYGLOT_TREE_ITEM_TEXT_DATA_KEY);
final LocTextKey[] locTextKey = (LocTextKey[]) childItem.getData(POLYGLOT_ITEM_TEXT_DATA_KEY);
if (locTextKey != null) {
for (int i = 0; i < locTextKey.length; i++) {
if (locTextKey[i] != null) {
@ -553,7 +618,7 @@ public class WidgetFactory {
}
for (final TableColumn childItem : columns) {
final LocTextKey locTextKey = (LocTextKey) childItem.getData(POLYGLOT_TREE_ITEM_TEXT_DATA_KEY);
final LocTextKey locTextKey = (LocTextKey) childItem.getData(POLYGLOT_ITEM_TEXT_DATA_KEY);
if (locTextKey != null) {
childItem.setText(i18nSupport.getText(locTextKey));
}

View file

@ -85,6 +85,10 @@ public class JodaTimeTypeResolver extends BaseTypeHandler<DateTime> {
public static final DateTime getDateTime(final String stringValue) {
String dateFormattedString = stringValue;
if (dateFormattedString == null) {
return null;
}
// cutting milliseconds if there are some. This is needed to be able to use a general pattern
// independently from the different data-base-drivers format the date-time values
if (dateFormattedString.contains(".")) {

View file

@ -6,25 +6,25 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class AdditionalAttributesDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source Table: additional_attributes")
public static final AdditionalAttributes additionalAttributes = new AdditionalAttributes();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.id")
public static final SqlColumn<Long> id = additionalAttributes.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.entity_type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.entity_type")
public static final SqlColumn<String> entityType = additionalAttributes.entityType;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.entity_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source field: additional_attributes.entity_id")
public static final SqlColumn<Long> entityId = additionalAttributes.entityId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source field: additional_attributes.name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source field: additional_attributes.name")
public static final SqlColumn<String> name = additionalAttributes.name;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source field: additional_attributes.value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source field: additional_attributes.value")
public static final SqlColumn<String> value = additionalAttributes.value;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source Table: additional_attributes")
public static final class AdditionalAttributes extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface AdditionalAttributesMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<AdditionalAttributes> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -56,7 +56,7 @@ public interface AdditionalAttributesMapper {
})
AdditionalAttributes selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -67,22 +67,22 @@ public interface AdditionalAttributesMapper {
})
List<AdditionalAttributes> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(additionalAttributes);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, additionalAttributes);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, additionalAttributes)
.where(id, isEqualTo(id_))
@ -90,7 +90,7 @@ public interface AdditionalAttributesMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default int insert(AdditionalAttributes record) {
return insert(SqlBuilder.insert(record)
.into(additionalAttributes)
@ -102,7 +102,7 @@ public interface AdditionalAttributesMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default int insertSelective(AdditionalAttributes record) {
return insert(SqlBuilder.insert(record)
.into(additionalAttributes)
@ -114,19 +114,19 @@ public interface AdditionalAttributesMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<AdditionalAttributes>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, entityType, entityId, name, value)
.from(additionalAttributes);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<AdditionalAttributes>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, entityType, entityId, name, value)
.from(additionalAttributes);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default AdditionalAttributes selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, entityType, entityId, name, value)
.from(additionalAttributes)
@ -135,7 +135,7 @@ public interface AdditionalAttributesMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(AdditionalAttributes record) {
return UpdateDSL.updateWithMapper(this::update, additionalAttributes)
.set(entityType).equalTo(record::getEntityType)
@ -144,7 +144,7 @@ public interface AdditionalAttributesMapper {
.set(value).equalTo(record::getValue);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(AdditionalAttributes record) {
return UpdateDSL.updateWithMapper(this::update, additionalAttributes)
.set(entityType).equalToWhenPresent(record::getEntityType)
@ -153,7 +153,7 @@ public interface AdditionalAttributesMapper {
.set(value).equalToWhenPresent(record::getValue);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default int updateByPrimaryKey(AdditionalAttributes record) {
return UpdateDSL.updateWithMapper(this::update, additionalAttributes)
.set(entityType).equalTo(record::getEntityType)
@ -165,7 +165,7 @@ public interface AdditionalAttributesMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.860+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.179+02:00", comments="Source Table: additional_attributes")
default int updateByPrimaryKeySelective(AdditionalAttributes record) {
return UpdateDSL.updateWithMapper(this::update, additionalAttributes)
.set(entityType).equalToWhenPresent(record::getEntityType)

View file

@ -6,34 +6,34 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class ClientConnectionRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.122+02:00", comments="Source Table: client_connection")
public static final ClientConnectionRecord clientConnectionRecord = new ClientConnectionRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.123+02:00", comments="Source field: client_connection.id")
public static final SqlColumn<Long> id = clientConnectionRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source field: client_connection.exam_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.123+02:00", comments="Source field: client_connection.exam_id")
public static final SqlColumn<Long> examId = clientConnectionRecord.examId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source field: client_connection.status")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.124+02:00", comments="Source field: client_connection.status")
public static final SqlColumn<String> status = clientConnectionRecord.status;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source field: client_connection.connection_token")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.124+02:00", comments="Source field: client_connection.connection_token")
public static final SqlColumn<String> connectionToken = clientConnectionRecord.connectionToken;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source field: client_connection.user_name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.124+02:00", comments="Source field: client_connection.user_name")
public static final SqlColumn<String> userName = clientConnectionRecord.userName;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source field: client_connection.vdi")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.124+02:00", comments="Source field: client_connection.vdi")
public static final SqlColumn<Boolean> vdi = clientConnectionRecord.vdi;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source field: client_connection.client_address")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.124+02:00", comments="Source field: client_connection.client_address")
public static final SqlColumn<String> clientAddress = clientConnectionRecord.clientAddress;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source field: client_connection.virtual_client_address")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source field: client_connection.virtual_client_address")
public static final SqlColumn<String> virtualClientAddress = clientConnectionRecord.virtualClientAddress;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.123+02:00", comments="Source Table: client_connection")
public static final class ClientConnectionRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface ClientConnectionRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<ClientConnectionRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -59,7 +59,7 @@ public interface ClientConnectionRecordMapper {
})
ClientConnectionRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.815+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -73,22 +73,22 @@ public interface ClientConnectionRecordMapper {
})
List<ClientConnectionRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(clientConnectionRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, clientConnectionRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, clientConnectionRecord)
.where(id, isEqualTo(id_))
@ -96,7 +96,7 @@ public interface ClientConnectionRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
default int insert(ClientConnectionRecord record) {
return insert(SqlBuilder.insert(record)
.into(clientConnectionRecord)
@ -111,7 +111,7 @@ public interface ClientConnectionRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.125+02:00", comments="Source Table: client_connection")
default int insertSelective(ClientConnectionRecord record) {
return insert(SqlBuilder.insert(record)
.into(clientConnectionRecord)
@ -126,19 +126,19 @@ public interface ClientConnectionRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.126+02:00", comments="Source Table: client_connection")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ClientConnectionRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, examId, status, connectionToken, userName, vdi, clientAddress, virtualClientAddress)
.from(clientConnectionRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.126+02:00", comments="Source Table: client_connection")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ClientConnectionRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, examId, status, connectionToken, userName, vdi, clientAddress, virtualClientAddress)
.from(clientConnectionRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.126+02:00", comments="Source Table: client_connection")
default ClientConnectionRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, examId, status, connectionToken, userName, vdi, clientAddress, virtualClientAddress)
.from(clientConnectionRecord)
@ -147,7 +147,7 @@ public interface ClientConnectionRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.126+02:00", comments="Source Table: client_connection")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ClientConnectionRecord record) {
return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord)
.set(examId).equalTo(record::getExamId)
@ -159,7 +159,7 @@ public interface ClientConnectionRecordMapper {
.set(virtualClientAddress).equalTo(record::getVirtualClientAddress);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.126+02:00", comments="Source Table: client_connection")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ClientConnectionRecord record) {
return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord)
.set(examId).equalToWhenPresent(record::getExamId)
@ -171,7 +171,7 @@ public interface ClientConnectionRecordMapper {
.set(virtualClientAddress).equalToWhenPresent(record::getVirtualClientAddress);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.126+02:00", comments="Source Table: client_connection")
default int updateByPrimaryKey(ClientConnectionRecord record) {
return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord)
.set(examId).equalTo(record::getExamId)
@ -186,7 +186,7 @@ public interface ClientConnectionRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.816+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.126+02:00", comments="Source Table: client_connection")
default int updateByPrimaryKeySelective(ClientConnectionRecord record) {
return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord)
.set(examId).equalToWhenPresent(record::getExamId)

View file

@ -7,31 +7,31 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class ClientEventRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.818+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.128+02:00", comments="Source Table: client_event")
public static final ClientEventRecord clientEventRecord = new ClientEventRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.818+02:00", comments="Source field: client_event.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.129+02:00", comments="Source field: client_event.id")
public static final SqlColumn<Long> id = clientEventRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.818+02:00", comments="Source field: client_event.connection_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.129+02:00", comments="Source field: client_event.connection_id")
public static final SqlColumn<Long> connectionId = clientEventRecord.connectionId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.818+02:00", comments="Source field: client_event.user_identifier")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.129+02:00", comments="Source field: client_event.user_identifier")
public static final SqlColumn<String> userIdentifier = clientEventRecord.userIdentifier;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.818+02:00", comments="Source field: client_event.type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.129+02:00", comments="Source field: client_event.type")
public static final SqlColumn<Integer> type = clientEventRecord.type;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.818+02:00", comments="Source field: client_event.timestamp")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.129+02:00", comments="Source field: client_event.timestamp")
public static final SqlColumn<Long> timestamp = clientEventRecord.timestamp;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source field: client_event.numeric_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.129+02:00", comments="Source field: client_event.numeric_value")
public static final SqlColumn<BigDecimal> numericValue = clientEventRecord.numericValue;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source field: client_event.text")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.129+02:00", comments="Source field: client_event.text")
public static final SqlColumn<String> text = clientEventRecord.text;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.818+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.129+02:00", comments="Source Table: client_event")
public static final class ClientEventRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -33,20 +33,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface ClientEventRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<ClientEventRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -59,7 +59,7 @@ public interface ClientEventRecordMapper {
})
ClientEventRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -72,22 +72,22 @@ public interface ClientEventRecordMapper {
})
List<ClientEventRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(clientEventRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, clientEventRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, clientEventRecord)
.where(id, isEqualTo(id_))
@ -95,7 +95,7 @@ public interface ClientEventRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
default int insert(ClientEventRecord record) {
return insert(SqlBuilder.insert(record)
.into(clientEventRecord)
@ -109,7 +109,7 @@ public interface ClientEventRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
default int insertSelective(ClientEventRecord record) {
return insert(SqlBuilder.insert(record)
.into(clientEventRecord)
@ -123,19 +123,19 @@ public interface ClientEventRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ClientEventRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, connectionId, userIdentifier, type, timestamp, numericValue, text)
.from(clientEventRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ClientEventRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, connectionId, userIdentifier, type, timestamp, numericValue, text)
.from(clientEventRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.819+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.130+02:00", comments="Source Table: client_event")
default ClientEventRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, connectionId, userIdentifier, type, timestamp, numericValue, text)
.from(clientEventRecord)
@ -144,7 +144,7 @@ public interface ClientEventRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.821+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.131+02:00", comments="Source Table: client_event")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ClientEventRecord record) {
return UpdateDSL.updateWithMapper(this::update, clientEventRecord)
.set(connectionId).equalTo(record::getConnectionId)
@ -155,7 +155,7 @@ public interface ClientEventRecordMapper {
.set(text).equalTo(record::getText);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.821+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.131+02:00", comments="Source Table: client_event")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ClientEventRecord record) {
return UpdateDSL.updateWithMapper(this::update, clientEventRecord)
.set(connectionId).equalToWhenPresent(record::getConnectionId)
@ -166,7 +166,7 @@ public interface ClientEventRecordMapper {
.set(text).equalToWhenPresent(record::getText);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.821+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.131+02:00", comments="Source Table: client_event")
default int updateByPrimaryKey(ClientEventRecord record) {
return UpdateDSL.updateWithMapper(this::update, clientEventRecord)
.set(connectionId).equalTo(record::getConnectionId)
@ -180,7 +180,7 @@ public interface ClientEventRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.821+02:00", comments="Source Table: client_event")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.131+02:00", comments="Source Table: client_event")
default int updateByPrimaryKeySelective(ClientEventRecord record) {
return UpdateDSL.updateWithMapper(this::update, clientEventRecord)
.set(connectionId).equalToWhenPresent(record::getConnectionId)

View file

@ -6,34 +6,34 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class ConfigurationAttributeRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.548+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.858+02:00", comments="Source Table: configuration_attribute")
public static final ConfigurationAttributeRecord configurationAttributeRecord = new ConfigurationAttributeRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.551+02:00", comments="Source field: configuration_attribute.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.861+02:00", comments="Source field: configuration_attribute.id")
public static final SqlColumn<Long> id = configurationAttributeRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.552+02:00", comments="Source field: configuration_attribute.name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.862+02:00", comments="Source field: configuration_attribute.name")
public static final SqlColumn<String> name = configurationAttributeRecord.name;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.552+02:00", comments="Source field: configuration_attribute.type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.863+02:00", comments="Source field: configuration_attribute.type")
public static final SqlColumn<String> type = configurationAttributeRecord.type;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.552+02:00", comments="Source field: configuration_attribute.parent_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.863+02:00", comments="Source field: configuration_attribute.parent_id")
public static final SqlColumn<Long> parentId = configurationAttributeRecord.parentId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.552+02:00", comments="Source field: configuration_attribute.resources")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.863+02:00", comments="Source field: configuration_attribute.resources")
public static final SqlColumn<String> resources = configurationAttributeRecord.resources;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.552+02:00", comments="Source field: configuration_attribute.validator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.864+02:00", comments="Source field: configuration_attribute.validator")
public static final SqlColumn<String> validator = configurationAttributeRecord.validator;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.553+02:00", comments="Source field: configuration_attribute.dependencies")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.864+02:00", comments="Source field: configuration_attribute.dependencies")
public static final SqlColumn<String> dependencies = configurationAttributeRecord.dependencies;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.553+02:00", comments="Source field: configuration_attribute.default_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.864+02:00", comments="Source field: configuration_attribute.default_value")
public static final SqlColumn<String> defaultValue = configurationAttributeRecord.defaultValue;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.550+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.861+02:00", comments="Source Table: configuration_attribute")
public static final class ConfigurationAttributeRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface ConfigurationAttributeRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.555+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.866+02:00", comments="Source Table: configuration_attribute")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.557+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.867+02:00", comments="Source Table: configuration_attribute")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.558+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.868+02:00", comments="Source Table: configuration_attribute")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<ConfigurationAttributeRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.561+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.870+02:00", comments="Source Table: configuration_attribute")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -59,7 +59,7 @@ public interface ConfigurationAttributeRecordMapper {
})
ConfigurationAttributeRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.562+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.871+02:00", comments="Source Table: configuration_attribute")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -73,22 +73,22 @@ public interface ConfigurationAttributeRecordMapper {
})
List<ConfigurationAttributeRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.563+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.873+02:00", comments="Source Table: configuration_attribute")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.564+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.874+02:00", comments="Source Table: configuration_attribute")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(configurationAttributeRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.565+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.875+02:00", comments="Source Table: configuration_attribute")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, configurationAttributeRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.566+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.876+02:00", comments="Source Table: configuration_attribute")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, configurationAttributeRecord)
.where(id, isEqualTo(id_))
@ -96,7 +96,7 @@ public interface ConfigurationAttributeRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.567+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.877+02:00", comments="Source Table: configuration_attribute")
default int insert(ConfigurationAttributeRecord record) {
return insert(SqlBuilder.insert(record)
.into(configurationAttributeRecord)
@ -111,7 +111,7 @@ public interface ConfigurationAttributeRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.569+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.879+02:00", comments="Source Table: configuration_attribute")
default int insertSelective(ConfigurationAttributeRecord record) {
return insert(SqlBuilder.insert(record)
.into(configurationAttributeRecord)
@ -126,19 +126,19 @@ public interface ConfigurationAttributeRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.570+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.880+02:00", comments="Source Table: configuration_attribute")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationAttributeRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, name, type, parentId, resources, validator, dependencies, defaultValue)
.from(configurationAttributeRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.572+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.881+02:00", comments="Source Table: configuration_attribute")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationAttributeRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, name, type, parentId, resources, validator, dependencies, defaultValue)
.from(configurationAttributeRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.573+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.882+02:00", comments="Source Table: configuration_attribute")
default ConfigurationAttributeRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, name, type, parentId, resources, validator, dependencies, defaultValue)
.from(configurationAttributeRecord)
@ -147,7 +147,7 @@ public interface ConfigurationAttributeRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.574+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.883+02:00", comments="Source Table: configuration_attribute")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ConfigurationAttributeRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord)
.set(name).equalTo(record::getName)
@ -159,7 +159,7 @@ public interface ConfigurationAttributeRecordMapper {
.set(defaultValue).equalTo(record::getDefaultValue);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.575+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.884+02:00", comments="Source Table: configuration_attribute")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ConfigurationAttributeRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord)
.set(name).equalToWhenPresent(record::getName)
@ -171,7 +171,7 @@ public interface ConfigurationAttributeRecordMapper {
.set(defaultValue).equalToWhenPresent(record::getDefaultValue);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.576+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.885+02:00", comments="Source Table: configuration_attribute")
default int updateByPrimaryKey(ConfigurationAttributeRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord)
.set(name).equalTo(record::getName)
@ -186,7 +186,7 @@ public interface ConfigurationAttributeRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.577+02:00", comments="Source Table: configuration_attribute")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:48.887+02:00", comments="Source Table: configuration_attribute")
default int updateByPrimaryKeySelective(ConfigurationAttributeRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord)
.set(name).equalToWhenPresent(record::getName)

View file

@ -6,34 +6,34 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class ConfigurationNodeRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.801+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.105+02:00", comments="Source Table: configuration_node")
public static final ConfigurationNodeRecord configurationNodeRecord = new ConfigurationNodeRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source field: configuration_node.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.105+02:00", comments="Source field: configuration_node.id")
public static final SqlColumn<Long> id = configurationNodeRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source field: configuration_node.institution_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.105+02:00", comments="Source field: configuration_node.institution_id")
public static final SqlColumn<Long> institutionId = configurationNodeRecord.institutionId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source field: configuration_node.template_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.105+02:00", comments="Source field: configuration_node.template_id")
public static final SqlColumn<Long> templateId = configurationNodeRecord.templateId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source field: configuration_node.owner")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.105+02:00", comments="Source field: configuration_node.owner")
public static final SqlColumn<String> owner = configurationNodeRecord.owner;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source field: configuration_node.name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.105+02:00", comments="Source field: configuration_node.name")
public static final SqlColumn<String> name = configurationNodeRecord.name;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source field: configuration_node.description")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.105+02:00", comments="Source field: configuration_node.description")
public static final SqlColumn<String> description = configurationNodeRecord.description;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source field: configuration_node.type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.106+02:00", comments="Source field: configuration_node.type")
public static final SqlColumn<String> type = configurationNodeRecord.type;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source field: configuration_node.active")
public static final SqlColumn<Integer> active = configurationNodeRecord.active;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.106+02:00", comments="Source field: configuration_node.status")
public static final SqlColumn<String> status = configurationNodeRecord.status;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.105+02:00", comments="Source Table: configuration_node")
public static final class ConfigurationNodeRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
@ -49,7 +49,7 @@ public final class ConfigurationNodeRecordDynamicSqlSupport {
public final SqlColumn<String> type = column("type", JDBCType.VARCHAR);
public final SqlColumn<Integer> active = column("active", JDBCType.INTEGER);
public final SqlColumn<String> status = column("status", JDBCType.VARCHAR);
public ConfigurationNodeRecord() {
super("configuration_node");

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface ConfigurationNodeRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.107+02:00", comments="Source Table: configuration_node")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.107+02:00", comments="Source Table: configuration_node")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.107+02:00", comments="Source Table: configuration_node")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<ConfigurationNodeRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.108+02:00", comments="Source Table: configuration_node")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -55,11 +55,11 @@ public interface ConfigurationNodeRecordMapper {
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="description", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="active", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
@Arg(column="status", javaType=String.class, jdbcType=JdbcType.VARCHAR)
})
ConfigurationNodeRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.802+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.108+02:00", comments="Source Table: configuration_node")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -69,26 +69,26 @@ public interface ConfigurationNodeRecordMapper {
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="description", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="active", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
@Arg(column="status", javaType=String.class, jdbcType=JdbcType.VARCHAR)
})
List<ConfigurationNodeRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.108+02:00", comments="Source Table: configuration_node")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.108+02:00", comments="Source Table: configuration_node")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(configurationNodeRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.108+02:00", comments="Source Table: configuration_node")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, configurationNodeRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.108+02:00", comments="Source Table: configuration_node")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, configurationNodeRecord)
.where(id, isEqualTo(id_))
@ -96,7 +96,7 @@ public interface ConfigurationNodeRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.109+02:00", comments="Source Table: configuration_node")
default int insert(ConfigurationNodeRecord record) {
return insert(SqlBuilder.insert(record)
.into(configurationNodeRecord)
@ -106,12 +106,12 @@ public interface ConfigurationNodeRecordMapper {
.map(name).toProperty("name")
.map(description).toProperty("description")
.map(type).toProperty("type")
.map(active).toProperty("active")
.map(status).toProperty("status")
.build()
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.109+02:00", comments="Source Table: configuration_node")
default int insertSelective(ConfigurationNodeRecord record) {
return insert(SqlBuilder.insert(record)
.into(configurationNodeRecord)
@ -121,33 +121,33 @@ public interface ConfigurationNodeRecordMapper {
.map(name).toPropertyWhenPresent("name", record::getName)
.map(description).toPropertyWhenPresent("description", record::getDescription)
.map(type).toPropertyWhenPresent("type", record::getType)
.map(active).toPropertyWhenPresent("active", record::getActive)
.map(status).toPropertyWhenPresent("status", record::getStatus)
.build()
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.109+02:00", comments="Source Table: configuration_node")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationNodeRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, templateId, owner, name, description, type, active)
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, templateId, owner, name, description, type, status)
.from(configurationNodeRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.109+02:00", comments="Source Table: configuration_node")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationNodeRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, templateId, owner, name, description, type, active)
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, templateId, owner, name, description, type, status)
.from(configurationNodeRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.109+02:00", comments="Source Table: configuration_node")
default ConfigurationNodeRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, templateId, owner, name, description, type, active)
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, templateId, owner, name, description, type, status)
.from(configurationNodeRecord)
.where(id, isEqualTo(id_))
.build()
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.109+02:00", comments="Source Table: configuration_node")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ConfigurationNodeRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -156,10 +156,10 @@ public interface ConfigurationNodeRecordMapper {
.set(name).equalTo(record::getName)
.set(description).equalTo(record::getDescription)
.set(type).equalTo(record::getType)
.set(active).equalTo(record::getActive);
.set(status).equalTo(record::getStatus);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.109+02:00", comments="Source Table: configuration_node")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ConfigurationNodeRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
@ -168,10 +168,10 @@ public interface ConfigurationNodeRecordMapper {
.set(name).equalToWhenPresent(record::getName)
.set(description).equalToWhenPresent(record::getDescription)
.set(type).equalToWhenPresent(record::getType)
.set(active).equalToWhenPresent(record::getActive);
.set(status).equalToWhenPresent(record::getStatus);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.803+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.109+02:00", comments="Source Table: configuration_node")
default int updateByPrimaryKey(ConfigurationNodeRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -180,13 +180,13 @@ public interface ConfigurationNodeRecordMapper {
.set(name).equalTo(record::getName)
.set(description).equalTo(record::getDescription)
.set(type).equalTo(record::getType)
.set(active).equalTo(record::getActive)
.set(status).equalTo(record::getStatus)
.where(id, isEqualTo(record::getId))
.build()
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.804+02:00", comments="Source Table: configuration_node")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.109+02:00", comments="Source Table: configuration_node")
default int updateByPrimaryKeySelective(ConfigurationNodeRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
@ -195,7 +195,7 @@ public interface ConfigurationNodeRecordMapper {
.set(name).equalToWhenPresent(record::getName)
.set(description).equalToWhenPresent(record::getDescription)
.set(type).equalToWhenPresent(record::getType)
.set(active).equalToWhenPresent(record::getActive)
.set(status).equalToWhenPresent(record::getStatus)
.where(id, isEqualTo(record::getId))
.build()
.execute();

View file

@ -7,28 +7,28 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class ConfigurationRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.794+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.101+02:00", comments="Source Table: configuration")
public static final ConfigurationRecord configurationRecord = new ConfigurationRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.796+02:00", comments="Source field: configuration.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.101+02:00", comments="Source field: configuration.id")
public static final SqlColumn<Long> id = configurationRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.797+02:00", comments="Source field: configuration.institution_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.101+02:00", comments="Source field: configuration.institution_id")
public static final SqlColumn<Long> institutionId = configurationRecord.institutionId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.797+02:00", comments="Source field: configuration.configuration_node_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.101+02:00", comments="Source field: configuration.configuration_node_id")
public static final SqlColumn<Long> configurationNodeId = configurationRecord.configurationNodeId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.798+02:00", comments="Source field: configuration.version")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.101+02:00", comments="Source field: configuration.version")
public static final SqlColumn<String> version = configurationRecord.version;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.798+02:00", comments="Source field: configuration.version_date")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.101+02:00", comments="Source field: configuration.version_date")
public static final SqlColumn<DateTime> versionDate = configurationRecord.versionDate;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.798+02:00", comments="Source field: configuration.followup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.101+02:00", comments="Source field: configuration.followup")
public static final SqlColumn<Integer> followup = configurationRecord.followup;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.795+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.101+02:00", comments="Source Table: configuration")
public static final class ConfigurationRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -34,20 +34,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface ConfigurationRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.798+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.798+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.798+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<ConfigurationRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.798+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -59,7 +59,7 @@ public interface ConfigurationRecordMapper {
})
ConfigurationRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.798+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -71,22 +71,22 @@ public interface ConfigurationRecordMapper {
})
List<ConfigurationRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.799+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.799+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(configurationRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.799+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, configurationRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.799+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, configurationRecord)
.where(id, isEqualTo(id_))
@ -94,7 +94,7 @@ public interface ConfigurationRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.799+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
default int insert(ConfigurationRecord record) {
return insert(SqlBuilder.insert(record)
.into(configurationRecord)
@ -107,7 +107,7 @@ public interface ConfigurationRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.799+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
default int insertSelective(ConfigurationRecord record) {
return insert(SqlBuilder.insert(record)
.into(configurationRecord)
@ -120,19 +120,19 @@ public interface ConfigurationRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.799+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, configurationNodeId, version, versionDate, followup)
.from(configurationRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.799+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, configurationNodeId, version, versionDate, followup)
.from(configurationRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.799+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.102+02:00", comments="Source Table: configuration")
default ConfigurationRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, configurationNodeId, version, versionDate, followup)
.from(configurationRecord)
@ -141,7 +141,7 @@ public interface ConfigurationRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.799+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.103+02:00", comments="Source Table: configuration")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ConfigurationRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -151,7 +151,7 @@ public interface ConfigurationRecordMapper {
.set(followup).equalTo(record::getFollowup);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.800+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.103+02:00", comments="Source Table: configuration")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ConfigurationRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
@ -161,7 +161,7 @@ public interface ConfigurationRecordMapper {
.set(followup).equalToWhenPresent(record::getFollowup);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.800+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.103+02:00", comments="Source Table: configuration")
default int updateByPrimaryKey(ConfigurationRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -174,7 +174,7 @@ public interface ConfigurationRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.800+02:00", comments="Source Table: configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.103+02:00", comments="Source Table: configuration")
default int updateByPrimaryKeySelective(ConfigurationRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)

View file

@ -6,31 +6,31 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class ConfigurationValueRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.769+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.075+02:00", comments="Source Table: configuration_value")
public static final ConfigurationValueRecord configurationValueRecord = new ConfigurationValueRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.769+02:00", comments="Source field: configuration_value.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.076+02:00", comments="Source field: configuration_value.id")
public static final SqlColumn<Long> id = configurationValueRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.769+02:00", comments="Source field: configuration_value.institution_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.076+02:00", comments="Source field: configuration_value.institution_id")
public static final SqlColumn<Long> institutionId = configurationValueRecord.institutionId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.770+02:00", comments="Source field: configuration_value.configuration_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.076+02:00", comments="Source field: configuration_value.configuration_id")
public static final SqlColumn<Long> configurationId = configurationValueRecord.configurationId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.770+02:00", comments="Source field: configuration_value.configuration_attribute_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.076+02:00", comments="Source field: configuration_value.configuration_attribute_id")
public static final SqlColumn<Long> configurationAttributeId = configurationValueRecord.configurationAttributeId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.771+02:00", comments="Source field: configuration_value.list_index")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.076+02:00", comments="Source field: configuration_value.list_index")
public static final SqlColumn<Integer> listIndex = configurationValueRecord.listIndex;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.771+02:00", comments="Source field: configuration_value.value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.077+02:00", comments="Source field: configuration_value.value")
public static final SqlColumn<String> value = configurationValueRecord.value;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.771+02:00", comments="Source field: configuration_value.text")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.077+02:00", comments="Source field: configuration_value.text")
public static final SqlColumn<String> text = configurationValueRecord.text;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.769+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.075+02:00", comments="Source Table: configuration_value")
public static final class ConfigurationValueRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface ConfigurationValueRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.771+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.077+02:00", comments="Source Table: configuration_value")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.771+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.077+02:00", comments="Source Table: configuration_value")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.771+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.077+02:00", comments="Source Table: configuration_value")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<ConfigurationValueRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.771+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.077+02:00", comments="Source Table: configuration_value")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -58,7 +58,7 @@ public interface ConfigurationValueRecordMapper {
})
ConfigurationValueRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.771+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.080+02:00", comments="Source Table: configuration_value")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -71,22 +71,22 @@ public interface ConfigurationValueRecordMapper {
})
List<ConfigurationValueRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.771+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.081+02:00", comments="Source Table: configuration_value")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.771+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.081+02:00", comments="Source Table: configuration_value")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(configurationValueRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.081+02:00", comments="Source Table: configuration_value")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, configurationValueRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.081+02:00", comments="Source Table: configuration_value")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, configurationValueRecord)
.where(id, isEqualTo(id_))
@ -94,7 +94,7 @@ public interface ConfigurationValueRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.081+02:00", comments="Source Table: configuration_value")
default int insert(ConfigurationValueRecord record) {
return insert(SqlBuilder.insert(record)
.into(configurationValueRecord)
@ -108,7 +108,7 @@ public interface ConfigurationValueRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.081+02:00", comments="Source Table: configuration_value")
default int insertSelective(ConfigurationValueRecord record) {
return insert(SqlBuilder.insert(record)
.into(configurationValueRecord)
@ -122,19 +122,19 @@ public interface ConfigurationValueRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.082+02:00", comments="Source Table: configuration_value")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationValueRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, configurationId, configurationAttributeId, listIndex, value, text)
.from(configurationValueRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.082+02:00", comments="Source Table: configuration_value")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationValueRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, configurationId, configurationAttributeId, listIndex, value, text)
.from(configurationValueRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.082+02:00", comments="Source Table: configuration_value")
default ConfigurationValueRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, configurationId, configurationAttributeId, listIndex, value, text)
.from(configurationValueRecord)
@ -143,7 +143,7 @@ public interface ConfigurationValueRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.083+02:00", comments="Source Table: configuration_value")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ConfigurationValueRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationValueRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -154,7 +154,7 @@ public interface ConfigurationValueRecordMapper {
.set(text).equalTo(record::getText);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.083+02:00", comments="Source Table: configuration_value")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ConfigurationValueRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationValueRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
@ -165,7 +165,7 @@ public interface ConfigurationValueRecordMapper {
.set(text).equalToWhenPresent(record::getText);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.083+02:00", comments="Source Table: configuration_value")
default int updateByPrimaryKey(ConfigurationValueRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationValueRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -179,7 +179,7 @@ public interface ConfigurationValueRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.772+02:00", comments="Source Table: configuration_value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.083+02:00", comments="Source Table: configuration_value")
default int updateByPrimaryKeySelective(ConfigurationValueRecord record) {
return UpdateDSL.updateWithMapper(this::update, configurationValueRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)

View file

@ -6,25 +6,25 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class ExamConfigurationMapRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.805+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.112+02:00", comments="Source Table: exam_configuration_map")
public static final ExamConfigurationMapRecord examConfigurationMapRecord = new ExamConfigurationMapRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.805+02:00", comments="Source field: exam_configuration_map.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.112+02:00", comments="Source field: exam_configuration_map.id")
public static final SqlColumn<Long> id = examConfigurationMapRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source field: exam_configuration_map.institution_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.112+02:00", comments="Source field: exam_configuration_map.institution_id")
public static final SqlColumn<Long> institutionId = examConfigurationMapRecord.institutionId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source field: exam_configuration_map.exam_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.113+02:00", comments="Source field: exam_configuration_map.exam_id")
public static final SqlColumn<Long> examId = examConfigurationMapRecord.examId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source field: exam_configuration_map.configuration_node_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.113+02:00", comments="Source field: exam_configuration_map.configuration_node_id")
public static final SqlColumn<Long> configurationNodeId = examConfigurationMapRecord.configurationNodeId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source field: exam_configuration_map.user_names")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.113+02:00", comments="Source field: exam_configuration_map.user_names")
public static final SqlColumn<String> userNames = examConfigurationMapRecord.userNames;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.805+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.112+02:00", comments="Source Table: exam_configuration_map")
public static final class ExamConfigurationMapRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface ExamConfigurationMapRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.113+02:00", comments="Source Table: exam_configuration_map")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.113+02:00", comments="Source Table: exam_configuration_map")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.113+02:00", comments="Source Table: exam_configuration_map")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<ExamConfigurationMapRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.113+02:00", comments="Source Table: exam_configuration_map")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -56,7 +56,7 @@ public interface ExamConfigurationMapRecordMapper {
})
ExamConfigurationMapRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.113+02:00", comments="Source Table: exam_configuration_map")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -67,22 +67,22 @@ public interface ExamConfigurationMapRecordMapper {
})
List<ExamConfigurationMapRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.113+02:00", comments="Source Table: exam_configuration_map")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.113+02:00", comments="Source Table: exam_configuration_map")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(examConfigurationMapRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.114+02:00", comments="Source Table: exam_configuration_map")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, examConfigurationMapRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.114+02:00", comments="Source Table: exam_configuration_map")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, examConfigurationMapRecord)
.where(id, isEqualTo(id_))
@ -90,7 +90,7 @@ public interface ExamConfigurationMapRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.806+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.114+02:00", comments="Source Table: exam_configuration_map")
default int insert(ExamConfigurationMapRecord record) {
return insert(SqlBuilder.insert(record)
.into(examConfigurationMapRecord)
@ -102,7 +102,7 @@ public interface ExamConfigurationMapRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.807+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.114+02:00", comments="Source Table: exam_configuration_map")
default int insertSelective(ExamConfigurationMapRecord record) {
return insert(SqlBuilder.insert(record)
.into(examConfigurationMapRecord)
@ -114,19 +114,19 @@ public interface ExamConfigurationMapRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.807+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.114+02:00", comments="Source Table: exam_configuration_map")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ExamConfigurationMapRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, examId, configurationNodeId, userNames)
.from(examConfigurationMapRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.807+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.114+02:00", comments="Source Table: exam_configuration_map")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ExamConfigurationMapRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, examId, configurationNodeId, userNames)
.from(examConfigurationMapRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.807+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.114+02:00", comments="Source Table: exam_configuration_map")
default ExamConfigurationMapRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, examId, configurationNodeId, userNames)
.from(examConfigurationMapRecord)
@ -135,7 +135,7 @@ public interface ExamConfigurationMapRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.807+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.114+02:00", comments="Source Table: exam_configuration_map")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ExamConfigurationMapRecord record) {
return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -144,7 +144,7 @@ public interface ExamConfigurationMapRecordMapper {
.set(userNames).equalTo(record::getUserNames);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.807+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.114+02:00", comments="Source Table: exam_configuration_map")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ExamConfigurationMapRecord record) {
return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
@ -153,7 +153,7 @@ public interface ExamConfigurationMapRecordMapper {
.set(userNames).equalToWhenPresent(record::getUserNames);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.807+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.114+02:00", comments="Source Table: exam_configuration_map")
default int updateByPrimaryKey(ExamConfigurationMapRecord record) {
return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -165,7 +165,7 @@ public interface ExamConfigurationMapRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.807+02:00", comments="Source Table: exam_configuration_map")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.115+02:00", comments="Source Table: exam_configuration_map")
default int updateByPrimaryKeySelective(ExamConfigurationMapRecord record) {
return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)

View file

@ -6,37 +6,37 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class ExamRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.810+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.117+02:00", comments="Source Table: exam")
public static final ExamRecord examRecord = new ExamRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.810+02:00", comments="Source field: exam.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.117+02:00", comments="Source field: exam.id")
public static final SqlColumn<Long> id = examRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.810+02:00", comments="Source field: exam.institution_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.117+02:00", comments="Source field: exam.institution_id")
public static final SqlColumn<Long> institutionId = examRecord.institutionId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.810+02:00", comments="Source field: exam.lms_setup_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.117+02:00", comments="Source field: exam.lms_setup_id")
public static final SqlColumn<Long> lmsSetupId = examRecord.lmsSetupId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source field: exam.external_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.117+02:00", comments="Source field: exam.external_id")
public static final SqlColumn<String> externalId = examRecord.externalId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source field: exam.owner")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source field: exam.owner")
public static final SqlColumn<String> owner = examRecord.owner;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source field: exam.supporter")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source field: exam.supporter")
public static final SqlColumn<String> supporter = examRecord.supporter;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source field: exam.type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source field: exam.type")
public static final SqlColumn<String> type = examRecord.type;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source field: exam.quit_password")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source field: exam.quit_password")
public static final SqlColumn<String> quitPassword = examRecord.quitPassword;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source field: exam.active")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source field: exam.active")
public static final SqlColumn<Integer> active = examRecord.active;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.810+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.117+02:00", comments="Source Table: exam")
public static final class ExamRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface ExamRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source Table: exam")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source Table: exam")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source Table: exam")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<ExamRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source Table: exam")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -60,7 +60,7 @@ public interface ExamRecordMapper {
})
ExamRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source Table: exam")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -75,22 +75,22 @@ public interface ExamRecordMapper {
})
List<ExamRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.118+02:00", comments="Source Table: exam")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.119+02:00", comments="Source Table: exam")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(examRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.811+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.119+02:00", comments="Source Table: exam")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, examRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.812+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.119+02:00", comments="Source Table: exam")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, examRecord)
.where(id, isEqualTo(id_))
@ -98,7 +98,7 @@ public interface ExamRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.812+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.119+02:00", comments="Source Table: exam")
default int insert(ExamRecord record) {
return insert(SqlBuilder.insert(record)
.into(examRecord)
@ -114,7 +114,7 @@ public interface ExamRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.812+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.119+02:00", comments="Source Table: exam")
default int insertSelective(ExamRecord record) {
return insert(SqlBuilder.insert(record)
.into(examRecord)
@ -130,19 +130,19 @@ public interface ExamRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.812+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.119+02:00", comments="Source Table: exam")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ExamRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, lmsSetupId, externalId, owner, supporter, type, quitPassword, active)
.from(examRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.812+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.119+02:00", comments="Source Table: exam")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ExamRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, lmsSetupId, externalId, owner, supporter, type, quitPassword, active)
.from(examRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.812+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.119+02:00", comments="Source Table: exam")
default ExamRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, lmsSetupId, externalId, owner, supporter, type, quitPassword, active)
.from(examRecord)
@ -151,7 +151,7 @@ public interface ExamRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.812+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.119+02:00", comments="Source Table: exam")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ExamRecord record) {
return UpdateDSL.updateWithMapper(this::update, examRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -164,7 +164,7 @@ public interface ExamRecordMapper {
.set(active).equalTo(record::getActive);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.812+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.120+02:00", comments="Source Table: exam")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ExamRecord record) {
return UpdateDSL.updateWithMapper(this::update, examRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
@ -177,7 +177,7 @@ public interface ExamRecordMapper {
.set(active).equalToWhenPresent(record::getActive);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.812+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.120+02:00", comments="Source Table: exam")
default int updateByPrimaryKey(ExamRecord record) {
return UpdateDSL.updateWithMapper(this::update, examRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -193,7 +193,7 @@ public interface ExamRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.812+02:00", comments="Source Table: exam")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.120+02:00", comments="Source Table: exam")
default int updateByPrimaryKeySelective(ExamRecord record) {
return UpdateDSL.updateWithMapper(this::update, examRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)

View file

@ -6,25 +6,25 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class IndicatorRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.823+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.132+02:00", comments="Source Table: indicator")
public static final IndicatorRecord indicatorRecord = new IndicatorRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.823+02:00", comments="Source field: indicator.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.132+02:00", comments="Source field: indicator.id")
public static final SqlColumn<Long> id = indicatorRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.823+02:00", comments="Source field: indicator.exam_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.132+02:00", comments="Source field: indicator.exam_id")
public static final SqlColumn<Long> examId = indicatorRecord.examId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.827+02:00", comments="Source field: indicator.type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.132+02:00", comments="Source field: indicator.type")
public static final SqlColumn<String> type = indicatorRecord.type;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.827+02:00", comments="Source field: indicator.name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source field: indicator.name")
public static final SqlColumn<String> name = indicatorRecord.name;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.827+02:00", comments="Source field: indicator.color")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source field: indicator.color")
public static final SqlColumn<String> color = indicatorRecord.color;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.823+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.132+02:00", comments="Source Table: indicator")
public static final class IndicatorRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface IndicatorRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.827+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.827+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.827+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<IndicatorRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.827+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -56,7 +56,7 @@ public interface IndicatorRecordMapper {
})
IndicatorRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.827+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -67,22 +67,22 @@ public interface IndicatorRecordMapper {
})
List<IndicatorRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(indicatorRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, indicatorRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, indicatorRecord)
.where(id, isEqualTo(id_))
@ -90,7 +90,7 @@ public interface IndicatorRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
default int insert(IndicatorRecord record) {
return insert(SqlBuilder.insert(record)
.into(indicatorRecord)
@ -102,7 +102,7 @@ public interface IndicatorRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
default int insertSelective(IndicatorRecord record) {
return insert(SqlBuilder.insert(record)
.into(indicatorRecord)
@ -114,19 +114,19 @@ public interface IndicatorRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.133+02:00", comments="Source Table: indicator")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<IndicatorRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, examId, type, name, color)
.from(indicatorRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.134+02:00", comments="Source Table: indicator")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<IndicatorRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, examId, type, name, color)
.from(indicatorRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.134+02:00", comments="Source Table: indicator")
default IndicatorRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, examId, type, name, color)
.from(indicatorRecord)
@ -135,7 +135,7 @@ public interface IndicatorRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.134+02:00", comments="Source Table: indicator")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(IndicatorRecord record) {
return UpdateDSL.updateWithMapper(this::update, indicatorRecord)
.set(examId).equalTo(record::getExamId)
@ -144,7 +144,7 @@ public interface IndicatorRecordMapper {
.set(color).equalTo(record::getColor);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.828+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.134+02:00", comments="Source Table: indicator")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(IndicatorRecord record) {
return UpdateDSL.updateWithMapper(this::update, indicatorRecord)
.set(examId).equalToWhenPresent(record::getExamId)
@ -153,7 +153,7 @@ public interface IndicatorRecordMapper {
.set(color).equalToWhenPresent(record::getColor);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.829+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.134+02:00", comments="Source Table: indicator")
default int updateByPrimaryKey(IndicatorRecord record) {
return UpdateDSL.updateWithMapper(this::update, indicatorRecord)
.set(examId).equalTo(record::getExamId)
@ -165,7 +165,7 @@ public interface IndicatorRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.829+02:00", comments="Source Table: indicator")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.134+02:00", comments="Source Table: indicator")
default int updateByPrimaryKeySelective(IndicatorRecord record) {
return UpdateDSL.updateWithMapper(this::update, indicatorRecord)
.set(examId).equalToWhenPresent(record::getExamId)

View file

@ -6,28 +6,28 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class InstitutionRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.835+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.147+02:00", comments="Source Table: institution")
public static final InstitutionRecord institutionRecord = new InstitutionRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.835+02:00", comments="Source field: institution.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.147+02:00", comments="Source field: institution.id")
public static final SqlColumn<Long> id = institutionRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.835+02:00", comments="Source field: institution.name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.148+02:00", comments="Source field: institution.name")
public static final SqlColumn<String> name = institutionRecord.name;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.835+02:00", comments="Source field: institution.url_suffix")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.148+02:00", comments="Source field: institution.url_suffix")
public static final SqlColumn<String> urlSuffix = institutionRecord.urlSuffix;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.835+02:00", comments="Source field: institution.theme_name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.148+02:00", comments="Source field: institution.theme_name")
public static final SqlColumn<String> themeName = institutionRecord.themeName;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.835+02:00", comments="Source field: institution.active")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.148+02:00", comments="Source field: institution.active")
public static final SqlColumn<Integer> active = institutionRecord.active;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source field: institution.logo_image")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.148+02:00", comments="Source field: institution.logo_image")
public static final SqlColumn<String> logoImage = institutionRecord.logoImage;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.835+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.147+02:00", comments="Source Table: institution")
public static final class InstitutionRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface InstitutionRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.148+02:00", comments="Source Table: institution")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.148+02:00", comments="Source Table: institution")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.148+02:00", comments="Source Table: institution")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<InstitutionRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.148+02:00", comments="Source Table: institution")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -57,7 +57,7 @@ public interface InstitutionRecordMapper {
})
InstitutionRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.149+02:00", comments="Source Table: institution")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -69,22 +69,22 @@ public interface InstitutionRecordMapper {
})
List<InstitutionRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.149+02:00", comments="Source Table: institution")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.149+02:00", comments="Source Table: institution")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(institutionRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.149+02:00", comments="Source Table: institution")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, institutionRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.149+02:00", comments="Source Table: institution")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, institutionRecord)
.where(id, isEqualTo(id_))
@ -92,7 +92,7 @@ public interface InstitutionRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.149+02:00", comments="Source Table: institution")
default int insert(InstitutionRecord record) {
return insert(SqlBuilder.insert(record)
.into(institutionRecord)
@ -105,7 +105,7 @@ public interface InstitutionRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.149+02:00", comments="Source Table: institution")
default int insertSelective(InstitutionRecord record) {
return insert(SqlBuilder.insert(record)
.into(institutionRecord)
@ -118,19 +118,19 @@ public interface InstitutionRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.836+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.149+02:00", comments="Source Table: institution")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<InstitutionRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, name, urlSuffix, themeName, active, logoImage)
.from(institutionRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.837+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.150+02:00", comments="Source Table: institution")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<InstitutionRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, name, urlSuffix, themeName, active, logoImage)
.from(institutionRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.837+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.150+02:00", comments="Source Table: institution")
default InstitutionRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, name, urlSuffix, themeName, active, logoImage)
.from(institutionRecord)
@ -139,7 +139,7 @@ public interface InstitutionRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.837+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.150+02:00", comments="Source Table: institution")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(InstitutionRecord record) {
return UpdateDSL.updateWithMapper(this::update, institutionRecord)
.set(name).equalTo(record::getName)
@ -149,7 +149,7 @@ public interface InstitutionRecordMapper {
.set(logoImage).equalTo(record::getLogoImage);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.837+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.150+02:00", comments="Source Table: institution")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(InstitutionRecord record) {
return UpdateDSL.updateWithMapper(this::update, institutionRecord)
.set(name).equalToWhenPresent(record::getName)
@ -159,7 +159,7 @@ public interface InstitutionRecordMapper {
.set(logoImage).equalToWhenPresent(record::getLogoImage);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.837+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.151+02:00", comments="Source Table: institution")
default int updateByPrimaryKey(InstitutionRecord record) {
return UpdateDSL.updateWithMapper(this::update, institutionRecord)
.set(name).equalTo(record::getName)
@ -172,7 +172,7 @@ public interface InstitutionRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.837+02:00", comments="Source Table: institution")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.153+02:00", comments="Source Table: institution")
default int updateByPrimaryKeySelective(InstitutionRecord record) {
return UpdateDSL.updateWithMapper(this::update, institutionRecord)
.set(name).equalToWhenPresent(record::getName)

View file

@ -6,37 +6,37 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class LmsSetupRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.844+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.165+02:00", comments="Source Table: lms_setup")
public static final LmsSetupRecord lmsSetupRecord = new LmsSetupRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.844+02:00", comments="Source field: lms_setup.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.165+02:00", comments="Source field: lms_setup.id")
public static final SqlColumn<Long> id = lmsSetupRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.844+02:00", comments="Source field: lms_setup.institution_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.165+02:00", comments="Source field: lms_setup.institution_id")
public static final SqlColumn<Long> institutionId = lmsSetupRecord.institutionId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.844+02:00", comments="Source field: lms_setup.name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.165+02:00", comments="Source field: lms_setup.name")
public static final SqlColumn<String> name = lmsSetupRecord.name;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.844+02:00", comments="Source field: lms_setup.lms_type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.165+02:00", comments="Source field: lms_setup.lms_type")
public static final SqlColumn<String> lmsType = lmsSetupRecord.lmsType;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source field: lms_setup.lms_url")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source field: lms_setup.lms_url")
public static final SqlColumn<String> lmsUrl = lmsSetupRecord.lmsUrl;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source field: lms_setup.lms_clientname")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source field: lms_setup.lms_clientname")
public static final SqlColumn<String> lmsClientname = lmsSetupRecord.lmsClientname;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source field: lms_setup.lms_clientsecret")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source field: lms_setup.lms_clientsecret")
public static final SqlColumn<String> lmsClientsecret = lmsSetupRecord.lmsClientsecret;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source field: lms_setup.lms_rest_api_token")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source field: lms_setup.lms_rest_api_token")
public static final SqlColumn<String> lmsRestApiToken = lmsSetupRecord.lmsRestApiToken;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source field: lms_setup.active")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source field: lms_setup.active")
public static final SqlColumn<Integer> active = lmsSetupRecord.active;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.844+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.165+02:00", comments="Source Table: lms_setup")
public static final class LmsSetupRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface LmsSetupRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source Table: lms_setup")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source Table: lms_setup")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source Table: lms_setup")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<LmsSetupRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source Table: lms_setup")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -60,7 +60,7 @@ public interface LmsSetupRecordMapper {
})
LmsSetupRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source Table: lms_setup")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -75,22 +75,22 @@ public interface LmsSetupRecordMapper {
})
List<LmsSetupRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source Table: lms_setup")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.166+02:00", comments="Source Table: lms_setup")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(lmsSetupRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.167+02:00", comments="Source Table: lms_setup")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, lmsSetupRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.167+02:00", comments="Source Table: lms_setup")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, lmsSetupRecord)
.where(id, isEqualTo(id_))
@ -98,7 +98,7 @@ public interface LmsSetupRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.167+02:00", comments="Source Table: lms_setup")
default int insert(LmsSetupRecord record) {
return insert(SqlBuilder.insert(record)
.into(lmsSetupRecord)
@ -114,7 +114,7 @@ public interface LmsSetupRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.845+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.167+02:00", comments="Source Table: lms_setup")
default int insertSelective(LmsSetupRecord record) {
return insert(SqlBuilder.insert(record)
.into(lmsSetupRecord)
@ -130,19 +130,19 @@ public interface LmsSetupRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.846+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.167+02:00", comments="Source Table: lms_setup")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<LmsSetupRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, active)
.from(lmsSetupRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.846+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.168+02:00", comments="Source Table: lms_setup")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<LmsSetupRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, active)
.from(lmsSetupRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.846+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.168+02:00", comments="Source Table: lms_setup")
default LmsSetupRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, active)
.from(lmsSetupRecord)
@ -151,7 +151,7 @@ public interface LmsSetupRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.846+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.168+02:00", comments="Source Table: lms_setup")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(LmsSetupRecord record) {
return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -164,7 +164,7 @@ public interface LmsSetupRecordMapper {
.set(active).equalTo(record::getActive);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.846+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.168+02:00", comments="Source Table: lms_setup")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(LmsSetupRecord record) {
return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
@ -177,7 +177,7 @@ public interface LmsSetupRecordMapper {
.set(active).equalToWhenPresent(record::getActive);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.846+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.168+02:00", comments="Source Table: lms_setup")
default int updateByPrimaryKey(LmsSetupRecord record) {
return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -193,7 +193,7 @@ public interface LmsSetupRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.846+02:00", comments="Source Table: lms_setup")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.168+02:00", comments="Source Table: lms_setup")
default int updateByPrimaryKeySelective(LmsSetupRecord record) {
return UpdateDSL.updateWithMapper(this::update, lmsSetupRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)

View file

@ -6,40 +6,40 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class OrientationRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.779+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.095+02:00", comments="Source Table: orientation")
public static final OrientationRecord orientationRecord = new OrientationRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.780+02:00", comments="Source field: orientation.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.096+02:00", comments="Source field: orientation.id")
public static final SqlColumn<Long> id = orientationRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.780+02:00", comments="Source field: orientation.config_attribute_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.096+02:00", comments="Source field: orientation.config_attribute_id")
public static final SqlColumn<Long> configAttributeId = orientationRecord.configAttributeId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.781+02:00", comments="Source field: orientation.template_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.096+02:00", comments="Source field: orientation.template_id")
public static final SqlColumn<Long> templateId = orientationRecord.templateId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.781+02:00", comments="Source field: orientation.view")
public static final SqlColumn<String> view = orientationRecord.view;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.096+02:00", comments="Source field: orientation.view_id")
public static final SqlColumn<Long> viewId = orientationRecord.viewId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.781+02:00", comments="Source field: orientation.group")
public static final SqlColumn<String> group = orientationRecord.group;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.096+02:00", comments="Source field: orientation.group_id")
public static final SqlColumn<String> groupId = orientationRecord.groupId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.782+02:00", comments="Source field: orientation.x_position")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.097+02:00", comments="Source field: orientation.x_position")
public static final SqlColumn<Integer> xPosition = orientationRecord.xPosition;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.782+02:00", comments="Source field: orientation.y_position")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.097+02:00", comments="Source field: orientation.y_position")
public static final SqlColumn<Integer> yPosition = orientationRecord.yPosition;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.782+02:00", comments="Source field: orientation.width")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.097+02:00", comments="Source field: orientation.width")
public static final SqlColumn<Integer> width = orientationRecord.width;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.783+02:00", comments="Source field: orientation.height")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.097+02:00", comments="Source field: orientation.height")
public static final SqlColumn<Integer> height = orientationRecord.height;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.783+02:00", comments="Source field: orientation.title")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.097+02:00", comments="Source field: orientation.title")
public static final SqlColumn<String> title = orientationRecord.title;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.779+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.095+02:00", comments="Source Table: orientation")
public static final class OrientationRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
@ -47,9 +47,9 @@ public final class OrientationRecordDynamicSqlSupport {
public final SqlColumn<Long> templateId = column("template_id", JDBCType.BIGINT);
public final SqlColumn<String> view = column("view", JDBCType.VARCHAR);
public final SqlColumn<Long> viewId = column("view_id", JDBCType.BIGINT);
public final SqlColumn<String> group = column("group", JDBCType.VARCHAR);
public final SqlColumn<String> groupId = column("group_id", JDBCType.VARCHAR);
public final SqlColumn<Integer> xPosition = column("x_position", JDBCType.INTEGER);

View file

@ -32,27 +32,27 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface OrientationRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.783+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.097+02:00", comments="Source Table: orientation")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.783+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.098+02:00", comments="Source Table: orientation")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.783+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.098+02:00", comments="Source Table: orientation")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<OrientationRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.783+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.098+02:00", comments="Source Table: orientation")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@Arg(column="config_attribute_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
@Arg(column="template_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
@Arg(column="view", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="group", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="view_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
@Arg(column="group_id", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="x_position", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
@Arg(column="y_position", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
@Arg(column="width", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
@ -61,14 +61,14 @@ public interface OrientationRecordMapper {
})
OrientationRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.784+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.098+02:00", comments="Source Table: orientation")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@Arg(column="config_attribute_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
@Arg(column="template_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
@Arg(column="view", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="group", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="view_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
@Arg(column="group_id", javaType=String.class, jdbcType=JdbcType.VARCHAR),
@Arg(column="x_position", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
@Arg(column="y_position", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
@Arg(column="width", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
@ -77,22 +77,22 @@ public interface OrientationRecordMapper {
})
List<OrientationRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.784+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.098+02:00", comments="Source Table: orientation")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.784+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.098+02:00", comments="Source Table: orientation")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(orientationRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.784+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.098+02:00", comments="Source Table: orientation")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, orientationRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.784+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.098+02:00", comments="Source Table: orientation")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, orientationRecord)
.where(id, isEqualTo(id_))
@ -100,14 +100,14 @@ public interface OrientationRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.785+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.098+02:00", comments="Source Table: orientation")
default int insert(OrientationRecord record) {
return insert(SqlBuilder.insert(record)
.into(orientationRecord)
.map(configAttributeId).toProperty("configAttributeId")
.map(templateId).toProperty("templateId")
.map(view).toProperty("view")
.map(group).toProperty("group")
.map(viewId).toProperty("viewId")
.map(groupId).toProperty("groupId")
.map(xPosition).toProperty("xPosition")
.map(yPosition).toProperty("yPosition")
.map(width).toProperty("width")
@ -117,14 +117,14 @@ public interface OrientationRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.785+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.098+02:00", comments="Source Table: orientation")
default int insertSelective(OrientationRecord record) {
return insert(SqlBuilder.insert(record)
.into(orientationRecord)
.map(configAttributeId).toPropertyWhenPresent("configAttributeId", record::getConfigAttributeId)
.map(templateId).toPropertyWhenPresent("templateId", record::getTemplateId)
.map(view).toPropertyWhenPresent("view", record::getView)
.map(group).toPropertyWhenPresent("group", record::getGroup)
.map(viewId).toPropertyWhenPresent("viewId", record::getViewId)
.map(groupId).toPropertyWhenPresent("groupId", record::getGroupId)
.map(xPosition).toPropertyWhenPresent("xPosition", record::getxPosition)
.map(yPosition).toPropertyWhenPresent("yPosition", record::getyPosition)
.map(width).toPropertyWhenPresent("width", record::getWidth)
@ -134,34 +134,34 @@ public interface OrientationRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.785+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.099+02:00", comments="Source Table: orientation")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<OrientationRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, configAttributeId, templateId, view, group, xPosition, yPosition, width, height, title)
return SelectDSL.selectWithMapper(this::selectMany, id, configAttributeId, templateId, viewId, groupId, xPosition, yPosition, width, height, title)
.from(orientationRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.785+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.099+02:00", comments="Source Table: orientation")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<OrientationRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, configAttributeId, templateId, view, group, xPosition, yPosition, width, height, title)
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, configAttributeId, templateId, viewId, groupId, xPosition, yPosition, width, height, title)
.from(orientationRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.785+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.099+02:00", comments="Source Table: orientation")
default OrientationRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, configAttributeId, templateId, view, group, xPosition, yPosition, width, height, title)
return SelectDSL.selectWithMapper(this::selectOne, id, configAttributeId, templateId, viewId, groupId, xPosition, yPosition, width, height, title)
.from(orientationRecord)
.where(id, isEqualTo(id_))
.build()
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.785+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.099+02:00", comments="Source Table: orientation")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(OrientationRecord record) {
return UpdateDSL.updateWithMapper(this::update, orientationRecord)
.set(configAttributeId).equalTo(record::getConfigAttributeId)
.set(templateId).equalTo(record::getTemplateId)
.set(view).equalTo(record::getView)
.set(group).equalTo(record::getGroup)
.set(viewId).equalTo(record::getViewId)
.set(groupId).equalTo(record::getGroupId)
.set(xPosition).equalTo(record::getxPosition)
.set(yPosition).equalTo(record::getyPosition)
.set(width).equalTo(record::getWidth)
@ -169,13 +169,13 @@ public interface OrientationRecordMapper {
.set(title).equalTo(record::getTitle);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.785+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.099+02:00", comments="Source Table: orientation")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(OrientationRecord record) {
return UpdateDSL.updateWithMapper(this::update, orientationRecord)
.set(configAttributeId).equalToWhenPresent(record::getConfigAttributeId)
.set(templateId).equalToWhenPresent(record::getTemplateId)
.set(view).equalToWhenPresent(record::getView)
.set(group).equalToWhenPresent(record::getGroup)
.set(viewId).equalToWhenPresent(record::getViewId)
.set(groupId).equalToWhenPresent(record::getGroupId)
.set(xPosition).equalToWhenPresent(record::getxPosition)
.set(yPosition).equalToWhenPresent(record::getyPosition)
.set(width).equalToWhenPresent(record::getWidth)
@ -183,13 +183,13 @@ public interface OrientationRecordMapper {
.set(title).equalToWhenPresent(record::getTitle);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.788+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.099+02:00", comments="Source Table: orientation")
default int updateByPrimaryKey(OrientationRecord record) {
return UpdateDSL.updateWithMapper(this::update, orientationRecord)
.set(configAttributeId).equalTo(record::getConfigAttributeId)
.set(templateId).equalTo(record::getTemplateId)
.set(view).equalTo(record::getView)
.set(group).equalTo(record::getGroup)
.set(viewId).equalTo(record::getViewId)
.set(groupId).equalTo(record::getGroupId)
.set(xPosition).equalTo(record::getxPosition)
.set(yPosition).equalTo(record::getyPosition)
.set(width).equalTo(record::getWidth)
@ -200,13 +200,13 @@ public interface OrientationRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.789+02:00", comments="Source Table: orientation")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.099+02:00", comments="Source Table: orientation")
default int updateByPrimaryKeySelective(OrientationRecord record) {
return UpdateDSL.updateWithMapper(this::update, orientationRecord)
.set(configAttributeId).equalToWhenPresent(record::getConfigAttributeId)
.set(templateId).equalToWhenPresent(record::getTemplateId)
.set(view).equalToWhenPresent(record::getView)
.set(group).equalToWhenPresent(record::getGroup)
.set(viewId).equalToWhenPresent(record::getViewId)
.set(groupId).equalToWhenPresent(record::getGroupId)
.set(xPosition).equalToWhenPresent(record::getxPosition)
.set(yPosition).equalToWhenPresent(record::getyPosition)
.set(width).equalToWhenPresent(record::getWidth)

View file

@ -6,19 +6,19 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class RoleRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.852+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.173+02:00", comments="Source Table: user_role")
public static final RoleRecord roleRecord = new RoleRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.853+02:00", comments="Source field: user_role.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.173+02:00", comments="Source field: user_role.id")
public static final SqlColumn<Long> id = roleRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.853+02:00", comments="Source field: user_role.user_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.173+02:00", comments="Source field: user_role.user_id")
public static final SqlColumn<Long> userId = roleRecord.userId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.853+02:00", comments="Source field: user_role.role_name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source field: user_role.role_name")
public static final SqlColumn<String> roleName = roleRecord.roleName;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.853+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.173+02:00", comments="Source Table: user_role")
public static final class RoleRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface RoleRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<RoleRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -54,7 +54,7 @@ public interface RoleRecordMapper {
})
RoleRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -63,22 +63,22 @@ public interface RoleRecordMapper {
})
List<RoleRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(roleRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, roleRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, roleRecord)
.where(id, isEqualTo(id_))
@ -86,7 +86,7 @@ public interface RoleRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
default int insert(RoleRecord record) {
return insert(SqlBuilder.insert(record)
.into(roleRecord)
@ -96,7 +96,7 @@ public interface RoleRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
default int insertSelective(RoleRecord record) {
return insert(SqlBuilder.insert(record)
.into(roleRecord)
@ -106,19 +106,19 @@ public interface RoleRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<RoleRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, userId, roleName)
.from(roleRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<RoleRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, userId, roleName)
.from(roleRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
default RoleRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, userId, roleName)
.from(roleRecord)
@ -127,21 +127,21 @@ public interface RoleRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.174+02:00", comments="Source Table: user_role")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(RoleRecord record) {
return UpdateDSL.updateWithMapper(this::update, roleRecord)
.set(userId).equalTo(record::getUserId)
.set(roleName).equalTo(record::getRoleName);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.175+02:00", comments="Source Table: user_role")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(RoleRecord record) {
return UpdateDSL.updateWithMapper(this::update, roleRecord)
.set(userId).equalToWhenPresent(record::getUserId)
.set(roleName).equalToWhenPresent(record::getRoleName);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.175+02:00", comments="Source Table: user_role")
default int updateByPrimaryKey(RoleRecord record) {
return UpdateDSL.updateWithMapper(this::update, roleRecord)
.set(userId).equalTo(record::getUserId)
@ -151,7 +151,7 @@ public interface RoleRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.854+02:00", comments="Source Table: user_role")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.175+02:00", comments="Source Table: user_role")
default int updateByPrimaryKeySelective(RoleRecord record) {
return UpdateDSL.updateWithMapper(this::update, roleRecord)
.set(userId).equalToWhenPresent(record::getUserId)

View file

@ -7,34 +7,34 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class SebClientConfigRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.840+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.160+02:00", comments="Source Table: seb_client_configuration")
public static final SebClientConfigRecord sebClientConfigRecord = new SebClientConfigRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.840+02:00", comments="Source field: seb_client_configuration.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.160+02:00", comments="Source field: seb_client_configuration.id")
public static final SqlColumn<Long> id = sebClientConfigRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.840+02:00", comments="Source field: seb_client_configuration.institution_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.160+02:00", comments="Source field: seb_client_configuration.institution_id")
public static final SqlColumn<Long> institutionId = sebClientConfigRecord.institutionId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.840+02:00", comments="Source field: seb_client_configuration.name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.160+02:00", comments="Source field: seb_client_configuration.name")
public static final SqlColumn<String> name = sebClientConfigRecord.name;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.840+02:00", comments="Source field: seb_client_configuration.date")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.160+02:00", comments="Source field: seb_client_configuration.date")
public static final SqlColumn<DateTime> date = sebClientConfigRecord.date;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.840+02:00", comments="Source field: seb_client_configuration.client_name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.161+02:00", comments="Source field: seb_client_configuration.client_name")
public static final SqlColumn<String> clientName = sebClientConfigRecord.clientName;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.840+02:00", comments="Source field: seb_client_configuration.client_secret")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.161+02:00", comments="Source field: seb_client_configuration.client_secret")
public static final SqlColumn<String> clientSecret = sebClientConfigRecord.clientSecret;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source field: seb_client_configuration.encrypt_secret")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.161+02:00", comments="Source field: seb_client_configuration.encrypt_secret")
public static final SqlColumn<String> encryptSecret = sebClientConfigRecord.encryptSecret;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source field: seb_client_configuration.active")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.161+02:00", comments="Source field: seb_client_configuration.active")
public static final SqlColumn<Integer> active = sebClientConfigRecord.active;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.840+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.160+02:00", comments="Source Table: seb_client_configuration")
public static final class SebClientConfigRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -34,20 +34,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface SebClientConfigRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.161+02:00", comments="Source Table: seb_client_configuration")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.161+02:00", comments="Source Table: seb_client_configuration")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.161+02:00", comments="Source Table: seb_client_configuration")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<SebClientConfigRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.161+02:00", comments="Source Table: seb_client_configuration")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -61,7 +61,7 @@ public interface SebClientConfigRecordMapper {
})
SebClientConfigRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.161+02:00", comments="Source Table: seb_client_configuration")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -75,22 +75,22 @@ public interface SebClientConfigRecordMapper {
})
List<SebClientConfigRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(sebClientConfigRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, sebClientConfigRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, sebClientConfigRecord)
.where(id, isEqualTo(id_))
@ -98,7 +98,7 @@ public interface SebClientConfigRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
default int insert(SebClientConfigRecord record) {
return insert(SqlBuilder.insert(record)
.into(sebClientConfigRecord)
@ -113,7 +113,7 @@ public interface SebClientConfigRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
default int insertSelective(SebClientConfigRecord record) {
return insert(SqlBuilder.insert(record)
.into(sebClientConfigRecord)
@ -128,19 +128,19 @@ public interface SebClientConfigRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<SebClientConfigRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, name, date, clientName, clientSecret, encryptSecret, active)
.from(sebClientConfigRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<SebClientConfigRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, name, date, clientName, clientSecret, encryptSecret, active)
.from(sebClientConfigRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
default SebClientConfigRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, name, date, clientName, clientSecret, encryptSecret, active)
.from(sebClientConfigRecord)
@ -149,7 +149,7 @@ public interface SebClientConfigRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.841+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(SebClientConfigRecord record) {
return UpdateDSL.updateWithMapper(this::update, sebClientConfigRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -161,7 +161,7 @@ public interface SebClientConfigRecordMapper {
.set(active).equalTo(record::getActive);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.842+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.162+02:00", comments="Source Table: seb_client_configuration")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(SebClientConfigRecord record) {
return UpdateDSL.updateWithMapper(this::update, sebClientConfigRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
@ -173,7 +173,7 @@ public interface SebClientConfigRecordMapper {
.set(active).equalToWhenPresent(record::getActive);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.842+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.163+02:00", comments="Source Table: seb_client_configuration")
default int updateByPrimaryKey(SebClientConfigRecord record) {
return UpdateDSL.updateWithMapper(this::update, sebClientConfigRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -188,7 +188,7 @@ public interface SebClientConfigRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.842+02:00", comments="Source Table: seb_client_configuration")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.163+02:00", comments="Source Table: seb_client_configuration")
default int updateByPrimaryKeySelective(SebClientConfigRecord record) {
return UpdateDSL.updateWithMapper(this::update, sebClientConfigRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)

View file

@ -7,22 +7,22 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class ThresholdRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.831+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.135+02:00", comments="Source Table: threshold")
public static final ThresholdRecord thresholdRecord = new ThresholdRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source field: threshold.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.135+02:00", comments="Source field: threshold.id")
public static final SqlColumn<Long> id = thresholdRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source field: threshold.indicator_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.135+02:00", comments="Source field: threshold.indicator_id")
public static final SqlColumn<Long> indicatorId = thresholdRecord.indicatorId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source field: threshold.value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.135+02:00", comments="Source field: threshold.value")
public static final SqlColumn<BigDecimal> value = thresholdRecord.value;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source field: threshold.color")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.135+02:00", comments="Source field: threshold.color")
public static final SqlColumn<String> color = thresholdRecord.color;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.135+02:00", comments="Source Table: threshold")
public static final class ThresholdRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -33,20 +33,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface ThresholdRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.135+02:00", comments="Source Table: threshold")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<ThresholdRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -56,7 +56,7 @@ public interface ThresholdRecordMapper {
})
ThresholdRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -66,22 +66,22 @@ public interface ThresholdRecordMapper {
})
List<ThresholdRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(thresholdRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, thresholdRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, thresholdRecord)
.where(id, isEqualTo(id_))
@ -89,7 +89,7 @@ public interface ThresholdRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.832+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default int insert(ThresholdRecord record) {
return insert(SqlBuilder.insert(record)
.into(thresholdRecord)
@ -100,7 +100,7 @@ public interface ThresholdRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.833+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default int insertSelective(ThresholdRecord record) {
return insert(SqlBuilder.insert(record)
.into(thresholdRecord)
@ -111,19 +111,19 @@ public interface ThresholdRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.833+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ThresholdRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, indicatorId, value, color)
.from(thresholdRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.833+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ThresholdRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, indicatorId, value, color)
.from(thresholdRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.833+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default ThresholdRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, indicatorId, value, color)
.from(thresholdRecord)
@ -132,7 +132,7 @@ public interface ThresholdRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.833+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ThresholdRecord record) {
return UpdateDSL.updateWithMapper(this::update, thresholdRecord)
.set(indicatorId).equalTo(record::getIndicatorId)
@ -140,7 +140,7 @@ public interface ThresholdRecordMapper {
.set(color).equalTo(record::getColor);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.833+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ThresholdRecord record) {
return UpdateDSL.updateWithMapper(this::update, thresholdRecord)
.set(indicatorId).equalToWhenPresent(record::getIndicatorId)
@ -148,7 +148,7 @@ public interface ThresholdRecordMapper {
.set(color).equalToWhenPresent(record::getColor);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.833+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default int updateByPrimaryKey(ThresholdRecord record) {
return UpdateDSL.updateWithMapper(this::update, thresholdRecord)
.set(indicatorId).equalTo(record::getIndicatorId)
@ -159,7 +159,7 @@ public interface ThresholdRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.833+02:00", comments="Source Table: threshold")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.136+02:00", comments="Source Table: threshold")
default int updateByPrimaryKeySelective(ThresholdRecord record) {
return UpdateDSL.updateWithMapper(this::update, thresholdRecord)
.set(indicatorId).equalToWhenPresent(record::getIndicatorId)

View file

@ -6,31 +6,31 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class UserActivityLogRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.176+02:00", comments="Source Table: user_activity_log")
public static final UserActivityLogRecord userActivityLogRecord = new UserActivityLogRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source field: user_activity_log.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.176+02:00", comments="Source field: user_activity_log.id")
public static final SqlColumn<Long> id = userActivityLogRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source field: user_activity_log.user_uuid")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.176+02:00", comments="Source field: user_activity_log.user_uuid")
public static final SqlColumn<String> userUuid = userActivityLogRecord.userUuid;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source field: user_activity_log.timestamp")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.176+02:00", comments="Source field: user_activity_log.timestamp")
public static final SqlColumn<Long> timestamp = userActivityLogRecord.timestamp;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source field: user_activity_log.activity_type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.176+02:00", comments="Source field: user_activity_log.activity_type")
public static final SqlColumn<String> activityType = userActivityLogRecord.activityType;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source field: user_activity_log.entity_type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.176+02:00", comments="Source field: user_activity_log.entity_type")
public static final SqlColumn<String> entityType = userActivityLogRecord.entityType;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source field: user_activity_log.entity_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.176+02:00", comments="Source field: user_activity_log.entity_id")
public static final SqlColumn<String> entityId = userActivityLogRecord.entityId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source field: user_activity_log.message")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source field: user_activity_log.message")
public static final SqlColumn<String> message = userActivityLogRecord.message;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.176+02:00", comments="Source Table: user_activity_log")
public static final class UserActivityLogRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface UserActivityLogRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.856+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<UserActivityLogRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -58,7 +58,7 @@ public interface UserActivityLogRecordMapper {
})
UserActivityLogRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -71,22 +71,22 @@ public interface UserActivityLogRecordMapper {
})
List<UserActivityLogRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(userActivityLogRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, userActivityLogRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, userActivityLogRecord)
.where(id, isEqualTo(id_))
@ -94,7 +94,7 @@ public interface UserActivityLogRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default int insert(UserActivityLogRecord record) {
return insert(SqlBuilder.insert(record)
.into(userActivityLogRecord)
@ -108,7 +108,7 @@ public interface UserActivityLogRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default int insertSelective(UserActivityLogRecord record) {
return insert(SqlBuilder.insert(record)
.into(userActivityLogRecord)
@ -122,19 +122,19 @@ public interface UserActivityLogRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<UserActivityLogRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, userUuid, timestamp, activityType, entityType, entityId, message)
.from(userActivityLogRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<UserActivityLogRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, userUuid, timestamp, activityType, entityType, entityId, message)
.from(userActivityLogRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default UserActivityLogRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, userUuid, timestamp, activityType, entityType, entityId, message)
.from(userActivityLogRecord)
@ -143,7 +143,7 @@ public interface UserActivityLogRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(UserActivityLogRecord record) {
return UpdateDSL.updateWithMapper(this::update, userActivityLogRecord)
.set(userUuid).equalTo(record::getUserUuid)
@ -154,7 +154,7 @@ public interface UserActivityLogRecordMapper {
.set(message).equalTo(record::getMessage);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(UserActivityLogRecord record) {
return UpdateDSL.updateWithMapper(this::update, userActivityLogRecord)
.set(userUuid).equalToWhenPresent(record::getUserUuid)
@ -165,7 +165,7 @@ public interface UserActivityLogRecordMapper {
.set(message).equalToWhenPresent(record::getMessage);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default int updateByPrimaryKey(UserActivityLogRecord record) {
return UpdateDSL.updateWithMapper(this::update, userActivityLogRecord)
.set(userUuid).equalTo(record::getUserUuid)
@ -179,7 +179,7 @@ public interface UserActivityLogRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.857+02:00", comments="Source Table: user_activity_log")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.177+02:00", comments="Source Table: user_activity_log")
default int updateByPrimaryKeySelective(UserActivityLogRecord record) {
return UpdateDSL.updateWithMapper(this::update, userActivityLogRecord)
.set(userUuid).equalToWhenPresent(record::getUserUuid)

View file

@ -6,40 +6,40 @@ import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class UserRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.848+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.170+02:00", comments="Source Table: user")
public static final UserRecord userRecord = new UserRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source field: user.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source field: user.id")
public static final SqlColumn<Long> id = userRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source field: user.institution_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source field: user.institution_id")
public static final SqlColumn<Long> institutionId = userRecord.institutionId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source field: user.uuid")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source field: user.uuid")
public static final SqlColumn<String> uuid = userRecord.uuid;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source field: user.name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source field: user.name")
public static final SqlColumn<String> name = userRecord.name;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source field: user.username")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source field: user.username")
public static final SqlColumn<String> username = userRecord.username;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source field: user.password")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source field: user.password")
public static final SqlColumn<String> password = userRecord.password;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source field: user.email")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source field: user.email")
public static final SqlColumn<String> email = userRecord.email;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source field: user.language")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source field: user.language")
public static final SqlColumn<String> language = userRecord.language;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source field: user.timezone")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source field: user.timezone")
public static final SqlColumn<String> timezone = userRecord.timezone;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source field: user.active")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source field: user.active")
public static final SqlColumn<Integer> active = userRecord.active;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.170+02:00", comments="Source Table: user")
public static final class UserRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);

View file

@ -32,20 +32,20 @@ import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface UserRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source Table: user")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.171+02:00", comments="Source Table: user")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<UserRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -61,7 +61,7 @@ public interface UserRecordMapper {
})
UserRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
@ -77,22 +77,22 @@ public interface UserRecordMapper {
})
List<UserRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.849+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(userRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, userRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, userRecord)
.where(id, isEqualTo(id_))
@ -100,7 +100,7 @@ public interface UserRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default int insert(UserRecord record) {
return insert(SqlBuilder.insert(record)
.into(userRecord)
@ -117,7 +117,7 @@ public interface UserRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default int insertSelective(UserRecord record) {
return insert(SqlBuilder.insert(record)
.into(userRecord)
@ -134,19 +134,19 @@ public interface UserRecordMapper {
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<UserRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, uuid, name, username, password, email, language, timezone, active)
.from(userRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<UserRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, uuid, name, username, password, email, language, timezone, active)
.from(userRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default UserRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, uuid, name, username, password, email, language, timezone, active)
.from(userRecord)
@ -155,7 +155,7 @@ public interface UserRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(UserRecord record) {
return UpdateDSL.updateWithMapper(this::update, userRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -169,7 +169,7 @@ public interface UserRecordMapper {
.set(active).equalTo(record::getActive);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(UserRecord record) {
return UpdateDSL.updateWithMapper(this::update, userRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
@ -183,7 +183,7 @@ public interface UserRecordMapper {
.set(active).equalToWhenPresent(record::getActive);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default int updateByPrimaryKey(UserRecord record) {
return UpdateDSL.updateWithMapper(this::update, userRecord)
.set(institutionId).equalTo(record::getInstitutionId)
@ -200,7 +200,7 @@ public interface UserRecordMapper {
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.850+02:00", comments="Source Table: user")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.172+02:00", comments="Source Table: user")
default int updateByPrimaryKeySelective(UserRecord record) {
return UpdateDSL.updateWithMapper(this::update, userRecord)
.set(institutionId).equalToWhenPresent(record::getInstitutionId)

View file

@ -0,0 +1,33 @@
package ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper;
import java.sql.JDBCType;
import javax.annotation.Generated;
import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;
public final class ViewRecordDynamicSqlSupport {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.086+02:00", comments="Source Table: view")
public static final ViewRecord viewRecord = new ViewRecord();
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.086+02:00", comments="Source field: view.id")
public static final SqlColumn<Long> id = viewRecord.id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.086+02:00", comments="Source field: view.name")
public static final SqlColumn<String> name = viewRecord.name;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.086+02:00", comments="Source field: view.position")
public static final SqlColumn<Integer> position = viewRecord.position;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.086+02:00", comments="Source Table: view")
public static final class ViewRecord extends SqlTable {
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
public final SqlColumn<String> name = column("name", JDBCType.VARCHAR);
public final SqlColumn<Integer> position = column("position", JDBCType.INTEGER);
public ViewRecord() {
super("view");
}
}
}

View file

@ -0,0 +1,173 @@
package ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper;
import static ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.ViewRecordDynamicSqlSupport.*;
import static org.mybatis.dynamic.sql.SqlBuilder.*;
import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ViewRecord;
import java.util.List;
import javax.annotation.Generated;
import org.apache.ibatis.annotations.Arg;
import org.apache.ibatis.annotations.ConstructorArgs;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.mybatis.dynamic.sql.SqlBuilder;
import org.mybatis.dynamic.sql.delete.DeleteDSL;
import org.mybatis.dynamic.sql.delete.MyBatis3DeleteModelAdapter;
import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider;
import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider;
import org.mybatis.dynamic.sql.render.RenderingStrategy;
import org.mybatis.dynamic.sql.select.MyBatis3SelectModelAdapter;
import org.mybatis.dynamic.sql.select.QueryExpressionDSL;
import org.mybatis.dynamic.sql.select.SelectDSL;
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
import org.mybatis.dynamic.sql.update.MyBatis3UpdateModelAdapter;
import org.mybatis.dynamic.sql.update.UpdateDSL;
import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider;
import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
@Mapper
public interface ViewRecordMapper {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.087+02:00", comments="Source Table: view")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
long count(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.087+02:00", comments="Source Table: view")
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
int delete(DeleteStatementProvider deleteStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.087+02:00", comments="Source Table: view")
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
int insert(InsertStatementProvider<ViewRecord> insertStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.087+02:00", comments="Source Table: view")
@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="position", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
})
ViewRecord selectOne(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.087+02:00", comments="Source Table: view")
@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="position", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
})
List<ViewRecord> selectMany(SelectStatementProvider selectStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.087+02:00", comments="Source Table: view")
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
int update(UpdateStatementProvider updateStatement);
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.087+02:00", comments="Source Table: view")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
.from(viewRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.088+02:00", comments="Source Table: view")
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
return DeleteDSL.deleteFromWithMapper(this::delete, viewRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.088+02:00", comments="Source Table: view")
default int deleteByPrimaryKey(Long id_) {
return DeleteDSL.deleteFromWithMapper(this::delete, viewRecord)
.where(id, isEqualTo(id_))
.build()
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.088+02:00", comments="Source Table: view")
default int insert(ViewRecord record) {
return insert(SqlBuilder.insert(record)
.into(viewRecord)
.map(name).toProperty("name")
.map(position).toProperty("position")
.build()
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.088+02:00", comments="Source Table: view")
default int insertSelective(ViewRecord record) {
return insert(SqlBuilder.insert(record)
.into(viewRecord)
.map(name).toPropertyWhenPresent("name", record::getName)
.map(position).toPropertyWhenPresent("position", record::getPosition)
.build()
.render(RenderingStrategy.MYBATIS3));
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.088+02:00", comments="Source Table: view")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ViewRecord>>> selectByExample() {
return SelectDSL.selectWithMapper(this::selectMany, id, name, position)
.from(viewRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.088+02:00", comments="Source Table: view")
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ViewRecord>>> selectDistinctByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, name, position)
.from(viewRecord);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.088+02:00", comments="Source Table: view")
default ViewRecord selectByPrimaryKey(Long id_) {
return SelectDSL.selectWithMapper(this::selectOne, id, name, position)
.from(viewRecord)
.where(id, isEqualTo(id_))
.build()
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.088+02:00", comments="Source Table: view")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ViewRecord record) {
return UpdateDSL.updateWithMapper(this::update, viewRecord)
.set(name).equalTo(record::getName)
.set(position).equalTo(record::getPosition);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.089+02:00", comments="Source Table: view")
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ViewRecord record) {
return UpdateDSL.updateWithMapper(this::update, viewRecord)
.set(name).equalToWhenPresent(record::getName)
.set(position).equalToWhenPresent(record::getPosition);
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.091+02:00", comments="Source Table: view")
default int updateByPrimaryKey(ViewRecord record) {
return UpdateDSL.updateWithMapper(this::update, viewRecord)
.set(name).equalTo(record::getName)
.set(position).equalTo(record::getPosition)
.where(id, isEqualTo(record::getId))
.build()
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.091+02:00", comments="Source Table: view")
default int updateByPrimaryKeySelective(ViewRecord record) {
return UpdateDSL.updateWithMapper(this::update, viewRecord)
.set(name).equalToWhenPresent(record::getName)
.set(position).equalToWhenPresent(record::getPosition)
.where(id, isEqualTo(record::getId))
.build()
.execute();
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="Source Table: exam")
@SelectProvider(type=SqlProviderAdapter.class, method="select")
@ConstructorArgs({@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true)})
List<Long> selectIds(SelectStatementProvider select);
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<Long>>> selectIdsByExample() {
return SelectDSL.selectDistinctWithMapper(this::selectIds, id)
.from(viewRecord);
}
}

View file

@ -3,22 +3,22 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model;
import javax.annotation.Generated;
public class AdditionalAttributes {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.id")
private Long id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.entity_type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.entity_type")
private String entityType;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.entity_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.entity_id")
private Long entityId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.name")
private String name;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.value")
private String value;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source Table: additional_attributes")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source Table: additional_attributes")
public AdditionalAttributes(Long id, String entityType, Long entityId, String name, String value) {
this.id = id;
this.entityType = entityType;
@ -27,27 +27,27 @@ public class AdditionalAttributes {
this.value = value;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.id")
public Long getId() {
return id;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.entity_type")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.entity_type")
public String getEntityType() {
return entityType;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.entity_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.entity_id")
public Long getEntityId() {
return entityId;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.name")
public String getName() {
return name;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.859+02:00", comments="Source field: additional_attributes.value")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.178+02:00", comments="Source field: additional_attributes.value")
public String getValue() {
return value;
}
@ -56,7 +56,7 @@ public class AdditionalAttributes {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table additional_attributes
*
* @mbg.generated Tue Apr 23 15:30:54 CEST 2019
* @mbg.generated Tue Apr 30 14:19:49 CEST 2019
*/
@Override
public String toString() {
@ -77,7 +77,7 @@ public class AdditionalAttributes {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table additional_attributes
*
* @mbg.generated Tue Apr 23 15:30:54 CEST 2019
* @mbg.generated Tue Apr 30 14:19:49 CEST 2019
*/
@Override
public boolean equals(Object that) {
@ -102,7 +102,7 @@ public class AdditionalAttributes {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table additional_attributes
*
* @mbg.generated Tue Apr 23 15:30:54 CEST 2019
* @mbg.generated Tue Apr 30 14:19:49 CEST 2019
*/
@Override
public int hashCode() {

View file

@ -3,31 +3,31 @@ package ch.ethz.seb.sebserver.webservice.datalayer.batis.model;
import javax.annotation.Generated;
public class ClientConnectionRecord {
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.id")
private Long id;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.exam_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.exam_id")
private Long examId;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.status")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.status")
private String status;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.connection_token")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.connection_token")
private String connectionToken;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.user_name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.user_name")
private String userName;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.vdi")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.vdi")
private Boolean vdi;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.client_address")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.122+02:00", comments="Source field: client_connection.client_address")
private String clientAddress;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.virtual_client_address")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.122+02:00", comments="Source field: client_connection.virtual_client_address")
private String virtualClientAddress;
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source Table: client_connection")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source Table: client_connection")
public ClientConnectionRecord(Long id, Long examId, String status, String connectionToken, String userName, Boolean vdi, String clientAddress, String virtualClientAddress) {
this.id = id;
this.examId = examId;
@ -39,42 +39,42 @@ public class ClientConnectionRecord {
this.virtualClientAddress = virtualClientAddress;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.id")
public Long getId() {
return id;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.exam_id")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.exam_id")
public Long getExamId() {
return examId;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.status")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.status")
public String getStatus() {
return status;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.connection_token")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.connection_token")
public String getConnectionToken() {
return connectionToken;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.user_name")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.121+02:00", comments="Source field: client_connection.user_name")
public String getUserName() {
return userName;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.vdi")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.122+02:00", comments="Source field: client_connection.vdi")
public Boolean getVdi() {
return vdi;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.client_address")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.122+02:00", comments="Source field: client_connection.client_address")
public String getClientAddress() {
return clientAddress;
}
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-23T15:30:54.814+02:00", comments="Source field: client_connection.virtual_client_address")
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2019-04-30T14:19:49.122+02:00", comments="Source field: client_connection.virtual_client_address")
public String getVirtualClientAddress() {
return virtualClientAddress;
}
@ -83,7 +83,7 @@ public class ClientConnectionRecord {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table client_connection
*
* @mbg.generated Tue Apr 23 15:30:54 CEST 2019
* @mbg.generated Tue Apr 30 14:19:49 CEST 2019
*/
@Override
public String toString() {
@ -107,7 +107,7 @@ public class ClientConnectionRecord {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table client_connection
*
* @mbg.generated Tue Apr 23 15:30:54 CEST 2019
* @mbg.generated Tue Apr 30 14:19:49 CEST 2019
*/
@Override
public boolean equals(Object that) {
@ -135,7 +135,7 @@ public class ClientConnectionRecord {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table client_connection
*
* @mbg.generated Tue Apr 23 15:30:54 CEST 2019
* @mbg.generated Tue Apr 30 14:19:49 CEST 2019
*/
@Override
public int hashCode() {

Some files were not shown because too many files have changed in this diff Show more