generated ORM code first commit version 0.1
This commit is contained in:
parent
93d53f757b
commit
0527d7cb85
46 changed files with 5849 additions and 0 deletions
33
src/main/java/ch/ethz/seb/sebserver/Constants.java
Normal file
33
src/main/java/ch/ethz/seb/sebserver/Constants.java
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.joda.time.format.DateTimeFormat;
|
||||
import org.joda.time.format.DateTimeFormatter;
|
||||
|
||||
/** Global Constants used in SEB Server web-service as well as in web-gui component */
|
||||
public interface Constants {
|
||||
|
||||
/** Calendar using the UTC time-zone */
|
||||
Calendar UTC = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||
|
||||
/** Date-Time formatter without milliseconds using UTC time-zone. Pattern is yyyy-MM-dd HH:mm:ss */
|
||||
DateTimeFormatter DATE_TIME_PATTERN_UTC_NO_MILLIS = DateTimeFormat
|
||||
.forPattern("yyyy-MM-dd HH:mm:ss")
|
||||
.withZoneUTC();
|
||||
|
||||
/** Date-Time formatter with milliseconds using UTC time-zone. Pattern is yyyy-MM-dd HH:mm:ss.S */
|
||||
DateTimeFormatter DATE_TIME_PATTERN_UTC_MILLIS = DateTimeFormat
|
||||
.forPattern("yyyy-MM-dd HH:mm:ss.S")
|
||||
.withZoneUTC();
|
||||
|
||||
}
|
143
src/main/java/ch/ethz/seb/sebserver/model/Domain.java
Normal file
143
src/main/java/ch/ethz/seb/sebserver/model/Domain.java
Normal file
|
@ -0,0 +1,143 @@
|
|||
package ch.ethz.seb.sebserver.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
/** Defines the global names of the domain model and domain model fields.
|
||||
* This shall be used as a static overall domain model names reference within SEB Server Web-Service as well as within the integrated GUI
|
||||
* This file is generated by the org.eth.demo.sebserver.gen.DomainModelNameReferencePlugin and must not be edited manually.**/
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator",comments="ch.ethz.seb.sebserver.gen.DomainModelNameReferencePlugin",date="2018-11-12T16:16:23.438+01:00")
|
||||
interface Domain {
|
||||
|
||||
interface ConfigurationAttribute {
|
||||
String ENITIY_NAME = "ConfigurationAttribute";
|
||||
String ATTR_NAME = "name";
|
||||
String ATTR_TYPE = "type";
|
||||
String ATTR_PARENT_ID = "parentId";
|
||||
String ATTR_RESOURCES = "resources";
|
||||
String ATTR_VALIDATOR = "validator";
|
||||
String ATTR_DEPENDENCIES = "dependencies";
|
||||
String ATTR_DEFAULT_VALUE = "defaultValue";
|
||||
}
|
||||
|
||||
interface ConfigurationValue {
|
||||
String ENITIY_NAME = "ConfigurationValue";
|
||||
String ATTR_CONFIGURATION_ID = "configurationId";
|
||||
String ATTR_CONFIGURATION_ATTRIBUTE_ID = "configurationAttributeId";
|
||||
String ATTR_LIST_INDEX = "listIndex";
|
||||
String ATTR_VALUE = "value";
|
||||
}
|
||||
|
||||
interface Orientation {
|
||||
String ENITIY_NAME = "Orientation";
|
||||
String ATTR_CONFIG_ATTRIBUTE_ID = "configAttributeId";
|
||||
String ATTR_TEMPLATE = "template";
|
||||
String ATTR_VIEW = "view";
|
||||
String ATTR_GROUP = "group";
|
||||
String ATTR_X_POSITION = "xPosition";
|
||||
String ATTR_Y_POSITION = "yPosition";
|
||||
String ATTR_WIDTH = "width";
|
||||
String ATTR_HEIGHT = "height";
|
||||
}
|
||||
|
||||
interface Configuration {
|
||||
String ENITIY_NAME = "Configuration";
|
||||
String ATTR_CONFIGURATION_NODE_ID = "configurationNodeId";
|
||||
String ATTR_VERSION = "version";
|
||||
String ATTR_VERSION_DATE = "versionDate";
|
||||
String ATTR_FOLLOWUP = "followup";
|
||||
}
|
||||
|
||||
interface ConfigurationNode {
|
||||
String ENITIY_NAME = "ConfigurationNode";
|
||||
String ATTR_INSTITUTION_ID = "institutionId";
|
||||
String ATTR_OWNER = "owner";
|
||||
String ATTR_NAME = "name";
|
||||
String ATTR_DESCRIPTION = "description";
|
||||
String ATTR_TYPE = "type";
|
||||
String ATTR_TEMPLATE = "template";
|
||||
}
|
||||
|
||||
interface ExamConfigurationMap {
|
||||
String ENITIY_NAME = "ExamConfigurationMap";
|
||||
String ATTR_EXAM_ID = "examId";
|
||||
String ATTR_CONFIGURATION_NODE_ID = "configurationNodeId";
|
||||
String ATTR_USER_NAMES = "userNames";
|
||||
}
|
||||
|
||||
interface Exam {
|
||||
String ENITIY_NAME = "Exam";
|
||||
String ATTR_LMS_SETUP_ID = "lmsSetupId";
|
||||
String ATTR_EXTERNAL_UUID = "externalUuid";
|
||||
String ATTR_OWNER = "owner";
|
||||
String ATTR_SUPPORTER = "supporter";
|
||||
String ATTR_TYPE = "type";
|
||||
}
|
||||
|
||||
interface ClientConnection {
|
||||
String ENITIY_NAME = "ClientConnection";
|
||||
String ATTR_EXAM_ID = "examId";
|
||||
String ATTR_STATUS = "status";
|
||||
String ATTR_CONNECTION_TOKEN = "connectionToken";
|
||||
String ATTR_USER_NAME = "userName";
|
||||
String ATTR_VDI = "vdi";
|
||||
String ATTR_CLIENT_ADDRESS = "clientAddress";
|
||||
String ATTR_VIRTUAL_CLIENT_ADDRESS = "virtualClientAddress";
|
||||
}
|
||||
|
||||
interface ClientEvent {
|
||||
String ENITIY_NAME = "ClientEvent";
|
||||
String ATTR_CONNECTION_ID = "connectionId";
|
||||
String ATTR_USER_IDENTIFIER = "userIdentifier";
|
||||
String ATTR_TYPE = "type";
|
||||
String ATTR_TIMESTAMP = "timestamp";
|
||||
String ATTR_NUMERIC_VALUE = "numericValue";
|
||||
String ATTR_TEXT = "text";
|
||||
}
|
||||
|
||||
interface Indicator {
|
||||
String ENITIY_NAME = "Indicator";
|
||||
String ATTR_EXAM_ID = "examId";
|
||||
String ATTR_TYPE = "type";
|
||||
String ATTR_NAME = "name";
|
||||
String ATTR_COLOR = "color";
|
||||
}
|
||||
|
||||
interface Institution {
|
||||
String ENITIY_NAME = "Institution";
|
||||
String ATTR_NAME = "name";
|
||||
String ATTR_AUTHTYPE = "authtype";
|
||||
}
|
||||
|
||||
interface SebLmsSetup {
|
||||
String ENITIY_NAME = "SebLmsSetup";
|
||||
String ATTR_INSTITUTION_ID = "institutionId";
|
||||
String ATTR_NAME = "name";
|
||||
String ATTR_LMS_TYPE = "lmsType";
|
||||
String ATTR_LMS_URL = "lmsUrl";
|
||||
String ATTR_LMS_CLIENTNAME = "lmsClientname";
|
||||
String ATTR_LMS_CLIENTSECRET = "lmsClientsecret";
|
||||
String ATTR_LMS_REST_API_TOKEN = "lmsRestApiToken";
|
||||
String ATTR_SEB_CLIENTNAME = "sebClientname";
|
||||
String ATTR_SEB_CLIENTSECRET = "sebClientsecret";
|
||||
}
|
||||
|
||||
interface User {
|
||||
String ENITIY_NAME = "User";
|
||||
String ATTR_INSTITUTION_ID = "institutionId";
|
||||
String ATTR_UUID = "uuid";
|
||||
String ATTR_NAME = "name";
|
||||
String ATTR_USER_NAME = "userName";
|
||||
String ATTR_PASSWORD = "password";
|
||||
String ATTR_EMAIL = "email";
|
||||
String ATTR_CREATION_DATE = "creationDate";
|
||||
String ATTR_ACTIVE = "active";
|
||||
String ATTR_LOCALE = "locale";
|
||||
String ATTR_TIMEZONE = "timezone";
|
||||
}
|
||||
|
||||
interface UserRole {
|
||||
String ENITIY_NAME = "UserRole";
|
||||
String ATTR_USER_ID = "userId";
|
||||
String ATTR_ROLE_NAME = "roleName";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* 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.ws.batis;
|
||||
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import org.apache.ibatis.type.BaseTypeHandler;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.DateTimeZone;
|
||||
import org.joda.time.LocalDateTime;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import ch.ethz.seb.sebserver.Constants;
|
||||
|
||||
/** Joda DateTime resolver for MyBatis TIMESTAMP to DateTime conversion and vis versa. This is used to convert MyBatis
|
||||
* TIMESTAMP type to Joda-Time's DateTime
|
||||
*
|
||||
* NOTE: The TIMESTAMP is always stored and read in UTC time-zone. */
|
||||
public class JodaTimeTypeResolver extends BaseTypeHandler<DateTime> {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(JodaTimeTypeResolver.class);
|
||||
|
||||
@Override
|
||||
public void setNonNullParameter(
|
||||
final PreparedStatement ps,
|
||||
final int i,
|
||||
final DateTime parameter,
|
||||
final JdbcType jdbcType) throws SQLException {
|
||||
|
||||
ps.setTimestamp(
|
||||
i,
|
||||
new Timestamp(parameter.getMillis()),
|
||||
Constants.UTC);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DateTime getNullableResult(final ResultSet rs, final String columnName) throws SQLException {
|
||||
return getDateTime(() -> rs.getString(columnName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DateTime getNullableResult(final ResultSet rs, final int columnIndex) throws SQLException {
|
||||
return getDateTime(() -> rs.getString(columnIndex));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DateTime getNullableResult(final CallableStatement cs, final int columnIndex) throws SQLException {
|
||||
return getDateTime(() -> cs.getString(columnIndex));
|
||||
}
|
||||
|
||||
private DateTime getDateTime(final SupplierSQLExceptionAware<String> supplier) throws SQLException {
|
||||
String dateFormattedString = supplier.get();
|
||||
|
||||
try {
|
||||
// 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(".")) {
|
||||
dateFormattedString = dateFormattedString.substring(
|
||||
0,
|
||||
dateFormattedString.indexOf("."));
|
||||
}
|
||||
|
||||
// NOTE: This create a DateTime in UTC time.zone with no time-zone-offset.
|
||||
final LocalDateTime localDateTime = LocalDateTime.parse(
|
||||
dateFormattedString,
|
||||
Constants.DATE_TIME_PATTERN_UTC_NO_MILLIS);
|
||||
final DateTime dateTime = localDateTime.toDateTime(DateTimeZone.UTC);
|
||||
|
||||
return dateTime;
|
||||
} catch (final Exception e) {
|
||||
log.error("while trying to parse LocalDateTime; value: " + dateFormattedString + " format: "
|
||||
+ Constants.DATE_TIME_PATTERN_UTC_NO_MILLIS, e);
|
||||
throw new RuntimeException("Failed to parse date-time from SQL string: " + dateFormattedString, e);
|
||||
}
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
private interface SupplierSQLExceptionAware<T> {
|
||||
T get() throws SQLException;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* 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.ws.batis;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.anyInt;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.DateTimeZone;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import ch.ethz.seb.sebserver.Constants;
|
||||
|
||||
public class JodaTimeTypeResolverTest {
|
||||
|
||||
@Test
|
||||
public void testSetNonNullParameter() throws SQLException {
|
||||
final DateTime pointInTime = new DateTime(0, DateTimeZone.UTC);
|
||||
final PreparedStatement statement = Mockito.mock(PreparedStatement.class);
|
||||
final JodaTimeTypeResolver jodaTimeTypeResolver = new JodaTimeTypeResolver();
|
||||
final Timestamp timestamp = new Timestamp(pointInTime.getMillis());
|
||||
|
||||
jodaTimeTypeResolver.setNonNullParameter(statement, 0, pointInTime, JdbcType.TIMESTAMP);
|
||||
|
||||
Mockito.verify(statement, times(1)).setTimestamp(0, timestamp, Constants.UTC);
|
||||
verify(statement, never()).setTimestamp(anyInt(), any(Timestamp.class));
|
||||
|
||||
jodaTimeTypeResolver.setNonNullParameter(statement, 0, pointInTime, JdbcType.DATE);
|
||||
|
||||
Mockito.verify(statement, times(2)).setTimestamp(0, timestamp, Constants.UTC);
|
||||
verify(statement, never()).setTimestamp(anyInt(), any(Timestamp.class));
|
||||
|
||||
jodaTimeTypeResolver.setNonNullParameter(statement, 0, pointInTime, JdbcType.DATETIMEOFFSET);
|
||||
|
||||
Mockito.verify(statement, times(3)).setTimestamp(0, timestamp, Constants.UTC);
|
||||
verify(statement, never()).setTimestamp(anyInt(), any(Timestamp.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetNullableResultExceptions() throws SQLException {
|
||||
final String columnName = "timestamp";
|
||||
|
||||
final JodaTimeTypeResolver jodaTimeTypeResolver = new JodaTimeTypeResolver();
|
||||
|
||||
final ResultSet resultSetMock = Mockito.mock(ResultSet.class);
|
||||
when(resultSetMock.getString(columnName)).thenReturn(null);
|
||||
|
||||
try {
|
||||
@SuppressWarnings("unused")
|
||||
final DateTime nullableResult = jodaTimeTypeResolver.getNullableResult(resultSetMock, columnName);
|
||||
fail("Exception expected here");
|
||||
} catch (final Exception e) {
|
||||
assertEquals("Failed to parse date-time from SQL string: null", e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetNullableResultNoMillis() throws SQLException {
|
||||
final String columnName = "timestamp";
|
||||
final int columnIndex = 0;
|
||||
|
||||
final DateTime pointInTime = new DateTime(0, DateTimeZone.UTC);
|
||||
final String pointInTimeString = pointInTime.toString(Constants.DATE_TIME_PATTERN_UTC_NO_MILLIS);
|
||||
assertEquals("1970-01-01 00:00:00", pointInTimeString);
|
||||
|
||||
final JodaTimeTypeResolver jodaTimeTypeResolver = new JodaTimeTypeResolver();
|
||||
|
||||
final ResultSet resultSetMock = Mockito.mock(ResultSet.class);
|
||||
when(resultSetMock.getString(columnName)).thenReturn(pointInTimeString);
|
||||
when(resultSetMock.getString(columnIndex)).thenReturn(pointInTimeString);
|
||||
|
||||
DateTime nullableResult = jodaTimeTypeResolver.getNullableResult(resultSetMock, columnName);
|
||||
assertNotNull(nullableResult);
|
||||
assertEquals(pointInTimeString, nullableResult.toString(Constants.DATE_TIME_PATTERN_UTC_NO_MILLIS));
|
||||
assertEquals(pointInTime, nullableResult);
|
||||
|
||||
nullableResult = jodaTimeTypeResolver.getNullableResult(resultSetMock, columnIndex);
|
||||
assertNotNull(nullableResult);
|
||||
assertEquals(pointInTimeString, nullableResult.toString(Constants.DATE_TIME_PATTERN_UTC_NO_MILLIS));
|
||||
assertEquals(pointInTime, nullableResult);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetNullableResultWithMillis() throws SQLException {
|
||||
final String columnName = "timestamp";
|
||||
|
||||
final DateTime pointInTime = new DateTime(0, DateTimeZone.UTC);
|
||||
final String pointInTimeString = pointInTime.toString(Constants.DATE_TIME_PATTERN_UTC_MILLIS);
|
||||
assertEquals("1970-01-01 00:00:00.0", pointInTimeString);
|
||||
|
||||
final JodaTimeTypeResolver jodaTimeTypeResolver = new JodaTimeTypeResolver();
|
||||
|
||||
final ResultSet resultSetMock = Mockito.mock(ResultSet.class);
|
||||
when(resultSetMock.getString(columnName)).thenReturn(pointInTimeString);
|
||||
|
||||
final DateTime nullableResult = jodaTimeTypeResolver.getNullableResult(resultSetMock, columnName);
|
||||
assertNotNull(nullableResult);
|
||||
assertEquals("1970-01-01 00:00:00", nullableResult.toString(Constants.DATE_TIME_PATTERN_UTC_NO_MILLIS));
|
||||
assertEquals(pointInTime, nullableResult);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 ClientConnectionRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source Table: client_connection")
|
||||
public static final ClientConnectionRecord clientConnectionRecord = new ClientConnectionRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.535+01:00", comments="Source field: client_connection.id")
|
||||
public static final SqlColumn<Long> id = clientConnectionRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.535+01:00", comments="Source field: client_connection.exam_id")
|
||||
public static final SqlColumn<Long> examId = clientConnectionRecord.examId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.535+01:00", comments="Source field: client_connection.status")
|
||||
public static final SqlColumn<String> status = clientConnectionRecord.status;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.535+01:00", comments="Source field: client_connection.connection_token")
|
||||
public static final SqlColumn<String> connectionToken = clientConnectionRecord.connectionToken;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.535+01:00", comments="Source field: client_connection.user_name")
|
||||
public static final SqlColumn<String> userName = clientConnectionRecord.userName;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.535+01:00", comments="Source field: client_connection.vdi")
|
||||
public static final SqlColumn<Boolean> vdi = clientConnectionRecord.vdi;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.536+01:00", comments="Source field: client_connection.client_address")
|
||||
public static final SqlColumn<String> clientAddress = clientConnectionRecord.clientAddress;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.536+01: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="2018-11-12T16:16:23.535+01:00", comments="Source Table: client_connection")
|
||||
public static final class ClientConnectionRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> examId = column("exam_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> status = column("status", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> connectionToken = column("connection_token", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> userName = column("user_name", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<Boolean> vdi = column("vdi", JDBCType.BOOLEAN);
|
||||
|
||||
public final SqlColumn<String> clientAddress = column("client_address", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> virtualClientAddress = column("virtual_client_address", JDBCType.VARCHAR);
|
||||
|
||||
public ClientConnectionRecord() {
|
||||
super("client_connection");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,213 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.ClientConnectionRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.ClientConnectionRecord;
|
||||
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 ClientConnectionRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.536+01:00", comments="Source Table: client_connection")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.536+01:00", comments="Source Table: client_connection")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.536+01:00", comments="Source Table: client_connection")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<ClientConnectionRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="exam_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="status", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="connection_token", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="user_name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="vdi", javaType=Boolean.class, jdbcType=JdbcType.BOOLEAN),
|
||||
@Arg(column="client_address", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="virtual_client_address", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
ClientConnectionRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="exam_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="status", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="connection_token", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="user_name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="vdi", javaType=Boolean.class, jdbcType=JdbcType.BOOLEAN),
|
||||
@Arg(column="client_address", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="virtual_client_address", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<ClientConnectionRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01: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="2018-11-12T16:16:23.537+01: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="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, clientConnectionRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
default int insert(ClientConnectionRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(clientConnectionRecord)
|
||||
.map(examId).toProperty("examId")
|
||||
.map(status).toProperty("status")
|
||||
.map(connectionToken).toProperty("connectionToken")
|
||||
.map(userName).toProperty("userName")
|
||||
.map(vdi).toProperty("vdi")
|
||||
.map(clientAddress).toProperty("clientAddress")
|
||||
.map(virtualClientAddress).toProperty("virtualClientAddress")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
default int insertSelective(ClientConnectionRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(clientConnectionRecord)
|
||||
.map(examId).toPropertyWhenPresent("examId", record::getExamId)
|
||||
.map(status).toPropertyWhenPresent("status", record::getStatus)
|
||||
.map(connectionToken).toPropertyWhenPresent("connectionToken", record::getConnectionToken)
|
||||
.map(userName).toPropertyWhenPresent("userName", record::getUserName)
|
||||
.map(vdi).toPropertyWhenPresent("vdi", record::getVdi)
|
||||
.map(clientAddress).toPropertyWhenPresent("clientAddress", record::getClientAddress)
|
||||
.map(virtualClientAddress).toPropertyWhenPresent("virtualClientAddress", record::getVirtualClientAddress)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01: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="2018-11-12T16:16:23.537+01: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="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
default ClientConnectionRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, examId, status, connectionToken, userName, vdi, clientAddress, virtualClientAddress)
|
||||
.from(clientConnectionRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ClientConnectionRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord)
|
||||
.set(examId).equalTo(record::getExamId)
|
||||
.set(status).equalTo(record::getStatus)
|
||||
.set(connectionToken).equalTo(record::getConnectionToken)
|
||||
.set(userName).equalTo(record::getUserName)
|
||||
.set(vdi).equalTo(record::getVdi)
|
||||
.set(clientAddress).equalTo(record::getClientAddress)
|
||||
.set(virtualClientAddress).equalTo(record::getVirtualClientAddress);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ClientConnectionRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord)
|
||||
.set(examId).equalToWhenPresent(record::getExamId)
|
||||
.set(status).equalToWhenPresent(record::getStatus)
|
||||
.set(connectionToken).equalToWhenPresent(record::getConnectionToken)
|
||||
.set(userName).equalToWhenPresent(record::getUserName)
|
||||
.set(vdi).equalToWhenPresent(record::getVdi)
|
||||
.set(clientAddress).equalToWhenPresent(record::getClientAddress)
|
||||
.set(virtualClientAddress).equalToWhenPresent(record::getVirtualClientAddress);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
default int updateByPrimaryKey(ClientConnectionRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord)
|
||||
.set(examId).equalTo(record::getExamId)
|
||||
.set(status).equalTo(record::getStatus)
|
||||
.set(connectionToken).equalTo(record::getConnectionToken)
|
||||
.set(userName).equalTo(record::getUserName)
|
||||
.set(vdi).equalTo(record::getVdi)
|
||||
.set(clientAddress).equalTo(record::getClientAddress)
|
||||
.set(virtualClientAddress).equalTo(record::getVirtualClientAddress)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.537+01:00", comments="Source Table: client_connection")
|
||||
default int updateByPrimaryKeySelective(ClientConnectionRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, clientConnectionRecord)
|
||||
.set(examId).equalToWhenPresent(record::getExamId)
|
||||
.set(status).equalToWhenPresent(record::getStatus)
|
||||
.set(connectionToken).equalToWhenPresent(record::getConnectionToken)
|
||||
.set(userName).equalToWhenPresent(record::getUserName)
|
||||
.set(vdi).equalToWhenPresent(record::getVdi)
|
||||
.set(clientAddress).equalToWhenPresent(record::getClientAddress)
|
||||
.set(virtualClientAddress).equalToWhenPresent(record::getVirtualClientAddress)
|
||||
.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(clientConnectionRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.JDBCType;
|
||||
import javax.annotation.Generated;
|
||||
import org.mybatis.dynamic.sql.SqlColumn;
|
||||
import org.mybatis.dynamic.sql.SqlTable;
|
||||
|
||||
public final class ClientEventRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source Table: client_event")
|
||||
public static final ClientEventRecord clientEventRecord = new ClientEventRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.id")
|
||||
public static final SqlColumn<Long> id = clientEventRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.connection_id")
|
||||
public static final SqlColumn<Long> connectionId = clientEventRecord.connectionId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.user_identifier")
|
||||
public static final SqlColumn<String> userIdentifier = clientEventRecord.userIdentifier;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.type")
|
||||
public static final SqlColumn<Integer> type = clientEventRecord.type;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.timestamp")
|
||||
public static final SqlColumn<Long> timestamp = clientEventRecord.timestamp;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.numeric_value")
|
||||
public static final SqlColumn<BigDecimal> numericValue = clientEventRecord.numericValue;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.540+01:00", comments="Source field: client_event.text")
|
||||
public static final SqlColumn<String> text = clientEventRecord.text;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source Table: client_event")
|
||||
public static final class ClientEventRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> connectionId = column("connection_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> userIdentifier = column("user_identifier", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<Integer> type = column("type", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Long> timestamp = column("timestamp", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<BigDecimal> numericValue = column("numeric_value", JDBCType.DECIMAL);
|
||||
|
||||
public final SqlColumn<String> text = column("text", JDBCType.VARCHAR);
|
||||
|
||||
public ClientEventRecord() {
|
||||
super("client_event");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,206 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.ClientEventRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.ClientEventRecord;
|
||||
import java.math.BigDecimal;
|
||||
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 ClientEventRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.540+01:00", comments="Source Table: client_event")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.540+01:00", comments="Source Table: client_event")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.540+01:00", comments="Source Table: client_event")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<ClientEventRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.540+01:00", comments="Source Table: client_event")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="connection_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="user_identifier", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="type", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
|
||||
@Arg(column="timestamp", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="numeric_value", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),
|
||||
@Arg(column="text", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
ClientEventRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.540+01:00", comments="Source Table: client_event")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="connection_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="user_identifier", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="type", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
|
||||
@Arg(column="timestamp", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="numeric_value", javaType=BigDecimal.class, jdbcType=JdbcType.DECIMAL),
|
||||
@Arg(column="text", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<ClientEventRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.540+01:00", comments="Source Table: client_event")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.540+01: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="2018-11-12T16:16:23.540+01: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="2018-11-12T16:16:23.540+01:00", comments="Source Table: client_event")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, clientEventRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.540+01:00", comments="Source Table: client_event")
|
||||
default int insert(ClientEventRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(clientEventRecord)
|
||||
.map(connectionId).toProperty("connectionId")
|
||||
.map(userIdentifier).toProperty("userIdentifier")
|
||||
.map(type).toProperty("type")
|
||||
.map(timestamp).toProperty("timestamp")
|
||||
.map(numericValue).toProperty("numericValue")
|
||||
.map(text).toProperty("text")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.540+01:00", comments="Source Table: client_event")
|
||||
default int insertSelective(ClientEventRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(clientEventRecord)
|
||||
.map(connectionId).toPropertyWhenPresent("connectionId", record::getConnectionId)
|
||||
.map(userIdentifier).toPropertyWhenPresent("userIdentifier", record::getUserIdentifier)
|
||||
.map(type).toPropertyWhenPresent("type", record::getType)
|
||||
.map(timestamp).toPropertyWhenPresent("timestamp", record::getTimestamp)
|
||||
.map(numericValue).toPropertyWhenPresent("numericValue", record::getNumericValue)
|
||||
.map(text).toPropertyWhenPresent("text", record::getText)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.541+01: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="2018-11-12T16:16:23.541+01: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="2018-11-12T16:16:23.541+01:00", comments="Source Table: client_event")
|
||||
default ClientEventRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, connectionId, userIdentifier, type, timestamp, numericValue, text)
|
||||
.from(clientEventRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.541+01:00", comments="Source Table: client_event")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ClientEventRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, clientEventRecord)
|
||||
.set(connectionId).equalTo(record::getConnectionId)
|
||||
.set(userIdentifier).equalTo(record::getUserIdentifier)
|
||||
.set(type).equalTo(record::getType)
|
||||
.set(timestamp).equalTo(record::getTimestamp)
|
||||
.set(numericValue).equalTo(record::getNumericValue)
|
||||
.set(text).equalTo(record::getText);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.541+01:00", comments="Source Table: client_event")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ClientEventRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, clientEventRecord)
|
||||
.set(connectionId).equalToWhenPresent(record::getConnectionId)
|
||||
.set(userIdentifier).equalToWhenPresent(record::getUserIdentifier)
|
||||
.set(type).equalToWhenPresent(record::getType)
|
||||
.set(timestamp).equalToWhenPresent(record::getTimestamp)
|
||||
.set(numericValue).equalToWhenPresent(record::getNumericValue)
|
||||
.set(text).equalToWhenPresent(record::getText);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.541+01:00", comments="Source Table: client_event")
|
||||
default int updateByPrimaryKey(ClientEventRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, clientEventRecord)
|
||||
.set(connectionId).equalTo(record::getConnectionId)
|
||||
.set(userIdentifier).equalTo(record::getUserIdentifier)
|
||||
.set(type).equalTo(record::getType)
|
||||
.set(timestamp).equalTo(record::getTimestamp)
|
||||
.set(numericValue).equalTo(record::getNumericValue)
|
||||
.set(text).equalTo(record::getText)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.541+01:00", comments="Source Table: client_event")
|
||||
default int updateByPrimaryKeySelective(ClientEventRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, clientEventRecord)
|
||||
.set(connectionId).equalToWhenPresent(record::getConnectionId)
|
||||
.set(userIdentifier).equalToWhenPresent(record::getUserIdentifier)
|
||||
.set(type).equalToWhenPresent(record::getType)
|
||||
.set(timestamp).equalToWhenPresent(record::getTimestamp)
|
||||
.set(numericValue).equalToWhenPresent(record::getNumericValue)
|
||||
.set(text).equalToWhenPresent(record::getText)
|
||||
.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(clientEventRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 ConfigurationAttributeRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.386+01:00", comments="Source Table: configuration_attribute")
|
||||
public static final ConfigurationAttributeRecord configurationAttributeRecord = new ConfigurationAttributeRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.390+01:00", comments="Source field: configuration_attribute.id")
|
||||
public static final SqlColumn<Long> id = configurationAttributeRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.391+01:00", comments="Source field: configuration_attribute.name")
|
||||
public static final SqlColumn<String> name = configurationAttributeRecord.name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.391+01:00", comments="Source field: configuration_attribute.type")
|
||||
public static final SqlColumn<String> type = configurationAttributeRecord.type;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.392+01:00", comments="Source field: configuration_attribute.parent_id")
|
||||
public static final SqlColumn<Long> parentId = configurationAttributeRecord.parentId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.396+01:00", comments="Source field: configuration_attribute.resources")
|
||||
public static final SqlColumn<String> resources = configurationAttributeRecord.resources;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.397+01:00", comments="Source field: configuration_attribute.validator")
|
||||
public static final SqlColumn<String> validator = configurationAttributeRecord.validator;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.397+01:00", comments="Source field: configuration_attribute.dependencies")
|
||||
public static final SqlColumn<String> dependencies = configurationAttributeRecord.dependencies;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.398+01:00", comments="Source field: configuration_attribute.default_value")
|
||||
public static final SqlColumn<String> defaultValue = configurationAttributeRecord.defaultValue;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.390+01:00", comments="Source Table: configuration_attribute")
|
||||
public static final class ConfigurationAttributeRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> name = column("name", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> type = column("type", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<Long> parentId = column("parent_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> resources = column("resources", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> validator = column("validator", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> dependencies = column("dependencies", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> defaultValue = column("default_value", JDBCType.VARCHAR);
|
||||
|
||||
public ConfigurationAttributeRecord() {
|
||||
super("configuration_attribute");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,213 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.ConfigurationAttributeRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.ConfigurationAttributeRecord;
|
||||
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 ConfigurationAttributeRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.400+01:00", comments="Source Table: configuration_attribute")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.402+01:00", comments="Source Table: configuration_attribute")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.404+01:00", comments="Source Table: configuration_attribute")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<ConfigurationAttributeRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.406+01:00", comments="Source Table: configuration_attribute")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="parent_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="resources", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="validator", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="dependencies", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="default_value", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
ConfigurationAttributeRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.407+01:00", comments="Source Table: configuration_attribute")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="parent_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="resources", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="validator", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="dependencies", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="default_value", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<ConfigurationAttributeRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.408+01:00", comments="Source Table: configuration_attribute")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.409+01: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="2018-11-12T16:16:23.409+01: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="2018-11-12T16:16:23.410+01:00", comments="Source Table: configuration_attribute")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, configurationAttributeRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.411+01:00", comments="Source Table: configuration_attribute")
|
||||
default int insert(ConfigurationAttributeRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(configurationAttributeRecord)
|
||||
.map(name).toProperty("name")
|
||||
.map(type).toProperty("type")
|
||||
.map(parentId).toProperty("parentId")
|
||||
.map(resources).toProperty("resources")
|
||||
.map(validator).toProperty("validator")
|
||||
.map(dependencies).toProperty("dependencies")
|
||||
.map(defaultValue).toProperty("defaultValue")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.413+01:00", comments="Source Table: configuration_attribute")
|
||||
default int insertSelective(ConfigurationAttributeRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(configurationAttributeRecord)
|
||||
.map(name).toPropertyWhenPresent("name", record::getName)
|
||||
.map(type).toPropertyWhenPresent("type", record::getType)
|
||||
.map(parentId).toPropertyWhenPresent("parentId", record::getParentId)
|
||||
.map(resources).toPropertyWhenPresent("resources", record::getResources)
|
||||
.map(validator).toPropertyWhenPresent("validator", record::getValidator)
|
||||
.map(dependencies).toPropertyWhenPresent("dependencies", record::getDependencies)
|
||||
.map(defaultValue).toPropertyWhenPresent("defaultValue", record::getDefaultValue)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.414+01: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="2018-11-12T16:16:23.415+01: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="2018-11-12T16:16:23.417+01:00", comments="Source Table: configuration_attribute")
|
||||
default ConfigurationAttributeRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, name, type, parentId, resources, validator, dependencies, defaultValue)
|
||||
.from(configurationAttributeRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.418+01:00", comments="Source Table: configuration_attribute")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ConfigurationAttributeRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(type).equalTo(record::getType)
|
||||
.set(parentId).equalTo(record::getParentId)
|
||||
.set(resources).equalTo(record::getResources)
|
||||
.set(validator).equalTo(record::getValidator)
|
||||
.set(dependencies).equalTo(record::getDependencies)
|
||||
.set(defaultValue).equalTo(record::getDefaultValue);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.419+01:00", comments="Source Table: configuration_attribute")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ConfigurationAttributeRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(type).equalToWhenPresent(record::getType)
|
||||
.set(parentId).equalToWhenPresent(record::getParentId)
|
||||
.set(resources).equalToWhenPresent(record::getResources)
|
||||
.set(validator).equalToWhenPresent(record::getValidator)
|
||||
.set(dependencies).equalToWhenPresent(record::getDependencies)
|
||||
.set(defaultValue).equalToWhenPresent(record::getDefaultValue);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.420+01:00", comments="Source Table: configuration_attribute")
|
||||
default int updateByPrimaryKey(ConfigurationAttributeRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(type).equalTo(record::getType)
|
||||
.set(parentId).equalTo(record::getParentId)
|
||||
.set(resources).equalTo(record::getResources)
|
||||
.set(validator).equalTo(record::getValidator)
|
||||
.set(dependencies).equalTo(record::getDependencies)
|
||||
.set(defaultValue).equalTo(record::getDefaultValue)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.422+01:00", comments="Source Table: configuration_attribute")
|
||||
default int updateByPrimaryKeySelective(ConfigurationAttributeRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationAttributeRecord)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(type).equalToWhenPresent(record::getType)
|
||||
.set(parentId).equalToWhenPresent(record::getParentId)
|
||||
.set(resources).equalToWhenPresent(record::getResources)
|
||||
.set(validator).equalToWhenPresent(record::getValidator)
|
||||
.set(dependencies).equalToWhenPresent(record::getDependencies)
|
||||
.set(defaultValue).equalToWhenPresent(record::getDefaultValue)
|
||||
.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(configurationAttributeRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 ConfigurationNodeRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source Table: configuration_node")
|
||||
public static final ConfigurationNodeRecord configurationNodeRecord = new ConfigurationNodeRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source field: configuration_node.id")
|
||||
public static final SqlColumn<Long> id = configurationNodeRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source field: configuration_node.institution_id")
|
||||
public static final SqlColumn<Long> institutionId = configurationNodeRecord.institutionId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source field: configuration_node.owner")
|
||||
public static final SqlColumn<String> owner = configurationNodeRecord.owner;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source field: configuration_node.name")
|
||||
public static final SqlColumn<String> name = configurationNodeRecord.name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source field: configuration_node.description")
|
||||
public static final SqlColumn<String> description = configurationNodeRecord.description;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source field: configuration_node.type")
|
||||
public static final SqlColumn<String> type = configurationNodeRecord.type;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source field: configuration_node.template")
|
||||
public static final SqlColumn<String> template = configurationNodeRecord.template;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source Table: configuration_node")
|
||||
public static final class ConfigurationNodeRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> institutionId = column("institution_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> owner = column("owner", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> name = column("name", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> description = column("description", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> type = column("type", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> template = column("template", JDBCType.VARCHAR);
|
||||
|
||||
public ConfigurationNodeRecord() {
|
||||
super("configuration_node");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,205 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.ConfigurationNodeRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.ConfigurationNodeRecord;
|
||||
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 ConfigurationNodeRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source Table: configuration_node")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source Table: configuration_node")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source Table: configuration_node")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<ConfigurationNodeRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source Table: configuration_node")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="owner", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@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="template", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
ConfigurationNodeRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source Table: configuration_node")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="owner", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@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="template", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<ConfigurationNodeRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01:00", comments="Source Table: configuration_node")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.524+01: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="2018-11-12T16:16:23.524+01: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="2018-11-12T16:16:23.525+01:00", comments="Source Table: configuration_node")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, configurationNodeRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source Table: configuration_node")
|
||||
default int insert(ConfigurationNodeRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(configurationNodeRecord)
|
||||
.map(institutionId).toProperty("institutionId")
|
||||
.map(owner).toProperty("owner")
|
||||
.map(name).toProperty("name")
|
||||
.map(description).toProperty("description")
|
||||
.map(type).toProperty("type")
|
||||
.map(template).toProperty("template")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source Table: configuration_node")
|
||||
default int insertSelective(ConfigurationNodeRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(configurationNodeRecord)
|
||||
.map(institutionId).toPropertyWhenPresent("institutionId", record::getInstitutionId)
|
||||
.map(owner).toPropertyWhenPresent("owner", record::getOwner)
|
||||
.map(name).toPropertyWhenPresent("name", record::getName)
|
||||
.map(description).toPropertyWhenPresent("description", record::getDescription)
|
||||
.map(type).toPropertyWhenPresent("type", record::getType)
|
||||
.map(template).toPropertyWhenPresent("template", record::getTemplate)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source Table: configuration_node")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationNodeRecord>>> selectByExample() {
|
||||
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, owner, name, description, type, template)
|
||||
.from(configurationNodeRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source Table: configuration_node")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationNodeRecord>>> selectDistinctByExample() {
|
||||
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, owner, name, description, type, template)
|
||||
.from(configurationNodeRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source Table: configuration_node")
|
||||
default ConfigurationNodeRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, owner, name, description, type, template)
|
||||
.from(configurationNodeRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source Table: configuration_node")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ConfigurationNodeRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord)
|
||||
.set(institutionId).equalTo(record::getInstitutionId)
|
||||
.set(owner).equalTo(record::getOwner)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(description).equalTo(record::getDescription)
|
||||
.set(type).equalTo(record::getType)
|
||||
.set(template).equalTo(record::getTemplate);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source Table: configuration_node")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ConfigurationNodeRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord)
|
||||
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
|
||||
.set(owner).equalToWhenPresent(record::getOwner)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(description).equalToWhenPresent(record::getDescription)
|
||||
.set(type).equalToWhenPresent(record::getType)
|
||||
.set(template).equalToWhenPresent(record::getTemplate);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source Table: configuration_node")
|
||||
default int updateByPrimaryKey(ConfigurationNodeRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord)
|
||||
.set(institutionId).equalTo(record::getInstitutionId)
|
||||
.set(owner).equalTo(record::getOwner)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(description).equalTo(record::getDescription)
|
||||
.set(type).equalTo(record::getType)
|
||||
.set(template).equalTo(record::getTemplate)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source Table: configuration_node")
|
||||
default int updateByPrimaryKeySelective(ConfigurationNodeRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationNodeRecord)
|
||||
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
|
||||
.set(owner).equalToWhenPresent(record::getOwner)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(description).equalToWhenPresent(record::getDescription)
|
||||
.set(type).equalToWhenPresent(record::getType)
|
||||
.set(template).equalToWhenPresent(record::getTemplate)
|
||||
.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(configurationNodeRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import java.sql.JDBCType;
|
||||
import javax.annotation.Generated;
|
||||
import org.joda.time.DateTime;
|
||||
import org.mybatis.dynamic.sql.SqlColumn;
|
||||
import org.mybatis.dynamic.sql.SqlTable;
|
||||
|
||||
public final class ConfigurationRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.515+01:00", comments="Source Table: configuration")
|
||||
public static final ConfigurationRecord configurationRecord = new ConfigurationRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.517+01:00", comments="Source field: configuration.id")
|
||||
public static final SqlColumn<Long> id = configurationRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.517+01:00", comments="Source field: configuration.configuration_node_id")
|
||||
public static final SqlColumn<Long> configurationNodeId = configurationRecord.configurationNodeId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.517+01:00", comments="Source field: configuration.version")
|
||||
public static final SqlColumn<String> version = configurationRecord.version;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.518+01:00", comments="Source field: configuration.version_date")
|
||||
public static final SqlColumn<DateTime> versionDate = configurationRecord.versionDate;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.518+01:00", comments="Source field: configuration.followup")
|
||||
public static final SqlColumn<Integer> followup = configurationRecord.followup;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.516+01:00", comments="Source Table: configuration")
|
||||
public static final class ConfigurationRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> configurationNodeId = column("configuration_node_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> version = column("version", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<DateTime> versionDate = column("version_date", JDBCType.TIMESTAMP, "ch.ethz.seb.sebserver.ws.batis.JodaTimeTypeResolver");
|
||||
|
||||
public final SqlColumn<Integer> followup = column("followup", JDBCType.INTEGER);
|
||||
|
||||
public ConfigurationRecord() {
|
||||
super("configuration");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,191 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.ConfigurationRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.JodaTimeTypeResolver;
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.ConfigurationRecord;
|
||||
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.joda.time.DateTime;
|
||||
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 ConfigurationRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.519+01:00", comments="Source Table: configuration")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.519+01:00", comments="Source Table: configuration")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.519+01:00", comments="Source Table: configuration")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<ConfigurationRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.519+01:00", comments="Source Table: configuration")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="configuration_node_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="version", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="version_date", javaType=DateTime.class, typeHandler=JodaTimeTypeResolver.class, jdbcType=JdbcType.TIMESTAMP),
|
||||
@Arg(column="followup", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
|
||||
})
|
||||
ConfigurationRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.519+01:00", comments="Source Table: configuration")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="configuration_node_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="version", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="version_date", javaType=DateTime.class, typeHandler=JodaTimeTypeResolver.class, jdbcType=JdbcType.TIMESTAMP),
|
||||
@Arg(column="followup", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
|
||||
})
|
||||
List<ConfigurationRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.520+01:00", comments="Source Table: configuration")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.520+01: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="2018-11-12T16:16:23.520+01:00", comments="Source Table: configuration")
|
||||
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, configurationRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.520+01:00", comments="Source Table: configuration")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, configurationRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.520+01:00", comments="Source Table: configuration")
|
||||
default int insert(ConfigurationRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(configurationRecord)
|
||||
.map(configurationNodeId).toProperty("configurationNodeId")
|
||||
.map(version).toProperty("version")
|
||||
.map(versionDate).toProperty("versionDate")
|
||||
.map(followup).toProperty("followup")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.520+01:00", comments="Source Table: configuration")
|
||||
default int insertSelective(ConfigurationRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(configurationRecord)
|
||||
.map(configurationNodeId).toPropertyWhenPresent("configurationNodeId", record::getConfigurationNodeId)
|
||||
.map(version).toPropertyWhenPresent("version", record::getVersion)
|
||||
.map(versionDate).toPropertyWhenPresent("versionDate", record::getVersionDate)
|
||||
.map(followup).toPropertyWhenPresent("followup", record::getFollowup)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.520+01:00", comments="Source Table: configuration")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationRecord>>> selectByExample() {
|
||||
return SelectDSL.selectWithMapper(this::selectMany, id, configurationNodeId, version, versionDate, followup)
|
||||
.from(configurationRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.520+01:00", comments="Source Table: configuration")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationRecord>>> selectDistinctByExample() {
|
||||
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, configurationNodeId, version, versionDate, followup)
|
||||
.from(configurationRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.521+01:00", comments="Source Table: configuration")
|
||||
default ConfigurationRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, configurationNodeId, version, versionDate, followup)
|
||||
.from(configurationRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.521+01:00", comments="Source Table: configuration")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ConfigurationRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationRecord)
|
||||
.set(configurationNodeId).equalTo(record::getConfigurationNodeId)
|
||||
.set(version).equalTo(record::getVersion)
|
||||
.set(versionDate).equalTo(record::getVersionDate)
|
||||
.set(followup).equalTo(record::getFollowup);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.521+01:00", comments="Source Table: configuration")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ConfigurationRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationRecord)
|
||||
.set(configurationNodeId).equalToWhenPresent(record::getConfigurationNodeId)
|
||||
.set(version).equalToWhenPresent(record::getVersion)
|
||||
.set(versionDate).equalToWhenPresent(record::getVersionDate)
|
||||
.set(followup).equalToWhenPresent(record::getFollowup);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.521+01:00", comments="Source Table: configuration")
|
||||
default int updateByPrimaryKey(ConfigurationRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationRecord)
|
||||
.set(configurationNodeId).equalTo(record::getConfigurationNodeId)
|
||||
.set(version).equalTo(record::getVersion)
|
||||
.set(versionDate).equalTo(record::getVersionDate)
|
||||
.set(followup).equalTo(record::getFollowup)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.521+01:00", comments="Source Table: configuration")
|
||||
default int updateByPrimaryKeySelective(ConfigurationRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationRecord)
|
||||
.set(configurationNodeId).equalToWhenPresent(record::getConfigurationNodeId)
|
||||
.set(version).equalToWhenPresent(record::getVersion)
|
||||
.set(versionDate).equalToWhenPresent(record::getVersionDate)
|
||||
.set(followup).equalToWhenPresent(record::getFollowup)
|
||||
.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(configurationRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 ConfigurationValueRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.497+01:00", comments="Source Table: configuration_value")
|
||||
public static final ConfigurationValueRecord configurationValueRecord = new ConfigurationValueRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.497+01:00", comments="Source field: configuration_value.id")
|
||||
public static final SqlColumn<Long> id = configurationValueRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.497+01:00", comments="Source field: configuration_value.configuration_id")
|
||||
public static final SqlColumn<Long> configurationId = configurationValueRecord.configurationId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.497+01: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="2018-11-12T16:16:23.497+01:00", comments="Source field: configuration_value.list_index")
|
||||
public static final SqlColumn<Integer> listIndex = configurationValueRecord.listIndex;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.498+01:00", comments="Source field: configuration_value.value")
|
||||
public static final SqlColumn<String> value = configurationValueRecord.value;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.498+01:00", comments="Source field: configuration_value.text")
|
||||
public static final SqlColumn<String> text = configurationValueRecord.text;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.497+01:00", comments="Source Table: configuration_value")
|
||||
public static final class ConfigurationValueRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> configurationId = column("configuration_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> configurationAttributeId = column("configuration_attribute_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Integer> listIndex = column("list_index", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<String> value = column("value", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> text = column("text", JDBCType.CLOB);
|
||||
|
||||
public ConfigurationValueRecord() {
|
||||
super("configuration_value");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,197 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.ConfigurationValueRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.ConfigurationValueRecord;
|
||||
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 ConfigurationValueRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.501+01:00", comments="Source Table: configuration_value")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.501+01:00", comments="Source Table: configuration_value")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.501+01:00", comments="Source Table: configuration_value")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<ConfigurationValueRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.501+01:00", comments="Source Table: configuration_value")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="configuration_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="configuration_attribute_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="list_index", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
|
||||
@Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="text", javaType=String.class, jdbcType=JdbcType.CLOB)
|
||||
})
|
||||
ConfigurationValueRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.501+01:00", comments="Source Table: configuration_value")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="configuration_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="configuration_attribute_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="list_index", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
|
||||
@Arg(column="value", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="text", javaType=String.class, jdbcType=JdbcType.CLOB)
|
||||
})
|
||||
List<ConfigurationValueRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.501+01:00", comments="Source Table: configuration_value")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.501+01: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="2018-11-12T16:16:23.501+01: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="2018-11-12T16:16:23.501+01:00", comments="Source Table: configuration_value")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, configurationValueRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.502+01:00", comments="Source Table: configuration_value")
|
||||
default int insert(ConfigurationValueRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(configurationValueRecord)
|
||||
.map(configurationId).toProperty("configurationId")
|
||||
.map(configurationAttributeId).toProperty("configurationAttributeId")
|
||||
.map(listIndex).toProperty("listIndex")
|
||||
.map(value).toProperty("value")
|
||||
.map(text).toProperty("text")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.502+01:00", comments="Source Table: configuration_value")
|
||||
default int insertSelective(ConfigurationValueRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(configurationValueRecord)
|
||||
.map(configurationId).toPropertyWhenPresent("configurationId", record::getConfigurationId)
|
||||
.map(configurationAttributeId).toPropertyWhenPresent("configurationAttributeId", record::getConfigurationAttributeId)
|
||||
.map(listIndex).toPropertyWhenPresent("listIndex", record::getListIndex)
|
||||
.map(value).toPropertyWhenPresent("value", record::getValue)
|
||||
.map(text).toPropertyWhenPresent("text", record::getText)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.502+01:00", comments="Source Table: configuration_value")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationValueRecord>>> selectByExample() {
|
||||
return SelectDSL.selectWithMapper(this::selectMany, id, configurationId, configurationAttributeId, listIndex, value, text)
|
||||
.from(configurationValueRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.502+01:00", comments="Source Table: configuration_value")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ConfigurationValueRecord>>> selectDistinctByExample() {
|
||||
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, configurationId, configurationAttributeId, listIndex, value, text)
|
||||
.from(configurationValueRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.502+01:00", comments="Source Table: configuration_value")
|
||||
default ConfigurationValueRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, configurationId, configurationAttributeId, listIndex, value, text)
|
||||
.from(configurationValueRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.502+01:00", comments="Source Table: configuration_value")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ConfigurationValueRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationValueRecord)
|
||||
.set(configurationId).equalTo(record::getConfigurationId)
|
||||
.set(configurationAttributeId).equalTo(record::getConfigurationAttributeId)
|
||||
.set(listIndex).equalTo(record::getListIndex)
|
||||
.set(value).equalTo(record::getValue)
|
||||
.set(text).equalTo(record::getText);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.502+01:00", comments="Source Table: configuration_value")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ConfigurationValueRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationValueRecord)
|
||||
.set(configurationId).equalToWhenPresent(record::getConfigurationId)
|
||||
.set(configurationAttributeId).equalToWhenPresent(record::getConfigurationAttributeId)
|
||||
.set(listIndex).equalToWhenPresent(record::getListIndex)
|
||||
.set(value).equalToWhenPresent(record::getValue)
|
||||
.set(text).equalToWhenPresent(record::getText);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.502+01:00", comments="Source Table: configuration_value")
|
||||
default int updateByPrimaryKey(ConfigurationValueRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationValueRecord)
|
||||
.set(configurationId).equalTo(record::getConfigurationId)
|
||||
.set(configurationAttributeId).equalTo(record::getConfigurationAttributeId)
|
||||
.set(listIndex).equalTo(record::getListIndex)
|
||||
.set(value).equalTo(record::getValue)
|
||||
.set(text).equalTo(record::getText)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.502+01:00", comments="Source Table: configuration_value")
|
||||
default int updateByPrimaryKeySelective(ConfigurationValueRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, configurationValueRecord)
|
||||
.set(configurationId).equalToWhenPresent(record::getConfigurationId)
|
||||
.set(configurationAttributeId).equalToWhenPresent(record::getConfigurationAttributeId)
|
||||
.set(listIndex).equalToWhenPresent(record::getListIndex)
|
||||
.set(value).equalToWhenPresent(record::getValue)
|
||||
.set(text).equalToWhenPresent(record::getText)
|
||||
.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(configurationValueRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 ExamConfigurationMapRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.526+01:00", comments="Source Table: exam_configuration_map")
|
||||
public static final ExamConfigurationMapRecord examConfigurationMapRecord = new ExamConfigurationMapRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.526+01:00", comments="Source field: exam_configuration_map.id")
|
||||
public static final SqlColumn<Long> id = examConfigurationMapRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.526+01: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="2018-11-12T16:16:23.526+01: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="2018-11-12T16:16:23.526+01: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="2018-11-12T16:16:23.526+01:00", comments="Source Table: exam_configuration_map")
|
||||
public static final class ExamConfigurationMapRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> examId = column("exam_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> configurationNodeId = column("configuration_node_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> userNames = column("user_names", JDBCType.VARCHAR);
|
||||
|
||||
public ExamConfigurationMapRecord() {
|
||||
super("exam_configuration_map");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,181 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.ExamConfigurationMapRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.ExamConfigurationMapRecord;
|
||||
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 ExamConfigurationMapRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.526+01:00", comments="Source Table: exam_configuration_map")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.527+01:00", comments="Source Table: exam_configuration_map")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.527+01:00", comments="Source Table: exam_configuration_map")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<ExamConfigurationMapRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.527+01:00", comments="Source Table: exam_configuration_map")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="exam_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="configuration_node_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="user_names", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
ExamConfigurationMapRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.527+01:00", comments="Source Table: exam_configuration_map")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="exam_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="configuration_node_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="user_names", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<ExamConfigurationMapRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.527+01:00", comments="Source Table: exam_configuration_map")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.528+01: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="2018-11-12T16:16:23.528+01: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="2018-11-12T16:16:23.528+01:00", comments="Source Table: exam_configuration_map")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, examConfigurationMapRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.528+01:00", comments="Source Table: exam_configuration_map")
|
||||
default int insert(ExamConfigurationMapRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(examConfigurationMapRecord)
|
||||
.map(examId).toProperty("examId")
|
||||
.map(configurationNodeId).toProperty("configurationNodeId")
|
||||
.map(userNames).toProperty("userNames")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.528+01:00", comments="Source Table: exam_configuration_map")
|
||||
default int insertSelective(ExamConfigurationMapRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(examConfigurationMapRecord)
|
||||
.map(examId).toPropertyWhenPresent("examId", record::getExamId)
|
||||
.map(configurationNodeId).toPropertyWhenPresent("configurationNodeId", record::getConfigurationNodeId)
|
||||
.map(userNames).toPropertyWhenPresent("userNames", record::getUserNames)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.528+01:00", comments="Source Table: exam_configuration_map")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ExamConfigurationMapRecord>>> selectByExample() {
|
||||
return SelectDSL.selectWithMapper(this::selectMany, id, examId, configurationNodeId, userNames)
|
||||
.from(examConfigurationMapRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.528+01:00", comments="Source Table: exam_configuration_map")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ExamConfigurationMapRecord>>> selectDistinctByExample() {
|
||||
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, examId, configurationNodeId, userNames)
|
||||
.from(examConfigurationMapRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.528+01:00", comments="Source Table: exam_configuration_map")
|
||||
default ExamConfigurationMapRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, examId, configurationNodeId, userNames)
|
||||
.from(examConfigurationMapRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.528+01:00", comments="Source Table: exam_configuration_map")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ExamConfigurationMapRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord)
|
||||
.set(examId).equalTo(record::getExamId)
|
||||
.set(configurationNodeId).equalTo(record::getConfigurationNodeId)
|
||||
.set(userNames).equalTo(record::getUserNames);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.528+01:00", comments="Source Table: exam_configuration_map")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ExamConfigurationMapRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord)
|
||||
.set(examId).equalToWhenPresent(record::getExamId)
|
||||
.set(configurationNodeId).equalToWhenPresent(record::getConfigurationNodeId)
|
||||
.set(userNames).equalToWhenPresent(record::getUserNames);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.528+01:00", comments="Source Table: exam_configuration_map")
|
||||
default int updateByPrimaryKey(ExamConfigurationMapRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord)
|
||||
.set(examId).equalTo(record::getExamId)
|
||||
.set(configurationNodeId).equalTo(record::getConfigurationNodeId)
|
||||
.set(userNames).equalTo(record::getUserNames)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.528+01:00", comments="Source Table: exam_configuration_map")
|
||||
default int updateByPrimaryKeySelective(ExamConfigurationMapRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, examConfigurationMapRecord)
|
||||
.set(examId).equalToWhenPresent(record::getExamId)
|
||||
.set(configurationNodeId).equalToWhenPresent(record::getConfigurationNodeId)
|
||||
.set(userNames).equalToWhenPresent(record::getUserNames)
|
||||
.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(examConfigurationMapRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 ExamRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.530+01:00", comments="Source Table: exam")
|
||||
public static final ExamRecord examRecord = new ExamRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.530+01:00", comments="Source field: exam.id")
|
||||
public static final SqlColumn<Long> id = examRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.531+01:00", comments="Source field: exam.lms_setup_id")
|
||||
public static final SqlColumn<Long> lmsSetupId = examRecord.lmsSetupId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.531+01:00", comments="Source field: exam.external_uuid")
|
||||
public static final SqlColumn<String> externalUuid = examRecord.externalUuid;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.531+01:00", comments="Source field: exam.owner")
|
||||
public static final SqlColumn<String> owner = examRecord.owner;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.531+01:00", comments="Source field: exam.supporter")
|
||||
public static final SqlColumn<String> supporter = examRecord.supporter;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.531+01:00", comments="Source field: exam.type")
|
||||
public static final SqlColumn<String> type = examRecord.type;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.530+01:00", comments="Source Table: exam")
|
||||
public static final class ExamRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> lmsSetupId = column("lms_setup_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> externalUuid = column("external_uuid", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> owner = column("owner", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> supporter = column("supporter", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> type = column("type", JDBCType.VARCHAR);
|
||||
|
||||
public ExamRecord() {
|
||||
super("exam");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,197 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.ExamRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.ExamRecord;
|
||||
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 ExamRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.531+01:00", comments="Source Table: exam")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.531+01:00", comments="Source Table: exam")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.531+01:00", comments="Source Table: exam")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<ExamRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.531+01:00", comments="Source Table: exam")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="lms_setup_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="external_uuid", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="owner", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="supporter", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
ExamRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="lms_setup_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="external_uuid", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="owner", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="supporter", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<ExamRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01: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="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, examRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, examRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
default int insert(ExamRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(examRecord)
|
||||
.map(lmsSetupId).toProperty("lmsSetupId")
|
||||
.map(externalUuid).toProperty("externalUuid")
|
||||
.map(owner).toProperty("owner")
|
||||
.map(supporter).toProperty("supporter")
|
||||
.map(type).toProperty("type")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
default int insertSelective(ExamRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(examRecord)
|
||||
.map(lmsSetupId).toPropertyWhenPresent("lmsSetupId", record::getLmsSetupId)
|
||||
.map(externalUuid).toPropertyWhenPresent("externalUuid", record::getExternalUuid)
|
||||
.map(owner).toPropertyWhenPresent("owner", record::getOwner)
|
||||
.map(supporter).toPropertyWhenPresent("supporter", record::getSupporter)
|
||||
.map(type).toPropertyWhenPresent("type", record::getType)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ExamRecord>>> selectByExample() {
|
||||
return SelectDSL.selectWithMapper(this::selectMany, id, lmsSetupId, externalUuid, owner, supporter, type)
|
||||
.from(examRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<ExamRecord>>> selectDistinctByExample() {
|
||||
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, lmsSetupId, externalUuid, owner, supporter, type)
|
||||
.from(examRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
default ExamRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, lmsSetupId, externalUuid, owner, supporter, type)
|
||||
.from(examRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(ExamRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, examRecord)
|
||||
.set(lmsSetupId).equalTo(record::getLmsSetupId)
|
||||
.set(externalUuid).equalTo(record::getExternalUuid)
|
||||
.set(owner).equalTo(record::getOwner)
|
||||
.set(supporter).equalTo(record::getSupporter)
|
||||
.set(type).equalTo(record::getType);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(ExamRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, examRecord)
|
||||
.set(lmsSetupId).equalToWhenPresent(record::getLmsSetupId)
|
||||
.set(externalUuid).equalToWhenPresent(record::getExternalUuid)
|
||||
.set(owner).equalToWhenPresent(record::getOwner)
|
||||
.set(supporter).equalToWhenPresent(record::getSupporter)
|
||||
.set(type).equalToWhenPresent(record::getType);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.532+01:00", comments="Source Table: exam")
|
||||
default int updateByPrimaryKey(ExamRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, examRecord)
|
||||
.set(lmsSetupId).equalTo(record::getLmsSetupId)
|
||||
.set(externalUuid).equalTo(record::getExternalUuid)
|
||||
.set(owner).equalTo(record::getOwner)
|
||||
.set(supporter).equalTo(record::getSupporter)
|
||||
.set(type).equalTo(record::getType)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.533+01:00", comments="Source Table: exam")
|
||||
default int updateByPrimaryKeySelective(ExamRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, examRecord)
|
||||
.set(lmsSetupId).equalToWhenPresent(record::getLmsSetupId)
|
||||
.set(externalUuid).equalToWhenPresent(record::getExternalUuid)
|
||||
.set(owner).equalToWhenPresent(record::getOwner)
|
||||
.set(supporter).equalToWhenPresent(record::getSupporter)
|
||||
.set(type).equalToWhenPresent(record::getType)
|
||||
.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(examRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 IndicatorRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source Table: indicator")
|
||||
public static final IndicatorRecord indicatorRecord = new IndicatorRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.id")
|
||||
public static final SqlColumn<Long> id = indicatorRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.exam_id")
|
||||
public static final SqlColumn<Long> examId = indicatorRecord.examId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01:00", comments="Source field: indicator.type")
|
||||
public static final SqlColumn<String> type = indicatorRecord.type;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01:00", comments="Source field: indicator.name")
|
||||
public static final SqlColumn<String> name = indicatorRecord.name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01:00", comments="Source field: indicator.color")
|
||||
public static final SqlColumn<String> color = indicatorRecord.color;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source Table: indicator")
|
||||
public static final class IndicatorRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> examId = column("exam_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> type = column("type", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> name = column("name", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> color = column("color", JDBCType.VARCHAR);
|
||||
|
||||
public IndicatorRecord() {
|
||||
super("indicator");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,189 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.IndicatorRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.IndicatorRecord;
|
||||
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 IndicatorRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01:00", comments="Source Table: indicator")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01:00", comments="Source Table: indicator")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01:00", comments="Source Table: indicator")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<IndicatorRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01:00", comments="Source Table: indicator")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="exam_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="color", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
IndicatorRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01:00", comments="Source Table: indicator")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="exam_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="type", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="color", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<IndicatorRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01:00", comments="Source Table: indicator")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01: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="2018-11-12T16:16:23.543+01:00", comments="Source Table: indicator")
|
||||
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, indicatorRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.543+01:00", comments="Source Table: indicator")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, indicatorRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.544+01:00", comments="Source Table: indicator")
|
||||
default int insert(IndicatorRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(indicatorRecord)
|
||||
.map(examId).toProperty("examId")
|
||||
.map(type).toProperty("type")
|
||||
.map(name).toProperty("name")
|
||||
.map(color).toProperty("color")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.544+01:00", comments="Source Table: indicator")
|
||||
default int insertSelective(IndicatorRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(indicatorRecord)
|
||||
.map(examId).toPropertyWhenPresent("examId", record::getExamId)
|
||||
.map(type).toPropertyWhenPresent("type", record::getType)
|
||||
.map(name).toPropertyWhenPresent("name", record::getName)
|
||||
.map(color).toPropertyWhenPresent("color", record::getColor)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.544+01: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="2018-11-12T16:16:23.544+01: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="2018-11-12T16:16:23.544+01:00", comments="Source Table: indicator")
|
||||
default IndicatorRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, examId, type, name, color)
|
||||
.from(indicatorRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.544+01:00", comments="Source Table: indicator")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(IndicatorRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, indicatorRecord)
|
||||
.set(examId).equalTo(record::getExamId)
|
||||
.set(type).equalTo(record::getType)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(color).equalTo(record::getColor);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.544+01:00", comments="Source Table: indicator")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(IndicatorRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, indicatorRecord)
|
||||
.set(examId).equalToWhenPresent(record::getExamId)
|
||||
.set(type).equalToWhenPresent(record::getType)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(color).equalToWhenPresent(record::getColor);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.544+01:00", comments="Source Table: indicator")
|
||||
default int updateByPrimaryKey(IndicatorRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, indicatorRecord)
|
||||
.set(examId).equalTo(record::getExamId)
|
||||
.set(type).equalTo(record::getType)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(color).equalTo(record::getColor)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.544+01:00", comments="Source Table: indicator")
|
||||
default int updateByPrimaryKeySelective(IndicatorRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, indicatorRecord)
|
||||
.set(examId).equalToWhenPresent(record::getExamId)
|
||||
.set(type).equalToWhenPresent(record::getType)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(color).equalToWhenPresent(record::getColor)
|
||||
.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(indicatorRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 InstitutionRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.545+01:00", comments="Source Table: institution")
|
||||
public static final InstitutionRecord institutionRecord = new InstitutionRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.545+01:00", comments="Source field: institution.id")
|
||||
public static final SqlColumn<Long> id = institutionRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source field: institution.name")
|
||||
public static final SqlColumn<String> name = institutionRecord.name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source field: institution.authtype")
|
||||
public static final SqlColumn<String> authtype = institutionRecord.authtype;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.545+01:00", comments="Source Table: institution")
|
||||
public static final class InstitutionRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> name = column("name", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> authtype = column("authtype", JDBCType.VARCHAR);
|
||||
|
||||
public InstitutionRecord() {
|
||||
super("institution");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,173 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.InstitutionRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.InstitutionRecord;
|
||||
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 InstitutionRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<InstitutionRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="authtype", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
InstitutionRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="authtype", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<InstitutionRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01: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="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, institutionRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, institutionRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
default int insert(InstitutionRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(institutionRecord)
|
||||
.map(name).toProperty("name")
|
||||
.map(authtype).toProperty("authtype")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
default int insertSelective(InstitutionRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(institutionRecord)
|
||||
.map(name).toPropertyWhenPresent("name", record::getName)
|
||||
.map(authtype).toPropertyWhenPresent("authtype", record::getAuthtype)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<InstitutionRecord>>> selectByExample() {
|
||||
return SelectDSL.selectWithMapper(this::selectMany, id, name, authtype)
|
||||
.from(institutionRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<InstitutionRecord>>> selectDistinctByExample() {
|
||||
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, name, authtype)
|
||||
.from(institutionRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
default InstitutionRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, name, authtype)
|
||||
.from(institutionRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.546+01:00", comments="Source Table: institution")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(InstitutionRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, institutionRecord)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(authtype).equalTo(record::getAuthtype);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source Table: institution")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(InstitutionRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, institutionRecord)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(authtype).equalToWhenPresent(record::getAuthtype);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source Table: institution")
|
||||
default int updateByPrimaryKey(InstitutionRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, institutionRecord)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(authtype).equalTo(record::getAuthtype)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source Table: institution")
|
||||
default int updateByPrimaryKeySelective(InstitutionRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, institutionRecord)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(authtype).equalToWhenPresent(record::getAuthtype)
|
||||
.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(institutionRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 OrientationRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.504+01:00", comments="Source Table: orientation")
|
||||
public static final OrientationRecord orientationRecord = new OrientationRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.504+01:00", comments="Source field: orientation.id")
|
||||
public static final SqlColumn<Long> id = orientationRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.505+01:00", comments="Source field: orientation.config_attribute_id")
|
||||
public static final SqlColumn<Long> configAttributeId = orientationRecord.configAttributeId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.505+01:00", comments="Source field: orientation.template")
|
||||
public static final SqlColumn<String> template = orientationRecord.template;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.505+01:00", comments="Source field: orientation.view")
|
||||
public static final SqlColumn<String> view = orientationRecord.view;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.505+01:00", comments="Source field: orientation.group")
|
||||
public static final SqlColumn<String> group = orientationRecord.group;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.505+01:00", comments="Source field: orientation.x_position")
|
||||
public static final SqlColumn<Integer> xPosition = orientationRecord.xPosition;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.505+01:00", comments="Source field: orientation.y_position")
|
||||
public static final SqlColumn<Integer> yPosition = orientationRecord.yPosition;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.505+01:00", comments="Source field: orientation.width")
|
||||
public static final SqlColumn<Integer> width = orientationRecord.width;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.506+01:00", comments="Source field: orientation.height")
|
||||
public static final SqlColumn<Integer> height = orientationRecord.height;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.504+01:00", comments="Source Table: orientation")
|
||||
public static final class OrientationRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> configAttributeId = column("config_attribute_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> template = column("template", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> view = column("view", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> group = column("group", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<Integer> xPosition = column("x_position", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Integer> yPosition = column("y_position", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Integer> width = column("width", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Integer> height = column("height", JDBCType.INTEGER);
|
||||
|
||||
public OrientationRecord() {
|
||||
super("orientation");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,221 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.OrientationRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.OrientationRecord;
|
||||
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 OrientationRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.506+01:00", comments="Source Table: orientation")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.506+01:00", comments="Source Table: orientation")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.506+01:00", comments="Source Table: orientation")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<OrientationRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.506+01: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", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="view", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="group", 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),
|
||||
@Arg(column="height", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
|
||||
})
|
||||
OrientationRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.506+01: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", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="view", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="group", 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),
|
||||
@Arg(column="height", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
|
||||
})
|
||||
List<OrientationRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.506+01:00", comments="Source Table: orientation")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.506+01: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="2018-11-12T16:16:23.506+01:00", comments="Source Table: orientation")
|
||||
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, orientationRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.506+01:00", comments="Source Table: orientation")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, orientationRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.507+01:00", comments="Source Table: orientation")
|
||||
default int insert(OrientationRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(orientationRecord)
|
||||
.map(configAttributeId).toProperty("configAttributeId")
|
||||
.map(template).toProperty("template")
|
||||
.map(view).toProperty("view")
|
||||
.map(group).toProperty("group")
|
||||
.map(xPosition).toProperty("xPosition")
|
||||
.map(yPosition).toProperty("yPosition")
|
||||
.map(width).toProperty("width")
|
||||
.map(height).toProperty("height")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.509+01:00", comments="Source Table: orientation")
|
||||
default int insertSelective(OrientationRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(orientationRecord)
|
||||
.map(configAttributeId).toPropertyWhenPresent("configAttributeId", record::getConfigAttributeId)
|
||||
.map(template).toPropertyWhenPresent("template", record::getTemplate)
|
||||
.map(view).toPropertyWhenPresent("view", record::getView)
|
||||
.map(group).toPropertyWhenPresent("group", record::getGroup)
|
||||
.map(xPosition).toPropertyWhenPresent("xPosition", record::getxPosition)
|
||||
.map(yPosition).toPropertyWhenPresent("yPosition", record::getyPosition)
|
||||
.map(width).toPropertyWhenPresent("width", record::getWidth)
|
||||
.map(height).toPropertyWhenPresent("height", record::getHeight)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.510+01:00", comments="Source Table: orientation")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<OrientationRecord>>> selectByExample() {
|
||||
return SelectDSL.selectWithMapper(this::selectMany, id, configAttributeId, template, view, group, xPosition, yPosition, width, height)
|
||||
.from(orientationRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.510+01:00", comments="Source Table: orientation")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<OrientationRecord>>> selectDistinctByExample() {
|
||||
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, configAttributeId, template, view, group, xPosition, yPosition, width, height)
|
||||
.from(orientationRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.510+01:00", comments="Source Table: orientation")
|
||||
default OrientationRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, configAttributeId, template, view, group, xPosition, yPosition, width, height)
|
||||
.from(orientationRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.510+01:00", comments="Source Table: orientation")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(OrientationRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, orientationRecord)
|
||||
.set(configAttributeId).equalTo(record::getConfigAttributeId)
|
||||
.set(template).equalTo(record::getTemplate)
|
||||
.set(view).equalTo(record::getView)
|
||||
.set(group).equalTo(record::getGroup)
|
||||
.set(xPosition).equalTo(record::getxPosition)
|
||||
.set(yPosition).equalTo(record::getyPosition)
|
||||
.set(width).equalTo(record::getWidth)
|
||||
.set(height).equalTo(record::getHeight);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.510+01:00", comments="Source Table: orientation")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(OrientationRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, orientationRecord)
|
||||
.set(configAttributeId).equalToWhenPresent(record::getConfigAttributeId)
|
||||
.set(template).equalToWhenPresent(record::getTemplate)
|
||||
.set(view).equalToWhenPresent(record::getView)
|
||||
.set(group).equalToWhenPresent(record::getGroup)
|
||||
.set(xPosition).equalToWhenPresent(record::getxPosition)
|
||||
.set(yPosition).equalToWhenPresent(record::getyPosition)
|
||||
.set(width).equalToWhenPresent(record::getWidth)
|
||||
.set(height).equalToWhenPresent(record::getHeight);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.510+01:00", comments="Source Table: orientation")
|
||||
default int updateByPrimaryKey(OrientationRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, orientationRecord)
|
||||
.set(configAttributeId).equalTo(record::getConfigAttributeId)
|
||||
.set(template).equalTo(record::getTemplate)
|
||||
.set(view).equalTo(record::getView)
|
||||
.set(group).equalTo(record::getGroup)
|
||||
.set(xPosition).equalTo(record::getxPosition)
|
||||
.set(yPosition).equalTo(record::getyPosition)
|
||||
.set(width).equalTo(record::getWidth)
|
||||
.set(height).equalTo(record::getHeight)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.510+01:00", comments="Source Table: orientation")
|
||||
default int updateByPrimaryKeySelective(OrientationRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, orientationRecord)
|
||||
.set(configAttributeId).equalToWhenPresent(record::getConfigAttributeId)
|
||||
.set(template).equalToWhenPresent(record::getTemplate)
|
||||
.set(view).equalToWhenPresent(record::getView)
|
||||
.set(group).equalToWhenPresent(record::getGroup)
|
||||
.set(xPosition).equalToWhenPresent(record::getxPosition)
|
||||
.set(yPosition).equalToWhenPresent(record::getyPosition)
|
||||
.set(width).equalToWhenPresent(record::getWidth)
|
||||
.set(height).equalToWhenPresent(record::getHeight)
|
||||
.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(orientationRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 RoleRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source Table: user_role")
|
||||
public static final RoleRecord roleRecord = new RoleRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source field: user_role.id")
|
||||
public static final SqlColumn<Long> id = roleRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source field: user_role.user_id")
|
||||
public static final SqlColumn<Long> userId = roleRecord.userId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source field: user_role.role_name")
|
||||
public static final SqlColumn<String> roleName = roleRecord.roleName;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source Table: user_role")
|
||||
public static final class RoleRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> userId = column("user_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> roleName = column("role_name", JDBCType.VARCHAR);
|
||||
|
||||
public RoleRecord() {
|
||||
super("user_role");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,173 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.RoleRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.RoleRecord;
|
||||
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 RoleRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source Table: user_role")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source Table: user_role")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source Table: user_role")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<RoleRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.555+01:00", comments="Source Table: user_role")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="user_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="role_name", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
RoleRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.555+01:00", comments="Source Table: user_role")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="user_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="role_name", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<RoleRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.555+01:00", comments="Source Table: user_role")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.555+01: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="2018-11-12T16:16:23.555+01: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="2018-11-12T16:16:23.555+01:00", comments="Source Table: user_role")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, roleRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.555+01:00", comments="Source Table: user_role")
|
||||
default int insert(RoleRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(roleRecord)
|
||||
.map(userId).toProperty("userId")
|
||||
.map(roleName).toProperty("roleName")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.555+01:00", comments="Source Table: user_role")
|
||||
default int insertSelective(RoleRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(roleRecord)
|
||||
.map(userId).toPropertyWhenPresent("userId", record::getUserId)
|
||||
.map(roleName).toPropertyWhenPresent("roleName", record::getRoleName)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.555+01: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="2018-11-12T16:16:23.555+01: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="2018-11-12T16:16:23.555+01:00", comments="Source Table: user_role")
|
||||
default RoleRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, userId, roleName)
|
||||
.from(roleRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.555+01: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="2018-11-12T16:16:23.555+01: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="2018-11-12T16:16:23.555+01:00", comments="Source Table: user_role")
|
||||
default int updateByPrimaryKey(RoleRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, roleRecord)
|
||||
.set(userId).equalTo(record::getUserId)
|
||||
.set(roleName).equalTo(record::getRoleName)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.555+01:00", comments="Source Table: user_role")
|
||||
default int updateByPrimaryKeySelective(RoleRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, roleRecord)
|
||||
.set(userId).equalToWhenPresent(record::getUserId)
|
||||
.set(roleName).equalToWhenPresent(record::getRoleName)
|
||||
.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(roleRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package ch.ethz.seb.sebserver.ws.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 SebLmsSetupRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source Table: seb_lms_setup")
|
||||
public static final SebLmsSetupRecord sebLmsSetupRecord = new SebLmsSetupRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.id")
|
||||
public static final SqlColumn<Long> id = sebLmsSetupRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.institution_id")
|
||||
public static final SqlColumn<Long> institutionId = sebLmsSetupRecord.institutionId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.name")
|
||||
public static final SqlColumn<String> name = sebLmsSetupRecord.name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source field: seb_lms_setup.lms_type")
|
||||
public static final SqlColumn<String> lmsType = sebLmsSetupRecord.lmsType;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source field: seb_lms_setup.lms_url")
|
||||
public static final SqlColumn<String> lmsUrl = sebLmsSetupRecord.lmsUrl;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source field: seb_lms_setup.lms_clientname")
|
||||
public static final SqlColumn<String> lmsClientname = sebLmsSetupRecord.lmsClientname;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source field: seb_lms_setup.lms_clientsecret")
|
||||
public static final SqlColumn<String> lmsClientsecret = sebLmsSetupRecord.lmsClientsecret;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source field: seb_lms_setup.lms_rest_api_token")
|
||||
public static final SqlColumn<String> lmsRestApiToken = sebLmsSetupRecord.lmsRestApiToken;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source field: seb_lms_setup.seb_clientname")
|
||||
public static final SqlColumn<String> sebClientname = sebLmsSetupRecord.sebClientname;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source field: seb_lms_setup.seb_clientsecret")
|
||||
public static final SqlColumn<String> sebClientsecret = sebLmsSetupRecord.sebClientsecret;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source Table: seb_lms_setup")
|
||||
public static final class SebLmsSetupRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> institutionId = column("institution_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> name = column("name", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> lmsType = column("lms_type", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> lmsUrl = column("lms_url", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> lmsClientname = column("lms_clientname", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> lmsClientsecret = column("lms_clientsecret", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> lmsRestApiToken = column("lms_rest_api_token", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> sebClientname = column("seb_clientname", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> sebClientsecret = column("seb_clientsecret", JDBCType.VARCHAR);
|
||||
|
||||
public SebLmsSetupRecord() {
|
||||
super("seb_lms_setup");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,229 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.SebLmsSetupRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.SebLmsSetupRecord;
|
||||
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 SebLmsSetupRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_lms_setup")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_lms_setup")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_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<SebLmsSetupRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_lms_setup")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="lms_type", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="lms_url", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="lms_clientname", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="lms_clientsecret", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="lms_rest_api_token", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="seb_clientname", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="seb_clientsecret", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
SebLmsSetupRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_lms_setup")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="lms_type", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="lms_url", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="lms_clientname", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="lms_clientsecret", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="lms_rest_api_token", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="seb_clientname", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="seb_clientsecret", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<SebLmsSetupRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_lms_setup")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_lms_setup")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<Long>> countByExample() {
|
||||
return SelectDSL.selectWithMapper(this::count, SqlBuilder.count())
|
||||
.from(sebLmsSetupRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_lms_setup")
|
||||
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, sebLmsSetupRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_lms_setup")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, sebLmsSetupRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_lms_setup")
|
||||
default int insert(SebLmsSetupRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(sebLmsSetupRecord)
|
||||
.map(institutionId).toProperty("institutionId")
|
||||
.map(name).toProperty("name")
|
||||
.map(lmsType).toProperty("lmsType")
|
||||
.map(lmsUrl).toProperty("lmsUrl")
|
||||
.map(lmsClientname).toProperty("lmsClientname")
|
||||
.map(lmsClientsecret).toProperty("lmsClientsecret")
|
||||
.map(lmsRestApiToken).toProperty("lmsRestApiToken")
|
||||
.map(sebClientname).toProperty("sebClientname")
|
||||
.map(sebClientsecret).toProperty("sebClientsecret")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.549+01:00", comments="Source Table: seb_lms_setup")
|
||||
default int insertSelective(SebLmsSetupRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(sebLmsSetupRecord)
|
||||
.map(institutionId).toPropertyWhenPresent("institutionId", record::getInstitutionId)
|
||||
.map(name).toPropertyWhenPresent("name", record::getName)
|
||||
.map(lmsType).toPropertyWhenPresent("lmsType", record::getLmsType)
|
||||
.map(lmsUrl).toPropertyWhenPresent("lmsUrl", record::getLmsUrl)
|
||||
.map(lmsClientname).toPropertyWhenPresent("lmsClientname", record::getLmsClientname)
|
||||
.map(lmsClientsecret).toPropertyWhenPresent("lmsClientsecret", record::getLmsClientsecret)
|
||||
.map(lmsRestApiToken).toPropertyWhenPresent("lmsRestApiToken", record::getLmsRestApiToken)
|
||||
.map(sebClientname).toPropertyWhenPresent("sebClientname", record::getSebClientname)
|
||||
.map(sebClientsecret).toPropertyWhenPresent("sebClientsecret", record::getSebClientsecret)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source Table: seb_lms_setup")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<SebLmsSetupRecord>>> selectByExample() {
|
||||
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, sebClientname, sebClientsecret)
|
||||
.from(sebLmsSetupRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source Table: seb_lms_setup")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<SebLmsSetupRecord>>> selectDistinctByExample() {
|
||||
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, sebClientname, sebClientsecret)
|
||||
.from(sebLmsSetupRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source Table: seb_lms_setup")
|
||||
default SebLmsSetupRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, name, lmsType, lmsUrl, lmsClientname, lmsClientsecret, lmsRestApiToken, sebClientname, sebClientsecret)
|
||||
.from(sebLmsSetupRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source Table: seb_lms_setup")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(SebLmsSetupRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, sebLmsSetupRecord)
|
||||
.set(institutionId).equalTo(record::getInstitutionId)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(lmsType).equalTo(record::getLmsType)
|
||||
.set(lmsUrl).equalTo(record::getLmsUrl)
|
||||
.set(lmsClientname).equalTo(record::getLmsClientname)
|
||||
.set(lmsClientsecret).equalTo(record::getLmsClientsecret)
|
||||
.set(lmsRestApiToken).equalTo(record::getLmsRestApiToken)
|
||||
.set(sebClientname).equalTo(record::getSebClientname)
|
||||
.set(sebClientsecret).equalTo(record::getSebClientsecret);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source Table: seb_lms_setup")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(SebLmsSetupRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, sebLmsSetupRecord)
|
||||
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(lmsType).equalToWhenPresent(record::getLmsType)
|
||||
.set(lmsUrl).equalToWhenPresent(record::getLmsUrl)
|
||||
.set(lmsClientname).equalToWhenPresent(record::getLmsClientname)
|
||||
.set(lmsClientsecret).equalToWhenPresent(record::getLmsClientsecret)
|
||||
.set(lmsRestApiToken).equalToWhenPresent(record::getLmsRestApiToken)
|
||||
.set(sebClientname).equalToWhenPresent(record::getSebClientname)
|
||||
.set(sebClientsecret).equalToWhenPresent(record::getSebClientsecret);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source Table: seb_lms_setup")
|
||||
default int updateByPrimaryKey(SebLmsSetupRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, sebLmsSetupRecord)
|
||||
.set(institutionId).equalTo(record::getInstitutionId)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(lmsType).equalTo(record::getLmsType)
|
||||
.set(lmsUrl).equalTo(record::getLmsUrl)
|
||||
.set(lmsClientname).equalTo(record::getLmsClientname)
|
||||
.set(lmsClientsecret).equalTo(record::getLmsClientsecret)
|
||||
.set(lmsRestApiToken).equalTo(record::getLmsRestApiToken)
|
||||
.set(sebClientname).equalTo(record::getSebClientname)
|
||||
.set(sebClientsecret).equalTo(record::getSebClientsecret)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source Table: seb_lms_setup")
|
||||
default int updateByPrimaryKeySelective(SebLmsSetupRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, sebLmsSetupRecord)
|
||||
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(lmsType).equalToWhenPresent(record::getLmsType)
|
||||
.set(lmsUrl).equalToWhenPresent(record::getLmsUrl)
|
||||
.set(lmsClientname).equalToWhenPresent(record::getLmsClientname)
|
||||
.set(lmsClientsecret).equalToWhenPresent(record::getLmsClientsecret)
|
||||
.set(lmsRestApiToken).equalToWhenPresent(record::getLmsRestApiToken)
|
||||
.set(sebClientname).equalToWhenPresent(record::getSebClientname)
|
||||
.set(sebClientsecret).equalToWhenPresent(record::getSebClientsecret)
|
||||
.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(sebLmsSetupRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import java.sql.JDBCType;
|
||||
import javax.annotation.Generated;
|
||||
import org.joda.time.DateTime;
|
||||
import org.mybatis.dynamic.sql.SqlColumn;
|
||||
import org.mybatis.dynamic.sql.SqlTable;
|
||||
|
||||
public final class UserRecordDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source Table: user")
|
||||
public static final UserRecord userRecord = new UserRecord();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.id")
|
||||
public static final SqlColumn<Long> id = userRecord.id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.institution_id")
|
||||
public static final SqlColumn<Long> institutionId = userRecord.institutionId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.uuid")
|
||||
public static final SqlColumn<String> uuid = userRecord.uuid;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.name")
|
||||
public static final SqlColumn<String> name = userRecord.name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.user_name")
|
||||
public static final SqlColumn<String> userName = userRecord.userName;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.password")
|
||||
public static final SqlColumn<String> password = userRecord.password;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.email")
|
||||
public static final SqlColumn<String> email = userRecord.email;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.creation_date")
|
||||
public static final SqlColumn<DateTime> creationDate = userRecord.creationDate;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.active")
|
||||
public static final SqlColumn<Integer> active = userRecord.active;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.locale")
|
||||
public static final SqlColumn<String> locale = userRecord.locale;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source field: user.timezone")
|
||||
public static final SqlColumn<String> timezone = userRecord.timezone;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source Table: user")
|
||||
public static final class UserRecord extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> institutionId = column("institution_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> uuid = column("uuid", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> name = column("name", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> userName = column("user_name", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> password = column("password", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> email = column("email", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<DateTime> creationDate = column("creation_date", JDBCType.TIMESTAMP, "ch.ethz.seb.sebserver.ws.batis.JodaTimeTypeResolver");
|
||||
|
||||
public final SqlColumn<Integer> active = column("active", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<String> locale = column("locale", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> timezone = column("timezone", JDBCType.VARCHAR);
|
||||
|
||||
public UserRecord() {
|
||||
super("user");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,239 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.mapper;
|
||||
|
||||
import static ch.ethz.seb.sebserver.ws.batis.mapper.UserRecordDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import ch.ethz.seb.sebserver.ws.batis.JodaTimeTypeResolver;
|
||||
import ch.ethz.seb.sebserver.ws.batis.model.UserRecord;
|
||||
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.joda.time.DateTime;
|
||||
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 UserRecordMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source Table: user")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source Table: user")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source Table: user")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
@SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="record.id", before=false, resultType=Long.class)
|
||||
int insert(InsertStatementProvider<UserRecord> insertStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.552+01:00", comments="Source Table: user")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="uuid", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="user_name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="password", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="email", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="creation_date", javaType=DateTime.class, typeHandler=JodaTimeTypeResolver.class, jdbcType=JdbcType.TIMESTAMP),
|
||||
@Arg(column="active", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
|
||||
@Arg(column="locale", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="timezone", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
UserRecord selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ConstructorArgs({
|
||||
@Arg(column="id", javaType=Long.class, jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Arg(column="institution_id", javaType=Long.class, jdbcType=JdbcType.BIGINT),
|
||||
@Arg(column="uuid", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="user_name", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="password", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="email", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="creation_date", javaType=DateTime.class, typeHandler=JodaTimeTypeResolver.class, jdbcType=JdbcType.TIMESTAMP),
|
||||
@Arg(column="active", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
|
||||
@Arg(column="locale", javaType=String.class, jdbcType=JdbcType.VARCHAR),
|
||||
@Arg(column="timezone", javaType=String.class, jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<UserRecord> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01: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="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default DeleteDSL<MyBatis3DeleteModelAdapter<Integer>> deleteByExample() {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, userRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return DeleteDSL.deleteFromWithMapper(this::delete, userRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default int insert(UserRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(userRecord)
|
||||
.map(institutionId).toProperty("institutionId")
|
||||
.map(uuid).toProperty("uuid")
|
||||
.map(name).toProperty("name")
|
||||
.map(userName).toProperty("userName")
|
||||
.map(password).toProperty("password")
|
||||
.map(email).toProperty("email")
|
||||
.map(creationDate).toProperty("creationDate")
|
||||
.map(active).toProperty("active")
|
||||
.map(locale).toProperty("locale")
|
||||
.map(timezone).toProperty("timezone")
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default int insertSelective(UserRecord record) {
|
||||
return insert(SqlBuilder.insert(record)
|
||||
.into(userRecord)
|
||||
.map(institutionId).toPropertyWhenPresent("institutionId", record::getInstitutionId)
|
||||
.map(uuid).toPropertyWhenPresent("uuid", record::getUuid)
|
||||
.map(name).toPropertyWhenPresent("name", record::getName)
|
||||
.map(userName).toPropertyWhenPresent("userName", record::getUserName)
|
||||
.map(password).toPropertyWhenPresent("password", record::getPassword)
|
||||
.map(email).toPropertyWhenPresent("email", record::getEmail)
|
||||
.map(creationDate).toPropertyWhenPresent("creationDate", record::getCreationDate)
|
||||
.map(active).toPropertyWhenPresent("active", record::getActive)
|
||||
.map(locale).toPropertyWhenPresent("locale", record::getLocale)
|
||||
.map(timezone).toPropertyWhenPresent("timezone", record::getTimezone)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<UserRecord>>> selectByExample() {
|
||||
return SelectDSL.selectWithMapper(this::selectMany, id, institutionId, uuid, name, userName, password, email, creationDate, active, locale, timezone)
|
||||
.from(userRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default QueryExpressionDSL<MyBatis3SelectModelAdapter<List<UserRecord>>> selectDistinctByExample() {
|
||||
return SelectDSL.selectDistinctWithMapper(this::selectMany, id, institutionId, uuid, name, userName, password, email, creationDate, active, locale, timezone)
|
||||
.from(userRecord);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default UserRecord selectByPrimaryKey(Long id_) {
|
||||
return SelectDSL.selectWithMapper(this::selectOne, id, institutionId, uuid, name, userName, password, email, creationDate, active, locale, timezone)
|
||||
.from(userRecord)
|
||||
.where(id, isEqualTo(id_))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExample(UserRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, userRecord)
|
||||
.set(institutionId).equalTo(record::getInstitutionId)
|
||||
.set(uuid).equalTo(record::getUuid)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(userName).equalTo(record::getUserName)
|
||||
.set(password).equalTo(record::getPassword)
|
||||
.set(email).equalTo(record::getEmail)
|
||||
.set(creationDate).equalTo(record::getCreationDate)
|
||||
.set(active).equalTo(record::getActive)
|
||||
.set(locale).equalTo(record::getLocale)
|
||||
.set(timezone).equalTo(record::getTimezone);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default UpdateDSL<MyBatis3UpdateModelAdapter<Integer>> updateByExampleSelective(UserRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, userRecord)
|
||||
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
|
||||
.set(uuid).equalToWhenPresent(record::getUuid)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(userName).equalToWhenPresent(record::getUserName)
|
||||
.set(password).equalToWhenPresent(record::getPassword)
|
||||
.set(email).equalToWhenPresent(record::getEmail)
|
||||
.set(creationDate).equalToWhenPresent(record::getCreationDate)
|
||||
.set(active).equalToWhenPresent(record::getActive)
|
||||
.set(locale).equalToWhenPresent(record::getLocale)
|
||||
.set(timezone).equalToWhenPresent(record::getTimezone);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default int updateByPrimaryKey(UserRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, userRecord)
|
||||
.set(institutionId).equalTo(record::getInstitutionId)
|
||||
.set(uuid).equalTo(record::getUuid)
|
||||
.set(name).equalTo(record::getName)
|
||||
.set(userName).equalTo(record::getUserName)
|
||||
.set(password).equalTo(record::getPassword)
|
||||
.set(email).equalTo(record::getEmail)
|
||||
.set(creationDate).equalTo(record::getCreationDate)
|
||||
.set(active).equalTo(record::getActive)
|
||||
.set(locale).equalTo(record::getLocale)
|
||||
.set(timezone).equalTo(record::getTimezone)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
.build()
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.553+01:00", comments="Source Table: user")
|
||||
default int updateByPrimaryKeySelective(UserRecord record) {
|
||||
return UpdateDSL.updateWithMapper(this::update, userRecord)
|
||||
.set(institutionId).equalToWhenPresent(record::getInstitutionId)
|
||||
.set(uuid).equalToWhenPresent(record::getUuid)
|
||||
.set(name).equalToWhenPresent(record::getName)
|
||||
.set(userName).equalToWhenPresent(record::getUserName)
|
||||
.set(password).equalToWhenPresent(record::getPassword)
|
||||
.set(email).equalToWhenPresent(record::getEmail)
|
||||
.set(creationDate).equalToWhenPresent(record::getCreationDate)
|
||||
.set(active).equalToWhenPresent(record::getActive)
|
||||
.set(locale).equalToWhenPresent(record::getLocale)
|
||||
.set(timezone).equalToWhenPresent(record::getTimezone)
|
||||
.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(userRecord);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class ClientConnectionRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.533+01:00", comments="Source field: client_connection.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.533+01:00", comments="Source field: client_connection.exam_id")
|
||||
private Long examId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.status")
|
||||
private String status;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.connection_token")
|
||||
private String connectionToken;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.user_name")
|
||||
private String userName;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.vdi")
|
||||
private Boolean vdi;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.client_address")
|
||||
private String clientAddress;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.virtual_client_address")
|
||||
private String virtualClientAddress;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.533+01:00", comments="Source Table: client_connection")
|
||||
public ClientConnectionRecord(Long id, Long examId, String status, String connectionToken, String userName, Boolean vdi, String clientAddress, String virtualClientAddress) {
|
||||
this.id = id;
|
||||
this.examId = examId;
|
||||
this.status = status;
|
||||
this.connectionToken = connectionToken;
|
||||
this.userName = userName;
|
||||
this.vdi = vdi;
|
||||
this.clientAddress = clientAddress;
|
||||
this.virtualClientAddress = virtualClientAddress;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.533+01:00", comments="Source field: client_connection.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.exam_id")
|
||||
public Long getExamId() {
|
||||
return examId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.status")
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.connection_token")
|
||||
public String getConnectionToken() {
|
||||
return connectionToken;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.user_name")
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.vdi")
|
||||
public Boolean getVdi() {
|
||||
return vdi;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.client_address")
|
||||
public String getClientAddress() {
|
||||
return clientAddress;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.534+01:00", comments="Source field: client_connection.virtual_client_address")
|
||||
public String getVirtualClientAddress() {
|
||||
return virtualClientAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table client_connection
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", examId=").append(examId);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", connectionToken=").append(connectionToken);
|
||||
sb.append(", userName=").append(userName);
|
||||
sb.append(", vdi=").append(vdi);
|
||||
sb.append(", clientAddress=").append(clientAddress);
|
||||
sb.append(", virtualClientAddress=").append(virtualClientAddress);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table client_connection
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ClientConnectionRecord other = (ClientConnectionRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getExamId() == null ? other.getExamId() == null : this.getExamId().equals(other.getExamId()))
|
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
||||
&& (this.getConnectionToken() == null ? other.getConnectionToken() == null : this.getConnectionToken().equals(other.getConnectionToken()))
|
||||
&& (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
|
||||
&& (this.getVdi() == null ? other.getVdi() == null : this.getVdi().equals(other.getVdi()))
|
||||
&& (this.getClientAddress() == null ? other.getClientAddress() == null : this.getClientAddress().equals(other.getClientAddress()))
|
||||
&& (this.getVirtualClientAddress() == null ? other.getVirtualClientAddress() == null : this.getVirtualClientAddress().equals(other.getVirtualClientAddress()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table client_connection
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getExamId() == null) ? 0 : getExamId().hashCode());
|
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
result = prime * result + ((getConnectionToken() == null) ? 0 : getConnectionToken().hashCode());
|
||||
result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
|
||||
result = prime * result + ((getVdi() == null) ? 0 : getVdi().hashCode());
|
||||
result = prime * result + ((getClientAddress() == null) ? 0 : getClientAddress().hashCode());
|
||||
result = prime * result + ((getVirtualClientAddress() == null) ? 0 : getVirtualClientAddress().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class ClientEventRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.538+01:00", comments="Source field: client_event.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.538+01:00", comments="Source field: client_event.connection_id")
|
||||
private Long connectionId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.538+01:00", comments="Source field: client_event.user_identifier")
|
||||
private String userIdentifier;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.538+01:00", comments="Source field: client_event.type")
|
||||
private Integer type;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.timestamp")
|
||||
private Long timestamp;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.numeric_value")
|
||||
private BigDecimal numericValue;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.text")
|
||||
private String text;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.538+01:00", comments="Source Table: client_event")
|
||||
public ClientEventRecord(Long id, Long connectionId, String userIdentifier, Integer type, Long timestamp, BigDecimal numericValue, String text) {
|
||||
this.id = id;
|
||||
this.connectionId = connectionId;
|
||||
this.userIdentifier = userIdentifier;
|
||||
this.type = type;
|
||||
this.timestamp = timestamp;
|
||||
this.numericValue = numericValue;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.538+01:00", comments="Source field: client_event.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.538+01:00", comments="Source field: client_event.connection_id")
|
||||
public Long getConnectionId() {
|
||||
return connectionId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.538+01:00", comments="Source field: client_event.user_identifier")
|
||||
public String getUserIdentifier() {
|
||||
return userIdentifier;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.538+01:00", comments="Source field: client_event.type")
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.timestamp")
|
||||
public Long getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.numeric_value")
|
||||
public BigDecimal getNumericValue() {
|
||||
return numericValue;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.539+01:00", comments="Source field: client_event.text")
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table client_event
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", connectionId=").append(connectionId);
|
||||
sb.append(", userIdentifier=").append(userIdentifier);
|
||||
sb.append(", type=").append(type);
|
||||
sb.append(", timestamp=").append(timestamp);
|
||||
sb.append(", numericValue=").append(numericValue);
|
||||
sb.append(", text=").append(text);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table client_event
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ClientEventRecord other = (ClientEventRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getConnectionId() == null ? other.getConnectionId() == null : this.getConnectionId().equals(other.getConnectionId()))
|
||||
&& (this.getUserIdentifier() == null ? other.getUserIdentifier() == null : this.getUserIdentifier().equals(other.getUserIdentifier()))
|
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
|
||||
&& (this.getTimestamp() == null ? other.getTimestamp() == null : this.getTimestamp().equals(other.getTimestamp()))
|
||||
&& (this.getNumericValue() == null ? other.getNumericValue() == null : this.getNumericValue().equals(other.getNumericValue()))
|
||||
&& (this.getText() == null ? other.getText() == null : this.getText().equals(other.getText()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table client_event
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getConnectionId() == null) ? 0 : getConnectionId().hashCode());
|
||||
result = prime * result + ((getUserIdentifier() == null) ? 0 : getUserIdentifier().hashCode());
|
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
|
||||
result = prime * result + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode());
|
||||
result = prime * result + ((getNumericValue() == null) ? 0 : getNumericValue().hashCode());
|
||||
result = prime * result + ((getText() == null) ? 0 : getText().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class ConfigurationAttributeRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.376+01:00", comments="Source field: configuration_attribute.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.377+01:00", comments="Source field: configuration_attribute.name")
|
||||
private String name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.377+01:00", comments="Source field: configuration_attribute.type")
|
||||
private String type;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.377+01:00", comments="Source field: configuration_attribute.parent_id")
|
||||
private Long parentId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.378+01:00", comments="Source field: configuration_attribute.resources")
|
||||
private String resources;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.378+01:00", comments="Source field: configuration_attribute.validator")
|
||||
private String validator;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.379+01:00", comments="Source field: configuration_attribute.dependencies")
|
||||
private String dependencies;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.379+01:00", comments="Source field: configuration_attribute.default_value")
|
||||
private String defaultValue;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.372+01:00", comments="Source Table: configuration_attribute")
|
||||
public ConfigurationAttributeRecord(Long id, String name, String type, Long parentId, String resources, String validator, String dependencies, String defaultValue) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.parentId = parentId;
|
||||
this.resources = resources;
|
||||
this.validator = validator;
|
||||
this.dependencies = dependencies;
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.377+01:00", comments="Source field: configuration_attribute.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.377+01:00", comments="Source field: configuration_attribute.name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.377+01:00", comments="Source field: configuration_attribute.type")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.378+01:00", comments="Source field: configuration_attribute.parent_id")
|
||||
public Long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.378+01:00", comments="Source field: configuration_attribute.resources")
|
||||
public String getResources() {
|
||||
return resources;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.379+01:00", comments="Source field: configuration_attribute.validator")
|
||||
public String getValidator() {
|
||||
return validator;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.379+01:00", comments="Source field: configuration_attribute.dependencies")
|
||||
public String getDependencies() {
|
||||
return dependencies;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.379+01:00", comments="Source field: configuration_attribute.default_value")
|
||||
public String getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration_attribute
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", type=").append(type);
|
||||
sb.append(", parentId=").append(parentId);
|
||||
sb.append(", resources=").append(resources);
|
||||
sb.append(", validator=").append(validator);
|
||||
sb.append(", dependencies=").append(dependencies);
|
||||
sb.append(", defaultValue=").append(defaultValue);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration_attribute
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ConfigurationAttributeRecord other = (ConfigurationAttributeRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
|
||||
&& (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
|
||||
&& (this.getResources() == null ? other.getResources() == null : this.getResources().equals(other.getResources()))
|
||||
&& (this.getValidator() == null ? other.getValidator() == null : this.getValidator().equals(other.getValidator()))
|
||||
&& (this.getDependencies() == null ? other.getDependencies() == null : this.getDependencies().equals(other.getDependencies()))
|
||||
&& (this.getDefaultValue() == null ? other.getDefaultValue() == null : this.getDefaultValue().equals(other.getDefaultValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration_attribute
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
|
||||
result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
|
||||
result = prime * result + ((getResources() == null) ? 0 : getResources().hashCode());
|
||||
result = prime * result + ((getValidator() == null) ? 0 : getValidator().hashCode());
|
||||
result = prime * result + ((getDependencies() == null) ? 0 : getDependencies().hashCode());
|
||||
result = prime * result + ((getDefaultValue() == null) ? 0 : getDefaultValue().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,142 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class ConfigurationNodeRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.522+01:00", comments="Source field: configuration_node.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.522+01:00", comments="Source field: configuration_node.institution_id")
|
||||
private Long institutionId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.522+01:00", comments="Source field: configuration_node.owner")
|
||||
private String owner;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source field: configuration_node.name")
|
||||
private String name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source field: configuration_node.description")
|
||||
private String description;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source field: configuration_node.type")
|
||||
private String type;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source field: configuration_node.template")
|
||||
private String template;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.522+01:00", comments="Source Table: configuration_node")
|
||||
public ConfigurationNodeRecord(Long id, Long institutionId, String owner, String name, String description, String type, String template) {
|
||||
this.id = id;
|
||||
this.institutionId = institutionId;
|
||||
this.owner = owner;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.type = type;
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.522+01:00", comments="Source field: configuration_node.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.522+01:00", comments="Source field: configuration_node.institution_id")
|
||||
public Long getInstitutionId() {
|
||||
return institutionId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.522+01:00", comments="Source field: configuration_node.owner")
|
||||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source field: configuration_node.name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source field: configuration_node.description")
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source field: configuration_node.type")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.523+01:00", comments="Source field: configuration_node.template")
|
||||
public String getTemplate() {
|
||||
return template;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration_node
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", institutionId=").append(institutionId);
|
||||
sb.append(", owner=").append(owner);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", description=").append(description);
|
||||
sb.append(", type=").append(type);
|
||||
sb.append(", template=").append(template);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration_node
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ConfigurationNodeRecord other = (ConfigurationNodeRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getInstitutionId() == null ? other.getInstitutionId() == null : this.getInstitutionId().equals(other.getInstitutionId()))
|
||||
&& (this.getOwner() == null ? other.getOwner() == null : this.getOwner().equals(other.getOwner()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
|
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
|
||||
&& (this.getTemplate() == null ? other.getTemplate() == null : this.getTemplate().equals(other.getTemplate()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration_node
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getInstitutionId() == null) ? 0 : getInstitutionId().hashCode());
|
||||
result = prime * result + ((getOwner() == null) ? 0 : getOwner().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
|
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
|
||||
result = prime * result + ((getTemplate() == null) ? 0 : getTemplate().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
public class ConfigurationRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.513+01:00", comments="Source field: configuration.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.513+01:00", comments="Source field: configuration.configuration_node_id")
|
||||
private Long configurationNodeId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.515+01:00", comments="Source field: configuration.version")
|
||||
private String version;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.515+01:00", comments="Source field: configuration.version_date")
|
||||
private DateTime versionDate;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.515+01:00", comments="Source field: configuration.followup")
|
||||
private Integer followup;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.512+01:00", comments="Source Table: configuration")
|
||||
public ConfigurationRecord(Long id, Long configurationNodeId, String version, DateTime versionDate, Integer followup) {
|
||||
this.id = id;
|
||||
this.configurationNodeId = configurationNodeId;
|
||||
this.version = version;
|
||||
this.versionDate = versionDate;
|
||||
this.followup = followup;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.513+01:00", comments="Source field: configuration.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.513+01:00", comments="Source field: configuration.configuration_node_id")
|
||||
public Long getConfigurationNodeId() {
|
||||
return configurationNodeId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.515+01:00", comments="Source field: configuration.version")
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.515+01:00", comments="Source field: configuration.version_date")
|
||||
public DateTime getVersionDate() {
|
||||
return versionDate;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.515+01:00", comments="Source field: configuration.followup")
|
||||
public Integer getFollowup() {
|
||||
return followup;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", configurationNodeId=").append(configurationNodeId);
|
||||
sb.append(", version=").append(version);
|
||||
sb.append(", versionDate=").append(versionDate);
|
||||
sb.append(", followup=").append(followup);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ConfigurationRecord other = (ConfigurationRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getConfigurationNodeId() == null ? other.getConfigurationNodeId() == null : this.getConfigurationNodeId().equals(other.getConfigurationNodeId()))
|
||||
&& (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion()))
|
||||
&& (this.getVersionDate() == null ? other.getVersionDate() == null : this.getVersionDate().equals(other.getVersionDate()))
|
||||
&& (this.getFollowup() == null ? other.getFollowup() == null : this.getFollowup().equals(other.getFollowup()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getConfigurationNodeId() == null) ? 0 : getConfigurationNodeId().hashCode());
|
||||
result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
|
||||
result = prime * result + ((getVersionDate() == null) ? 0 : getVersionDate().hashCode());
|
||||
result = prime * result + ((getFollowup() == null) ? 0 : getFollowup().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,130 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class ConfigurationValueRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.configuration_id")
|
||||
private Long configurationId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.configuration_attribute_id")
|
||||
private Long configurationAttributeId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.list_index")
|
||||
private Integer listIndex;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.value")
|
||||
private String value;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.text")
|
||||
private String text;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source Table: configuration_value")
|
||||
public ConfigurationValueRecord(Long id, Long configurationId, Long configurationAttributeId, Integer listIndex, String value, String text) {
|
||||
this.id = id;
|
||||
this.configurationId = configurationId;
|
||||
this.configurationAttributeId = configurationAttributeId;
|
||||
this.listIndex = listIndex;
|
||||
this.value = value;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.configuration_id")
|
||||
public Long getConfigurationId() {
|
||||
return configurationId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.configuration_attribute_id")
|
||||
public Long getConfigurationAttributeId() {
|
||||
return configurationAttributeId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.list_index")
|
||||
public Integer getListIndex() {
|
||||
return listIndex;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.value")
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.496+01:00", comments="Source field: configuration_value.text")
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration_value
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", configurationId=").append(configurationId);
|
||||
sb.append(", configurationAttributeId=").append(configurationAttributeId);
|
||||
sb.append(", listIndex=").append(listIndex);
|
||||
sb.append(", value=").append(value);
|
||||
sb.append(", text=").append(text);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration_value
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ConfigurationValueRecord other = (ConfigurationValueRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getConfigurationId() == null ? other.getConfigurationId() == null : this.getConfigurationId().equals(other.getConfigurationId()))
|
||||
&& (this.getConfigurationAttributeId() == null ? other.getConfigurationAttributeId() == null : this.getConfigurationAttributeId().equals(other.getConfigurationAttributeId()))
|
||||
&& (this.getListIndex() == null ? other.getListIndex() == null : this.getListIndex().equals(other.getListIndex()))
|
||||
&& (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue()))
|
||||
&& (this.getText() == null ? other.getText() == null : this.getText().equals(other.getText()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table configuration_value
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getConfigurationId() == null) ? 0 : getConfigurationId().hashCode());
|
||||
result = prime * result + ((getConfigurationAttributeId() == null) ? 0 : getConfigurationAttributeId().hashCode());
|
||||
result = prime * result + ((getListIndex() == null) ? 0 : getListIndex().hashCode());
|
||||
result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode());
|
||||
result = prime * result + ((getText() == null) ? 0 : getText().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class ExamConfigurationMapRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source field: exam_configuration_map.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.526+01:00", comments="Source field: exam_configuration_map.exam_id")
|
||||
private Long examId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.526+01:00", comments="Source field: exam_configuration_map.configuration_node_id")
|
||||
private Long configurationNodeId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.526+01:00", comments="Source field: exam_configuration_map.user_names")
|
||||
private String userNames;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source Table: exam_configuration_map")
|
||||
public ExamConfigurationMapRecord(Long id, Long examId, Long configurationNodeId, String userNames) {
|
||||
this.id = id;
|
||||
this.examId = examId;
|
||||
this.configurationNodeId = configurationNodeId;
|
||||
this.userNames = userNames;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.525+01:00", comments="Source field: exam_configuration_map.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.526+01:00", comments="Source field: exam_configuration_map.exam_id")
|
||||
public Long getExamId() {
|
||||
return examId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.526+01:00", comments="Source field: exam_configuration_map.configuration_node_id")
|
||||
public Long getConfigurationNodeId() {
|
||||
return configurationNodeId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.526+01:00", comments="Source field: exam_configuration_map.user_names")
|
||||
public String getUserNames() {
|
||||
return userNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table exam_configuration_map
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", examId=").append(examId);
|
||||
sb.append(", configurationNodeId=").append(configurationNodeId);
|
||||
sb.append(", userNames=").append(userNames);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table exam_configuration_map
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ExamConfigurationMapRecord other = (ExamConfigurationMapRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getExamId() == null ? other.getExamId() == null : this.getExamId().equals(other.getExamId()))
|
||||
&& (this.getConfigurationNodeId() == null ? other.getConfigurationNodeId() == null : this.getConfigurationNodeId().equals(other.getConfigurationNodeId()))
|
||||
&& (this.getUserNames() == null ? other.getUserNames() == null : this.getUserNames().equals(other.getUserNames()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table exam_configuration_map
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getExamId() == null) ? 0 : getExamId().hashCode());
|
||||
result = prime * result + ((getConfigurationNodeId() == null) ? 0 : getConfigurationNodeId().hashCode());
|
||||
result = prime * result + ((getUserNames() == null) ? 0 : getUserNames().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,130 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class ExamRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source field: exam.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source field: exam.lms_setup_id")
|
||||
private Long lmsSetupId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source field: exam.external_uuid")
|
||||
private String externalUuid;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source field: exam.owner")
|
||||
private String owner;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source field: exam.supporter")
|
||||
private String supporter;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.530+01:00", comments="Source field: exam.type")
|
||||
private String type;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source Table: exam")
|
||||
public ExamRecord(Long id, Long lmsSetupId, String externalUuid, String owner, String supporter, String type) {
|
||||
this.id = id;
|
||||
this.lmsSetupId = lmsSetupId;
|
||||
this.externalUuid = externalUuid;
|
||||
this.owner = owner;
|
||||
this.supporter = supporter;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source field: exam.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source field: exam.lms_setup_id")
|
||||
public Long getLmsSetupId() {
|
||||
return lmsSetupId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source field: exam.external_uuid")
|
||||
public String getExternalUuid() {
|
||||
return externalUuid;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source field: exam.owner")
|
||||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.529+01:00", comments="Source field: exam.supporter")
|
||||
public String getSupporter() {
|
||||
return supporter;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.530+01:00", comments="Source field: exam.type")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table exam
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", lmsSetupId=").append(lmsSetupId);
|
||||
sb.append(", externalUuid=").append(externalUuid);
|
||||
sb.append(", owner=").append(owner);
|
||||
sb.append(", supporter=").append(supporter);
|
||||
sb.append(", type=").append(type);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table exam
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ExamRecord other = (ExamRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getLmsSetupId() == null ? other.getLmsSetupId() == null : this.getLmsSetupId().equals(other.getLmsSetupId()))
|
||||
&& (this.getExternalUuid() == null ? other.getExternalUuid() == null : this.getExternalUuid().equals(other.getExternalUuid()))
|
||||
&& (this.getOwner() == null ? other.getOwner() == null : this.getOwner().equals(other.getOwner()))
|
||||
&& (this.getSupporter() == null ? other.getSupporter() == null : this.getSupporter().equals(other.getSupporter()))
|
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table exam
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getLmsSetupId() == null) ? 0 : getLmsSetupId().hashCode());
|
||||
result = prime * result + ((getExternalUuid() == null) ? 0 : getExternalUuid().hashCode());
|
||||
result = prime * result + ((getOwner() == null) ? 0 : getOwner().hashCode());
|
||||
result = prime * result + ((getSupporter() == null) ? 0 : getSupporter().hashCode());
|
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class IndicatorRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.exam_id")
|
||||
private Long examId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.type")
|
||||
private String type;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.name")
|
||||
private String name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.color")
|
||||
private String color;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.541+01:00", comments="Source Table: indicator")
|
||||
public IndicatorRecord(Long id, Long examId, String type, String name, String color) {
|
||||
this.id = id;
|
||||
this.examId = examId;
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.exam_id")
|
||||
public Long getExamId() {
|
||||
return examId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.type")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.542+01:00", comments="Source field: indicator.color")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table indicator
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", examId=").append(examId);
|
||||
sb.append(", type=").append(type);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", color=").append(color);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table indicator
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
IndicatorRecord other = (IndicatorRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getExamId() == null ? other.getExamId() == null : this.getExamId().equals(other.getExamId()))
|
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getColor() == null ? other.getColor() == null : this.getColor().equals(other.getColor()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table indicator
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getExamId() == null) ? 0 : getExamId().hashCode());
|
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getColor() == null) ? 0 : getColor().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class InstitutionRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.545+01:00", comments="Source field: institution.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.545+01:00", comments="Source field: institution.name")
|
||||
private String name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.545+01:00", comments="Source field: institution.authtype")
|
||||
private String authtype;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.545+01:00", comments="Source Table: institution")
|
||||
public InstitutionRecord(Long id, String name, String authtype) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.authtype = authtype;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.545+01:00", comments="Source field: institution.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.545+01:00", comments="Source field: institution.name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.545+01:00", comments="Source field: institution.authtype")
|
||||
public String getAuthtype() {
|
||||
return authtype;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table institution
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", authtype=").append(authtype);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table institution
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
InstitutionRecord other = (InstitutionRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getAuthtype() == null ? other.getAuthtype() == null : this.getAuthtype().equals(other.getAuthtype()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table institution
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getAuthtype() == null) ? 0 : getAuthtype().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class OrientationRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.config_attribute_id")
|
||||
private Long configAttributeId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.template")
|
||||
private String template;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.view")
|
||||
private String view;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.group")
|
||||
private String group;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.x_position")
|
||||
private Integer xPosition;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.y_position")
|
||||
private Integer yPosition;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.width")
|
||||
private Integer width;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.504+01:00", comments="Source field: orientation.height")
|
||||
private Integer height;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source Table: orientation")
|
||||
public OrientationRecord(Long id, Long configAttributeId, String template, String view, String group, Integer xPosition, Integer yPosition, Integer width, Integer height) {
|
||||
this.id = id;
|
||||
this.configAttributeId = configAttributeId;
|
||||
this.template = template;
|
||||
this.view = view;
|
||||
this.group = group;
|
||||
this.xPosition = xPosition;
|
||||
this.yPosition = yPosition;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.config_attribute_id")
|
||||
public Long getConfigAttributeId() {
|
||||
return configAttributeId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.template")
|
||||
public String getTemplate() {
|
||||
return template;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.view")
|
||||
public String getView() {
|
||||
return view;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.group")
|
||||
public String getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.x_position")
|
||||
public Integer getxPosition() {
|
||||
return xPosition;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.y_position")
|
||||
public Integer getyPosition() {
|
||||
return yPosition;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.503+01:00", comments="Source field: orientation.width")
|
||||
public Integer getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.504+01:00", comments="Source field: orientation.height")
|
||||
public Integer getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table orientation
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", configAttributeId=").append(configAttributeId);
|
||||
sb.append(", template=").append(template);
|
||||
sb.append(", view=").append(view);
|
||||
sb.append(", group=").append(group);
|
||||
sb.append(", xPosition=").append(xPosition);
|
||||
sb.append(", yPosition=").append(yPosition);
|
||||
sb.append(", width=").append(width);
|
||||
sb.append(", height=").append(height);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table orientation
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
OrientationRecord other = (OrientationRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getConfigAttributeId() == null ? other.getConfigAttributeId() == null : this.getConfigAttributeId().equals(other.getConfigAttributeId()))
|
||||
&& (this.getTemplate() == null ? other.getTemplate() == null : this.getTemplate().equals(other.getTemplate()))
|
||||
&& (this.getView() == null ? other.getView() == null : this.getView().equals(other.getView()))
|
||||
&& (this.getGroup() == null ? other.getGroup() == null : this.getGroup().equals(other.getGroup()))
|
||||
&& (this.getxPosition() == null ? other.getxPosition() == null : this.getxPosition().equals(other.getxPosition()))
|
||||
&& (this.getyPosition() == null ? other.getyPosition() == null : this.getyPosition().equals(other.getyPosition()))
|
||||
&& (this.getWidth() == null ? other.getWidth() == null : this.getWidth().equals(other.getWidth()))
|
||||
&& (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table orientation
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getConfigAttributeId() == null) ? 0 : getConfigAttributeId().hashCode());
|
||||
result = prime * result + ((getTemplate() == null) ? 0 : getTemplate().hashCode());
|
||||
result = prime * result + ((getView() == null) ? 0 : getView().hashCode());
|
||||
result = prime * result + ((getGroup() == null) ? 0 : getGroup().hashCode());
|
||||
result = prime * result + ((getxPosition() == null) ? 0 : getxPosition().hashCode());
|
||||
result = prime * result + ((getyPosition() == null) ? 0 : getyPosition().hashCode());
|
||||
result = prime * result + ((getWidth() == null) ? 0 : getWidth().hashCode());
|
||||
result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class RoleRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source field: user_role.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source field: user_role.user_id")
|
||||
private Long userId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source field: user_role.role_name")
|
||||
private String roleName;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source Table: user_role")
|
||||
public RoleRecord(Long id, Long userId, String roleName) {
|
||||
this.id = id;
|
||||
this.userId = userId;
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source field: user_role.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source field: user_role.user_id")
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.554+01:00", comments="Source field: user_role.role_name")
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user_role
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", userId=").append(userId);
|
||||
sb.append(", roleName=").append(roleName);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user_role
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
RoleRecord other = (RoleRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
|
||||
&& (this.getRoleName() == null ? other.getRoleName() == null : this.getRoleName().equals(other.getRoleName()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user_role
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
|
||||
result = prime * result + ((getRoleName() == null) ? 0 : getRoleName().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class SebLmsSetupRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source field: seb_lms_setup.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source field: seb_lms_setup.institution_id")
|
||||
private Long institutionId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source field: seb_lms_setup.name")
|
||||
private String name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source field: seb_lms_setup.lms_type")
|
||||
private String lmsType;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.lms_url")
|
||||
private String lmsUrl;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.lms_clientname")
|
||||
private String lmsClientname;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.lms_clientsecret")
|
||||
private String lmsClientsecret;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.lms_rest_api_token")
|
||||
private String lmsRestApiToken;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.seb_clientname")
|
||||
private String sebClientname;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.seb_clientsecret")
|
||||
private String sebClientsecret;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source Table: seb_lms_setup")
|
||||
public SebLmsSetupRecord(Long id, Long institutionId, String name, String lmsType, String lmsUrl, String lmsClientname, String lmsClientsecret, String lmsRestApiToken, String sebClientname, String sebClientsecret) {
|
||||
this.id = id;
|
||||
this.institutionId = institutionId;
|
||||
this.name = name;
|
||||
this.lmsType = lmsType;
|
||||
this.lmsUrl = lmsUrl;
|
||||
this.lmsClientname = lmsClientname;
|
||||
this.lmsClientsecret = lmsClientsecret;
|
||||
this.lmsRestApiToken = lmsRestApiToken;
|
||||
this.sebClientname = sebClientname;
|
||||
this.sebClientsecret = sebClientsecret;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source field: seb_lms_setup.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source field: seb_lms_setup.institution_id")
|
||||
public Long getInstitutionId() {
|
||||
return institutionId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source field: seb_lms_setup.name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.547+01:00", comments="Source field: seb_lms_setup.lms_type")
|
||||
public String getLmsType() {
|
||||
return lmsType;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.lms_url")
|
||||
public String getLmsUrl() {
|
||||
return lmsUrl;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.lms_clientname")
|
||||
public String getLmsClientname() {
|
||||
return lmsClientname;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.lms_clientsecret")
|
||||
public String getLmsClientsecret() {
|
||||
return lmsClientsecret;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.lms_rest_api_token")
|
||||
public String getLmsRestApiToken() {
|
||||
return lmsRestApiToken;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.seb_clientname")
|
||||
public String getSebClientname() {
|
||||
return sebClientname;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.548+01:00", comments="Source field: seb_lms_setup.seb_clientsecret")
|
||||
public String getSebClientsecret() {
|
||||
return sebClientsecret;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table seb_lms_setup
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", institutionId=").append(institutionId);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", lmsType=").append(lmsType);
|
||||
sb.append(", lmsUrl=").append(lmsUrl);
|
||||
sb.append(", lmsClientname=").append(lmsClientname);
|
||||
sb.append(", lmsClientsecret=").append(lmsClientsecret);
|
||||
sb.append(", lmsRestApiToken=").append(lmsRestApiToken);
|
||||
sb.append(", sebClientname=").append(sebClientname);
|
||||
sb.append(", sebClientsecret=").append(sebClientsecret);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table seb_lms_setup
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SebLmsSetupRecord other = (SebLmsSetupRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getInstitutionId() == null ? other.getInstitutionId() == null : this.getInstitutionId().equals(other.getInstitutionId()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getLmsType() == null ? other.getLmsType() == null : this.getLmsType().equals(other.getLmsType()))
|
||||
&& (this.getLmsUrl() == null ? other.getLmsUrl() == null : this.getLmsUrl().equals(other.getLmsUrl()))
|
||||
&& (this.getLmsClientname() == null ? other.getLmsClientname() == null : this.getLmsClientname().equals(other.getLmsClientname()))
|
||||
&& (this.getLmsClientsecret() == null ? other.getLmsClientsecret() == null : this.getLmsClientsecret().equals(other.getLmsClientsecret()))
|
||||
&& (this.getLmsRestApiToken() == null ? other.getLmsRestApiToken() == null : this.getLmsRestApiToken().equals(other.getLmsRestApiToken()))
|
||||
&& (this.getSebClientname() == null ? other.getSebClientname() == null : this.getSebClientname().equals(other.getSebClientname()))
|
||||
&& (this.getSebClientsecret() == null ? other.getSebClientsecret() == null : this.getSebClientsecret().equals(other.getSebClientsecret()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table seb_lms_setup
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getInstitutionId() == null) ? 0 : getInstitutionId().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getLmsType() == null) ? 0 : getLmsType().hashCode());
|
||||
result = prime * result + ((getLmsUrl() == null) ? 0 : getLmsUrl().hashCode());
|
||||
result = prime * result + ((getLmsClientname() == null) ? 0 : getLmsClientname().hashCode());
|
||||
result = prime * result + ((getLmsClientsecret() == null) ? 0 : getLmsClientsecret().hashCode());
|
||||
result = prime * result + ((getLmsRestApiToken() == null) ? 0 : getLmsRestApiToken().hashCode());
|
||||
result = prime * result + ((getSebClientname() == null) ? 0 : getSebClientname().hashCode());
|
||||
result = prime * result + ((getSebClientsecret() == null) ? 0 : getSebClientsecret().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,191 @@
|
|||
package ch.ethz.seb.sebserver.ws.batis.model;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
public class UserRecord {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source field: user.id")
|
||||
private Long id;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source field: user.institution_id")
|
||||
private Long institutionId;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source field: user.uuid")
|
||||
private String uuid;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source field: user.name")
|
||||
private String name;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.user_name")
|
||||
private String userName;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.password")
|
||||
private String password;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.email")
|
||||
private String email;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.creation_date")
|
||||
private DateTime creationDate;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.active")
|
||||
private Integer active;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.locale")
|
||||
private String locale;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.timezone")
|
||||
private String timezone;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source Table: user")
|
||||
public UserRecord(Long id, Long institutionId, String uuid, String name, String userName, String password, String email, DateTime creationDate, Integer active, String locale, String timezone) {
|
||||
this.id = id;
|
||||
this.institutionId = institutionId;
|
||||
this.uuid = uuid;
|
||||
this.name = name;
|
||||
this.userName = userName;
|
||||
this.password = password;
|
||||
this.email = email;
|
||||
this.creationDate = creationDate;
|
||||
this.active = active;
|
||||
this.locale = locale;
|
||||
this.timezone = timezone;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source field: user.id")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source field: user.institution_id")
|
||||
public Long getInstitutionId() {
|
||||
return institutionId;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source field: user.uuid")
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.550+01:00", comments="Source field: user.name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.user_name")
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.password")
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.email")
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.creation_date")
|
||||
public DateTime getCreationDate() {
|
||||
return creationDate;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.active")
|
||||
public Integer getActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.locale")
|
||||
public String getLocale() {
|
||||
return locale;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2018-11-12T16:16:23.551+01:00", comments="Source field: user.timezone")
|
||||
public String getTimezone() {
|
||||
return timezone;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", institutionId=").append(institutionId);
|
||||
sb.append(", uuid=").append(uuid);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", userName=").append(userName);
|
||||
sb.append(", password=").append(password);
|
||||
sb.append(", email=").append(email);
|
||||
sb.append(", creationDate=").append(creationDate);
|
||||
sb.append(", active=").append(active);
|
||||
sb.append(", locale=").append(locale);
|
||||
sb.append(", timezone=").append(timezone);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
UserRecord other = (UserRecord) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getInstitutionId() == null ? other.getInstitutionId() == null : this.getInstitutionId().equals(other.getInstitutionId()))
|
||||
&& (this.getUuid() == null ? other.getUuid() == null : this.getUuid().equals(other.getUuid()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
|
||||
&& (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
|
||||
&& (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
|
||||
&& (this.getCreationDate() == null ? other.getCreationDate() == null : this.getCreationDate().equals(other.getCreationDate()))
|
||||
&& (this.getActive() == null ? other.getActive() == null : this.getActive().equals(other.getActive()))
|
||||
&& (this.getLocale() == null ? other.getLocale() == null : this.getLocale().equals(other.getLocale()))
|
||||
&& (this.getTimezone() == null ? other.getTimezone() == null : this.getTimezone().equals(other.getTimezone()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user
|
||||
*
|
||||
* @mbg.generated Mon Nov 12 16:16:23 CET 2018
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getInstitutionId() == null) ? 0 : getInstitutionId().hashCode());
|
||||
result = prime * result + ((getUuid() == null) ? 0 : getUuid().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
|
||||
result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
|
||||
result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
|
||||
result = prime * result + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode());
|
||||
result = prime * result + ((getActive() == null) ? 0 : getActive().hashCode());
|
||||
result = prime * result + ((getLocale() == null) ? 0 : getLocale().hashCode());
|
||||
result = prime * result + ((getTimezone() == null) ? 0 : getTimezone().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue