/** * This method was generated by MyBatis Generator. * This method corresponds to the database table SQLTOOL_METADATA * * @mbggenerated */ @SelectProvider(type=SqltoolMetadataSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="SQL_TYPE", property="sqlType", jdbcType=JdbcType.VARCHAR), @Result(column="NAME", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="DESCRIPTION", property="description", jdbcType=JdbcType.VARCHAR), @Result(column="OWNED_BY", property="ownedBy", jdbcType=JdbcType.VARCHAR), @Result(column="PUBLISHED_FLG", property="publishedFlg", jdbcType=JdbcType.INTEGER), @Result(column="REGISTERED_AT", property="registeredAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<SqltoolMetadata> selectByExampleWithRowbounds(SqltoolMetadataCriteria example, RowBounds rowBounds);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ZIPCD_MASTER * * @mbggenerated */ @SelectProvider(type=ZipcdMasterSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="CITY_CD", property="cityCd", jdbcType=JdbcType.INTEGER), @Result(column="ZIPCD", property="zipcd", jdbcType=JdbcType.VARCHAR), @Result(column="PREF", property="pref", jdbcType=JdbcType.VARCHAR), @Result(column="CITY", property="city", jdbcType=JdbcType.VARCHAR), @Result(column="ADDR", property="addr", jdbcType=JdbcType.VARCHAR), @Result(column="PREF_KANA", property="prefKana", jdbcType=JdbcType.VARCHAR), @Result(column="CITY_KANA", property="cityKana", jdbcType=JdbcType.VARCHAR), @Result(column="ADDR_KANA", property="addrKana", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<ZipcdMaster> selectByExample(ZipcdMasterCriteria example);
@Select("<script>SELECT ID, COMPANY, SYSTEM, SYSTEM_INSTANCE, TYPE, VALUE " + "FROM OBJECT_REFERENCE " + "<where>" + "<if test='company != null'>AND COMPANY IN(<foreach item='item' collection='company' separator=',' >#{item}</foreach>)</if> " + "<if test='system != null'>AND SYSTEM IN(<foreach item='item' collection='system' separator=',' >#{item}</foreach>)</if> " + "<if test='systemInstance != null'>AND SYSTEM_INSTANCE IN(<foreach item='item' collection='systemInstance' separator=',' >#{item}</foreach>)</if> " + "<if test='type != null'>AND TYPE IN(<foreach item='item' collection='type' separator=',' >#{item}</foreach>)</if> " + "<if test='value != null'>AND VALUE IN(<foreach item='item' collection='value' separator=',' >#{item}</foreach>)</if> " + "</where>" + "</script>") @Results({ @Result(property = "id", column = "ID"), @Result(property = "company", column = "COMPANY"), @Result(property = "system", column = "SYSTEM"), @Result(property = "systemInstance", column = "SYSTEM_INSTANCE"), @Result(property = "type", column = "TYPE"), @Result(property = "value", column = "VALUE")}) List<ObjectReference> queryObjectReference(ObjectReferenceQueryImpl objectReference);
@Select("SELECT ID, TASK_ID, CREATED, MODIFIED, CLASSIFICATION_KEY, REF_COMPANY, REF_SYSTEM, REF_INSTANCE, REF_TYPE, REF_VALUE, CHANNEL, RECEIVED, CUSTOM_ATTRIBUTES " + "FROM ATTACHMENT " + "WHERE TASK_ID = #{taskId}") @Results(value = { @Result(property = "id", column = "ID"), @Result(property = "taskId", column = "TASK_ID"), @Result(property = "created", column = "CREATED"), @Result(property = "modified", column = "MODIFIED"), @Result(property = "classification", column = "CLASSIFICATION_KEY", javaType = Classification.class, one = @One(select = CLASSIFICATION_FINDBYID)), @Result(property = "objectReference.company", column = "REF_COMPANY"), @Result(property = "objectReference.system", column = "REF_SYSTEM"), @Result(property = "objectReference.systemInstance", column = "REF_INSTANCE"), @Result(property = "objectReference.type", column = "REF_TYPE"), @Result(property = "objectReference.value", column = "REF_VALUE"), @Result(property = "channel", column = "CHANNEL"), @Result(property = "received", column = "RECEIVED"), @Result(property = "customAttributes", column = "CUSTOM_ATTRIBUTES", jdbcType = JdbcType.BLOB, javaType = Map.class, typeHandler = MapTypeHandler.class), }) List<AttachmentImpl> findAttachmentsByTaskId(@Param("taskId") String taskId);
@Select("SELECT ID, WORKBASKET_KEY, ACCESS_ID, PERM_READ, PERM_OPEN, PERM_APPEND, PERM_TRANSFER, PERM_DISTRIBUTE, PERM_CUSTOM_1, PERM_CUSTOM_2, PERM_CUSTOM_3, PERM_CUSTOM_4, PERM_CUSTOM_5, PERM_CUSTOM_6, PERM_CUSTOM_7, PERM_CUSTOM_8 FROM WORKBASKET_ACCESS_LIST WHERE ID = #{id}") @Results(value = { @Result(property = "id", column = "ID"), @Result(property = "workbasketKey", column = "WORKBASKET_KEY"), @Result(property = "accessId", column = "ACCESS_ID"), @Result(property = "permRead", column = "PERM_READ"), @Result(property = "permOpen", column = "PERM_OPEN"), @Result(property = "permAppend", column = "PERM_APPEND"), @Result(property = "permTransfer", column = "PERM_TRANSFER"), @Result(property = "permDistribute", column = "PERM_DISTRIBUTE"), @Result(property = "permCustom1", column = "PERM_CUSTOM_1"), @Result(property = "permCustom2", column = "PERM_CUSTOM_2"), @Result(property = "permCustom3", column = "PERM_CUSTOM_3"), @Result(property = "permCustom4", column = "PERM_CUSTOM_4"), @Result(property = "permCustom5", column = "PERM_CUSTOM_5"), @Result(property = "permCustom6", column = "PERM_CUSTOM_6"), @Result(property = "permCustom7", column = "PERM_CUSTOM_7"), @Result(property = "permCustom8", column = "PERM_CUSTOM_8")}) WorkbasketAccessItem findById(@Param("id") String id);
@Select("SELECT ID, WORKBASKET_KEY, ACCESS_ID, PERM_READ, PERM_OPEN, PERM_APPEND, PERM_TRANSFER, PERM_DISTRIBUTE, PERM_CUSTOM_1, PERM_CUSTOM_2, PERM_CUSTOM_3, PERM_CUSTOM_4, PERM_CUSTOM_5, PERM_CUSTOM_6, PERM_CUSTOM_7, PERM_CUSTOM_8 FROM WORKBASKET_ACCESS_LIST WHERE ACCESS_ID = #{accessId}") @Results(value = { @Result(property = "id", column = "ID"), @Result(property = "workbasketKey", column = "WORKBASKET_KEY"), @Result(property = "accessId", column = "ACCESS_ID"), @Result(property = "permRead", column = "PERM_READ"), @Result(property = "permOpen", column = "PERM_OPEN"), @Result(property = "permAppend", column = "PERM_APPEND"), @Result(property = "permTransfer", column = "PERM_TRANSFER"), @Result(property = "permDistribute", column = "PERM_DISTRIBUTE"), @Result(property = "permCustom1", column = "PERM_CUSTOM_1"), @Result(property = "permCustom2", column = "PERM_CUSTOM_2"), @Result(property = "permCustom3", column = "PERM_CUSTOM_3"), @Result(property = "permCustom4", column = "PERM_CUSTOM_4"), @Result(property = "permCustom5", column = "PERM_CUSTOM_5"), @Result(property = "permCustom6", column = "PERM_CUSTOM_6"), @Result(property = "permCustom7", column = "PERM_CUSTOM_7"), @Result(property = "permCustom8", column = "PERM_CUSTOM_8")}) List<WorkbasketAccessItem> findByAccessId(@Param("accessId") String accessId);
@Select("SELECT ID, WORKBASKET_KEY, ACCESS_ID, PERM_READ, PERM_OPEN, PERM_APPEND, PERM_TRANSFER, PERM_DISTRIBUTE, PERM_CUSTOM_1, PERM_CUSTOM_2, PERM_CUSTOM_3, PERM_CUSTOM_4, PERM_CUSTOM_5, PERM_CUSTOM_6, PERM_CUSTOM_7, PERM_CUSTOM_8 FROM WORKBASKET_ACCESS_LIST WHERE WORKBASKET_KEY = #{key}") @Results(value = { @Result(property = "id", column = "ID"), @Result(property = "workbasketKey", column = "WORKBASKET_KEY"), @Result(property = "accessId", column = "ACCESS_ID"), @Result(property = "permRead", column = "PERM_READ"), @Result(property = "permOpen", column = "PERM_OPEN"), @Result(property = "permAppend", column = "PERM_APPEND"), @Result(property = "permTransfer", column = "PERM_TRANSFER"), @Result(property = "permDistribute", column = "PERM_DISTRIBUTE"), @Result(property = "permCustom1", column = "PERM_CUSTOM_1"), @Result(property = "permCustom2", column = "PERM_CUSTOM_2"), @Result(property = "permCustom3", column = "PERM_CUSTOM_3"), @Result(property = "permCustom4", column = "PERM_CUSTOM_4"), @Result(property = "permCustom5", column = "PERM_CUSTOM_5"), @Result(property = "permCustom6", column = "PERM_CUSTOM_6"), @Result(property = "permCustom7", column = "PERM_CUSTOM_7"), @Result(property = "permCustom8", column = "PERM_CUSTOM_8")}) List<WorkbasketAccessItem> findByWorkbasketKey(@Param("key") String key);
@Select("SELECT ID, WORKBASKET_KEY, ACCESS_ID, PERM_READ, PERM_OPEN, PERM_APPEND, PERM_TRANSFER, PERM_DISTRIBUTE, PERM_CUSTOM_1, PERM_CUSTOM_2, PERM_CUSTOM_3, PERM_CUSTOM_4, PERM_CUSTOM_5, PERM_CUSTOM_6, PERM_CUSTOM_7, PERM_CUSTOM_8 FROM WORKBASKET_ACCESS_LIST ORDER BY ID") @Results(value = { @Result(property = "id", column = "ID"), @Result(property = "workbasketKey", column = "WORKBASKET_KEY"), @Result(property = "accessId", column = "ACCESS_ID"), @Result(property = "permRead", column = "PERM_READ"), @Result(property = "permOpen", column = "PERM_OPEN"), @Result(property = "permAppend", column = "PERM_APPEND"), @Result(property = "permTransfer", column = "PERM_TRANSFER"), @Result(property = "permDistribute", column = "PERM_DISTRIBUTE"), @Result(property = "permCustom1", column = "PERM_CUSTOM_1"), @Result(property = "permCustom2", column = "PERM_CUSTOM_2"), @Result(property = "permCustom3", column = "PERM_CUSTOM_3"), @Result(property = "permCustom4", column = "PERM_CUSTOM_4"), @Result(property = "permCustom5", column = "PERM_CUSTOM_5"), @Result(property = "permCustom6", column = "PERM_CUSTOM_6"), @Result(property = "permCustom7", column = "PERM_CUSTOM_7"), @Result(property = "permCustom8", column = "PERM_CUSTOM_8")}) List<WorkbasketAccessItem> findAll();
@Select("SELECT ID, KEY, CREATED, MODIFIED, NAME, DOMAIN, TYPE, DESCRIPTION, OWNER, CUSTOM_1 ,CUSTOM_2 ,CUSTOM_3 ,CUSTOM_4 ,ORG_LEVEL_1 ,ORG_LEVEL_2 ,ORG_LEVEL_3 ,ORG_LEVEL_4 FROM WORKBASKET WHERE ID = #{id}") @Results(value = { @Result(property = "id", column = "ID"), @Result(property = "key", column = "KEY"), @Result(property = "created", column = "CREATED"), @Result(property = "modified", column = "MODIFIED"), @Result(property = "name", column = "NAME"), @Result(property = "domain", column = "DOMAIN"), @Result(property = "type", column = "TYPE"), @Result(property = "description", column = "DESCRIPTION"), @Result(property = "owner", column = "OWNER"), @Result(property = "distributionTargets", column = "ID", javaType = List.class, many = @Many(fetchType = FetchType.DEFAULT, select = "findByDistributionTargets")), @Result(property = "custom1", column = "CUSTOM_1"), @Result(property = "custom2", column = "CUSTOM_2"), @Result(property = "custom3", column = "CUSTOM_3"), @Result(property = "custom4", column = "CUSTOM_4"), @Result(property = "orgLevel1", column = "ORG_LEVEL_1"), @Result(property = "orgLevel2", column = "ORG_LEVEL_2"), @Result(property = "orgLevel3", column = "ORG_LEVEL_3"), @Result(property = "orgLevel4", column = "ORG_LEVEL_4")}) WorkbasketImpl findById(@Param("id") String id);
@Select("SELECT ID, KEY, CREATED, MODIFIED, NAME, DOMAIN, TYPE, DESCRIPTION, OWNER, CUSTOM_1 ,CUSTOM_2 ,CUSTOM_3 ,CUSTOM_4 ,ORG_LEVEL_1 ,ORG_LEVEL_2 ,ORG_LEVEL_3 ,ORG_LEVEL_4 FROM WORKBASKET WHERE KEY = #{key}") @Results(value = { @Result(property = "id", column = "ID"), @Result(property = "key", column = "KEY"), @Result(property = "created", column = "CREATED"), @Result(property = "modified", column = "MODIFIED"), @Result(property = "name", column = "NAME"), @Result(property = "domain", column = "DOMAIN"), @Result(property = "type", column = "TYPE"), @Result(property = "description", column = "DESCRIPTION"), @Result(property = "owner", column = "OWNER"), @Result(property = "distributionTargets", column = "ID", javaType = List.class, many = @Many(fetchType = FetchType.DEFAULT, select = "findByDistributionTargets")), @Result(property = "custom1", column = "CUSTOM_1"), @Result(property = "custom2", column = "CUSTOM_2"), @Result(property = "custom3", column = "CUSTOM_3"), @Result(property = "custom4", column = "CUSTOM_4"), @Result(property = "orgLevel1", column = "ORG_LEVEL_1"), @Result(property = "orgLevel2", column = "ORG_LEVEL_2"), @Result(property = "orgLevel3", column = "ORG_LEVEL_3"), @Result(property = "orgLevel4", column = "ORG_LEVEL_4")}) WorkbasketImpl findByKey(@Param("key") String key);
@Select("SELECT * FROM WORKBASKET WHERE id IN (SELECT TARGET_ID FROM DISTRIBUTION_TARGETS WHERE SOURCE_ID = #{id})") @Results(value = { @Result(property = "id", column = "ID"), @Result(property = "key", column = "KEY"), @Result(property = "name", column = "NAME"), @Result(property = "description", column = "DESCRIPTION"), @Result(property = "owner", column = "OWNER"), @Result(property = "domain", column = "DOMAIN"), @Result(property = "type", column = "TYPE"), @Result(property = "orgLevel1", column = "ORG_LEVEL_1"), @Result(property = "orgLevel2", column = "ORG_LEVEL_2"), @Result(property = "orgLevel3", column = "ORG_LEVEL_3"), @Result(property = "orgLevel4", column = "ORG_LEVEL_4")}) List<WorkbasketSummary> findByDistributionTargets(@Param("id") String id);
@Select("<script>" + "SELECT ID, KEY, CATEGORY, TYPE, DOMAIN, NAME, VALID_UNTIL " + "FROM CLASSIFICATION " + "WHERE KEY = #{key} " + "AND DOMAIN = #{domain}" + "ORDER BY VALID_FROM DESC" + "</script>") @Results({ @Result(property = "id", column = "ID"), @Result(property = "key", column = "KEY"), @Result(property = "category", column = "CATEGORY"), @Result(property = "type", column = "TYPE"), @Result(property = "domain", column = "DOMAIN"), @Result(property = "name", column = "NAME"), @Result(property = "validUntil", column = "VALID_UNTIL") }) List<ClassificationSummaryImpl> getAllClassificationsWithKey(@Param("key") String key, @Param("domain") String domain);
private void applyResults(Result[] results, Class<?> resultType, List<ResultMapping> resultMappings) { for (Result result : results) { List<ResultFlag> flags = new ArrayList<ResultFlag>(); if (result.id()) { flags.add(ResultFlag.ID); } ResultMapping resultMapping = assistant.buildResultMapping( resultType, nullOrEmpty(result.property()), nullOrEmpty(result.column()), result.javaType() == void.class ? null : result.javaType(), result.jdbcType() == JdbcType.UNDEFINED ? null : result.jdbcType(), hasNestedSelect(result) ? nestedSelectId(result) : null, null, null, null, result.typeHandler() == UnknownTypeHandler.class ? null : result.typeHandler(), flags, null, null, isLazy(result)); resultMappings.add(resultMapping); } }
/** * 查询所有正在运行的任务 * * @return */ @Select("select art.ID_, art.NAME_, art.ASSIGNEE_, art.CREATE_TIME_," + " art.PROC_INST_ID_, art.PROC_DEF_ID_, arp.NAME_ PROCESS_NAME" + " from ACT_RU_TASK art" + " inner join ACT_RE_PROCDEF arp on art.PROC_DEF_ID_ = arp.ID_" + " where arp.SUSPENSION_STATE_ = '1'") @Results(value = { @Result(id = true, property = "id", column = "ID_", javaType = String.class, jdbcType = JdbcType.VARCHAR), @Result(property = "name", column = "NAME_", javaType = String.class, jdbcType = JdbcType.VARCHAR), @Result(property = "assignee", column = "ASSIGNEE_", javaType = String.class, jdbcType = JdbcType.VARCHAR), @Result(property = "createTime", column = "CREATE_TIME_", javaType = Date.class, jdbcType = JdbcType.DATE), @Result(property = "processInstanceId", column = "PROC_INST_ID_", javaType = String.class, jdbcType = JdbcType.VARCHAR), @Result(property = "processDefinitionId", column = "PROC_DEF_ID_", javaType = String.class, jdbcType = JdbcType.VARCHAR), @Result(property = "processName", column = "PROCESS_NAME", javaType = String.class, jdbcType = JdbcType.VARCHAR) }) List<RunningTask> selectRunningTasks();
/** * 查询所有正在运行的任务,根据流程KEY过滤 * * @param processKey * @return */ @Select("select art.ID_, art.NAME_, art.ASSIGNEE_, art.CREATE_TIME_," + " art.PROC_INST_ID_, art.PROC_DEF_ID_, arp.NAME_ PROCESS_NAME" + " from ACT_RU_TASK art" + " inner join ACT_RE_PROCDEF arp on art.PROC_DEF_ID_ = arp.ID_" + " where arp.SUSPENSION_STATE_ = '1' and arp.KEY_ = #{processKey}") @Results(value = { @Result(id = true, property = "id", column = "ID_", javaType = String.class, jdbcType = JdbcType.VARCHAR), @Result(property = "name", column = "NAME_", javaType = String.class, jdbcType = JdbcType.VARCHAR), @Result(property = "assignee", column = "ASSIGNEE_", javaType = String.class, jdbcType = JdbcType.VARCHAR), @Result(property = "createTime", column = "CREATE_TIME_", javaType = Date.class, jdbcType = JdbcType.DATE), @Result(property = "processInstanceId", column = "PROC_INST_ID_", javaType = String.class, jdbcType = JdbcType.VARCHAR), @Result(property = "processDefinitionId", column = "PROC_DEF_ID_", javaType = String.class, jdbcType = JdbcType.VARCHAR), @Result(property = "processName", column = "PROCESS_NAME", javaType = String.class, jdbcType = JdbcType.VARCHAR) }) List<RunningTask> selectRunningTasksByProcessKey(String processKey);
/** * 通过评测记录唯一标识符获取试题对象. * @param submissionId - 评测记录的唯一标识符 * @return 一个评测记录对象 */ @Select("SELECT * FROM voj_submissions WHERE submission_id = #{submissionId}") @Options(useCache = true) @Results({ @Result(property = "submissionId", column = "submission_id"), @Result(property = "problem", column = "problem_id", javaType = Problem.class, one = @One(select="org.verwandlung.voj.judger.mapper.ProblemMapper.getProblem")), @Result(property = "uid", column = "uid"), @Result(property = "language", column = "language_id", javaType=Language.class, one = @One(select="org.verwandlung.voj.judger.mapper.LanguageMapper.getLanguageUsingId")), @Result(property = "submitTime", column = "submission_submit_time"), @Result(property = "executeTime", column = "submission_execute_time"), @Result(property = "usedTime", column = "submission_used_time"), @Result(property = "usedMemory", column = "submission_used_memory"), @Result(property = "judgeResultSlug", column = "submission_judge_result"), @Result(property = "judgeScore", column = "submission_judge_score"), @Result(property = "judgeLog", column = "submission_judge_log"), @Result(property = "code", column = "submission_code"), }) Submission getSubmission(@Param("submissionId") long submissionId);
/** * 通过试题唯一标识符获取试题对象. * @param problemId - 试题的唯一标识符 * @return 一个试题对象 */ @Select("SELECT * FROM voj_problems WHERE problem_id = #{problemId}") @Options(useCache = true) @Results({ @Result(property = "problemId", column = "problem_id"), @Result(property = "isPublic", column = "problem_is_public"), @Result(property = "problemName", column = "problem_name"), @Result(property = "totalSubmission", column = "total_submission"), @Result(property = "acceptedSubmission", column = "accepted_submission"), @Result(property = "timeLimit", column = "problem_time_limit"), @Result(property = "memoryLimit", column = "problem_memory_limit"), @Result(property = "description", column = "problem_description"), @Result(property = "inputFormat", column = "problem_input_format"), @Result(property = "outputFormat", column = "problem_output_format"), @Result(property = "sampleInput", column = "problem_sample_input"), @Result(property = "sampleOutput", column = "problem_sample_output"), @Result(property = "hint", column = "problem_hint") }) Problem getProblem(@Param("problemId") long problemId);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table MAIL_LOG * * @mbggenerated */ @SelectProvider(type=MailLogSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="LAUNCHED_BY", property="launchedBy", jdbcType=JdbcType.VARCHAR), @Result(column="LAUNCHED_AT", property="launchedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="MAIL_STATUS", property="mailStatus", jdbcType=JdbcType.INTEGER), @Result(column="MESSAGE_NAME", property="messageName", jdbcType=JdbcType.VARCHAR), @Result(column="SCHEDULED_AT", property="scheduledAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="SENT_AT", property="sentAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="FROM_ADDR", property="fromAddr", jdbcType=JdbcType.VARCHAR), @Result(column="SUBJECT", property="subject", jdbcType=JdbcType.VARCHAR), @Result(column="BODY", property="body", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<MailLog> selectByExampleWithRowbounds(MailLogCriteria example, RowBounds rowBounds);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table MAIL_LOG * * @mbggenerated */ @SelectProvider(type=MailLogSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="LAUNCHED_BY", property="launchedBy", jdbcType=JdbcType.VARCHAR), @Result(column="LAUNCHED_AT", property="launchedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="MAIL_STATUS", property="mailStatus", jdbcType=JdbcType.INTEGER), @Result(column="MESSAGE_NAME", property="messageName", jdbcType=JdbcType.VARCHAR), @Result(column="SCHEDULED_AT", property="scheduledAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="SENT_AT", property="sentAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="FROM_ADDR", property="fromAddr", jdbcType=JdbcType.VARCHAR), @Result(column="SUBJECT", property="subject", jdbcType=JdbcType.VARCHAR), @Result(column="BODY", property="body", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<MailLog> selectByExample(MailLogCriteria example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table SQLTOOL_CLAUSE * * @mbggenerated */ @SelectProvider(type=SqltoolClauseSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="DATABASE_NAME", property="databaseName", jdbcType=JdbcType.VARCHAR), @Result(column="SELECT_CLAUSE", property="selectClause", jdbcType=JdbcType.VARCHAR), @Result(column="FROM_CLAUSE", property="fromClause", jdbcType=JdbcType.VARCHAR), @Result(column="WHERE_CLAUSE", property="whereClause", jdbcType=JdbcType.VARCHAR), @Result(column="GROUP_BY_CLAUSE", property="groupByClause", jdbcType=JdbcType.VARCHAR), @Result(column="HAVING_CLAUSE", property="havingClause", jdbcType=JdbcType.VARCHAR), @Result(column="ORDER_BY_CLAUSE", property="orderByClause", jdbcType=JdbcType.VARCHAR), @Result(column="PARAM_MAP", property="paramMap", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<SqltoolClause> selectByExampleWithRowbounds(SqltoolClauseCriteria example, RowBounds rowBounds);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table SQLTOOL_CLAUSE * * @mbggenerated */ @SelectProvider(type=SqltoolClauseSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="DATABASE_NAME", property="databaseName", jdbcType=JdbcType.VARCHAR), @Result(column="SELECT_CLAUSE", property="selectClause", jdbcType=JdbcType.VARCHAR), @Result(column="FROM_CLAUSE", property="fromClause", jdbcType=JdbcType.VARCHAR), @Result(column="WHERE_CLAUSE", property="whereClause", jdbcType=JdbcType.VARCHAR), @Result(column="GROUP_BY_CLAUSE", property="groupByClause", jdbcType=JdbcType.VARCHAR), @Result(column="HAVING_CLAUSE", property="havingClause", jdbcType=JdbcType.VARCHAR), @Result(column="ORDER_BY_CLAUSE", property="orderByClause", jdbcType=JdbcType.VARCHAR), @Result(column="PARAM_MAP", property="paramMap", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<SqltoolClause> selectByExample(SqltoolClauseCriteria example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ASYNC_PROCESS_FILE * * @mbggenerated */ @SelectProvider(type=AsyncProcessFileSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="ASYNC_ID", property="asyncId", jdbcType=JdbcType.BIGINT), @Result(column="HANDLER_NAME", property="handlerName", jdbcType=JdbcType.VARCHAR), @Result(column="PARAM_NAME", property="paramName", jdbcType=JdbcType.VARCHAR), @Result(column="ORIGINAL_FILENAME", property="originalFilename", jdbcType=JdbcType.VARCHAR), @Result(column="CONTENT_TYPE", property="contentType", jdbcType=JdbcType.VARCHAR), @Result(column="FILE_SIZE", property="fileSize", jdbcType=JdbcType.BIGINT), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<AsyncProcessFile> selectByExampleWithRowbounds(AsyncProcessFileCriteria example, RowBounds rowBounds);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ASYNC_PROCESS_FILE * * @mbggenerated */ @SelectProvider(type=AsyncProcessFileSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="ASYNC_ID", property="asyncId", jdbcType=JdbcType.BIGINT), @Result(column="HANDLER_NAME", property="handlerName", jdbcType=JdbcType.VARCHAR), @Result(column="PARAM_NAME", property="paramName", jdbcType=JdbcType.VARCHAR), @Result(column="ORIGINAL_FILENAME", property="originalFilename", jdbcType=JdbcType.VARCHAR), @Result(column="CONTENT_TYPE", property="contentType", jdbcType=JdbcType.VARCHAR), @Result(column="FILE_SIZE", property="fileSize", jdbcType=JdbcType.BIGINT), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<AsyncProcessFile> selectByExample(AsyncProcessFileCriteria example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ASYNC_PROCESS * * @mbggenerated */ @SelectProvider(type=AsyncProcessSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="LAUNCHED_BY", property="launchedBy", jdbcType=JdbcType.VARCHAR), @Result(column="DESCRIPTION", property="description", jdbcType=JdbcType.VARCHAR), @Result(column="ASYNC_TYPE", property="asyncType", jdbcType=JdbcType.VARCHAR), @Result(column="ASYNC_STATUS", property="asyncStatus", jdbcType=JdbcType.VARCHAR), @Result(column="REGISTERED_AT", property="registeredAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LAUNCHED_AT", property="launchedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="STARTED_AT", property="startedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="FINISHED_AT", property="finishedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<AsyncProcess> selectByExampleWithRowbounds(AsyncProcessCriteria example, RowBounds rowBounds);
@Select({ "SELECT", "id, joda_date, joda_time, joda_datetime, sec_str, sec_int, sec_long, sec_bigint, sec_bigdec, flag_code, deleted_flg", "FROM conversion_test" }) @Results({ @Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER, id = true), @Result(column = "joda_date", property = "jodaDate", jdbcType = JdbcType.DATE), @Result(column = "joda_time", property = "jodaTime", jdbcType = JdbcType.TIME), @Result(column = "joda_datetime", property = "jodaDatetime", jdbcType = JdbcType.TIMESTAMP), @Result(column = "sec_str", property = "secStr", jdbcType = JdbcType.VARCHAR), @Result(column = "sec_int", property = "secInt", jdbcType = JdbcType.VARCHAR), @Result(column = "sec_long", property = "secLong", jdbcType = JdbcType.VARCHAR), @Result(column = "sec_bigint", property = "secBigint", jdbcType = JdbcType.VARCHAR), @Result(column = "sec_bigdec", property = "secBigdec", jdbcType = JdbcType.VARCHAR), @Result(column = "flag_code", property = "flagCode", jdbcType = JdbcType.INTEGER), @Result(column = "deleted_flg", property = "deletedFlg", jdbcType = JdbcType.INTEGER) }) List<ConversionTest> selectAll();
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table TODO * * @mbggenerated */ @SelectProvider(type=TodoSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="POSTED_BY", property="postedBy", jdbcType=JdbcType.VARCHAR), @Result(column="POSTED_AT", property="postedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="DUE_DT", property="dueDt", jdbcType=JdbcType.DATE), @Result(column="DONE_AT", property="doneAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="DONE_FLG", property="doneFlg", jdbcType=JdbcType.INTEGER), @Result(column="DESCRIPTION", property="description", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<Todo> selectByExampleWithRowbounds(TodoCriteria example, RowBounds rowBounds);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table TODO * * @mbggenerated */ @SelectProvider(type=TodoSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="POSTED_BY", property="postedBy", jdbcType=JdbcType.VARCHAR), @Result(column="POSTED_AT", property="postedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="DUE_DT", property="dueDt", jdbcType=JdbcType.DATE), @Result(column="DONE_AT", property="doneAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="DONE_FLG", property="doneFlg", jdbcType=JdbcType.INTEGER), @Result(column="DESCRIPTION", property="description", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<Todo> selectByExample(TodoCriteria example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table DAYOFF_MASTER * * @mbggenerated */ @Select({ "select", "NAME, DT, TYPE, UPDATED_AT, CREATED_AT, LOCK_VERSION, DELETED_FLG", "from DAYOFF_MASTER", "where NAME = #{name,jdbcType=VARCHAR}", "and DT = #{dt,jdbcType=DATE}" }) @Results({ @Result(column="NAME", property="name", jdbcType=JdbcType.VARCHAR, id=true), @Result(column="DT", property="dt", jdbcType=JdbcType.DATE, id=true), @Result(column="TYPE", property="type", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) DayoffMaster selectByPrimaryKey(DayoffMasterKey key);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table MAIL_LOG * * @mbggenerated */ @SelectProvider(type=MailLogSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="LAUNCHED_BY", property="launchedBy", jdbcType=JdbcType.VARCHAR), @Result(column="LAUNCHED_AT", property="launchedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="MAIL_STATUS", property="mailStatus", jdbcType=JdbcType.INTEGER), @Result(column="MESSAGE_NAME", property="messageName", jdbcType=JdbcType.VARCHAR), @Result(column="SCHEDULED_AT", property="scheduledAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="SENT_AT", property="sentAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="FROM_ADDR", property="fromAddr", jdbcType=JdbcType.VARCHAR), @Result(column="REPLY_TO_ADDR", property="replyToAddr", jdbcType=JdbcType.VARCHAR), @Result(column="SUBJECT", property="subject", jdbcType=JdbcType.VARCHAR), @Result(column="BODY", property="body", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<MailLog> selectByExampleWithRowbounds(MailLogCriteria example, RowBounds rowBounds);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table MAIL_LOG * * @mbggenerated */ @SelectProvider(type=MailLogSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="LAUNCHED_BY", property="launchedBy", jdbcType=JdbcType.VARCHAR), @Result(column="LAUNCHED_AT", property="launchedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="MAIL_STATUS", property="mailStatus", jdbcType=JdbcType.INTEGER), @Result(column="MESSAGE_NAME", property="messageName", jdbcType=JdbcType.VARCHAR), @Result(column="SCHEDULED_AT", property="scheduledAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="SENT_AT", property="sentAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="FROM_ADDR", property="fromAddr", jdbcType=JdbcType.VARCHAR), @Result(column="REPLY_TO_ADDR", property="replyToAddr", jdbcType=JdbcType.VARCHAR), @Result(column="SUBJECT", property="subject", jdbcType=JdbcType.VARCHAR), @Result(column="BODY", property="body", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<MailLog> selectByExample(MailLogCriteria example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ZIPCD_MASTER * * @mbggenerated */ @SelectProvider(type=ZipcdMasterSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="CITY_CD", property="cityCd", jdbcType=JdbcType.INTEGER), @Result(column="ZIPCD", property="zipcd", jdbcType=JdbcType.VARCHAR), @Result(column="PREF", property="pref", jdbcType=JdbcType.VARCHAR), @Result(column="CITY", property="city", jdbcType=JdbcType.VARCHAR), @Result(column="ADDR", property="addr", jdbcType=JdbcType.VARCHAR), @Result(column="PREF_KANA", property="prefKana", jdbcType=JdbcType.VARCHAR), @Result(column="CITY_KANA", property="cityKana", jdbcType=JdbcType.VARCHAR), @Result(column="ADDR_KANA", property="addrKana", jdbcType=JdbcType.VARCHAR), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<ZipcdMaster> selectByExampleWithRowbounds(ZipcdMasterCriteria example, RowBounds rowBounds);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ASYNC_PROCESS * * @mbggenerated */ @SelectProvider(type=AsyncProcessSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="LAUNCHED_BY", property="launchedBy", jdbcType=JdbcType.VARCHAR), @Result(column="DESCRIPTION", property="description", jdbcType=JdbcType.VARCHAR), @Result(column="ASYNC_TYPE", property="asyncType", jdbcType=JdbcType.VARCHAR), @Result(column="ASYNC_STATUS", property="asyncStatus", jdbcType=JdbcType.VARCHAR), @Result(column="REGISTERED_AT", property="registeredAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LAUNCHED_AT", property="launchedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="STARTED_AT", property="startedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="FINISHED_AT", property="finishedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="UPDATED_AT", property="updatedAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="CREATED_AT", property="createdAt", jdbcType=JdbcType.TIMESTAMP), @Result(column="LOCK_VERSION", property="lockVersion", jdbcType=JdbcType.INTEGER), @Result(column="DELETED_FLG", property="deletedFlg", jdbcType=JdbcType.INTEGER) }) List<AsyncProcess> selectByExample(AsyncProcessCriteria example);
private void applyResultMap(String resultMapId, Class<?> returnType, Arg[] args, Result[] results, TypeDiscriminator discriminator) { List<ResultMapping> resultMappings = new ArrayList<>(); applyConstructorArgs(args, returnType, resultMappings); applyResults(results, returnType, resultMappings); Discriminator disc = applyDiscriminator(resultMapId, returnType, discriminator); // TODO add AutoMappingBehaviour assistant.addResultMap(resultMapId, returnType, null, disc, resultMappings, null); createDiscriminatorResultMaps(resultMapId, returnType, discriminator); }
private void applyResults(Result[] results, Class<?> resultType, List<ResultMapping> resultMappings) { for (Result result : results) { List<ResultFlag> flags = new ArrayList<>(); if (result.id()) { flags.add(ResultFlag.ID); } @SuppressWarnings("unchecked") Class<? extends TypeHandler<?>> typeHandler = (Class<? extends TypeHandler<?>>) ((result.typeHandler() == UnknownTypeHandler.class) ? null : result.typeHandler()); ResultMapping resultMapping = assistant.buildResultMapping( resultType, nullOrEmpty(result.property()), nullOrEmpty(result.column()), result.javaType() == void.class ? null : result.javaType(), result.jdbcType() == JdbcType.UNDEFINED ? null : result.jdbcType(), hasNestedSelect(result) ? nestedSelectId(result) : null, null, null, null, typeHandler, flags, null, null, isLazy(result)); resultMappings.add(resultMapping); } }
private String nestedSelectId(Result result) { String nestedSelect = result.one().select(); if (nestedSelect.length() < 1) { nestedSelect = result.many().select(); } if (!nestedSelect.contains(".")) { nestedSelect = type.getName() + "." + nestedSelect; } return nestedSelect; }