org.apache.ibatis.annotations.Options Java Examples
The following examples show how to use
org.apache.ibatis.annotations.Options.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SubmissionMapper.java From voj with GNU General Public License v3.0 | 6 votes |
/** * 通过评测记录唯一标识符获取试题对象. * @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);
Example #2
Source File: ProblemMapper.java From voj with GNU General Public License v3.0 | 6 votes |
/** * 通过试题唯一标识符获取试题对象. * @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);
Example #3
Source File: UserGroupMapper.java From voj with GNU General Public License v3.0 | 5 votes |
/** * 通过用户组的唯一标识符获取用户组对象. * @param userGroupId - 用户组的唯一标识符 * @return 预期的用户组对象或空引用 */ @Select("SELECT * FROM voj_user_groups WHERE user_group_id = #{userGroupId}") @Options(useCache = true) @Results({ @Result(property = "userGroupId", column = "user_group_id"), @Result(property = "userGroupSlug", column = "user_group_slug"), @Result(property = "userGroupName", column = "user_group_name") }) UserGroup getUserGroupUsingId(@Param("userGroupId") int userGroupId);
Example #4
Source File: InsertMapper.java From mybatis with Apache License 2.0 | 5 votes |
@Insert({ "insert into mbtest.test_identity", "(first_name, last_name)", "values(#{firstName,jdbcType=VARCHAR}, #{lastName,jdbcType=VARCHAR})" }) @Options(keyProperty="id", useGeneratedKeys=true, keyColumn="name_id") int insertNameAnnotated(Name name);
Example #5
Source File: TaskMapper.java From taskana with Apache License 2.0 | 5 votes |
@Insert( "INSERT INTO TASK(ID, EXTERNAL_ID, CREATED, CLAIMED, COMPLETED, MODIFIED, PLANNED, DUE, NAME, CREATOR, DESCRIPTION, NOTE, PRIORITY, STATE, CLASSIFICATION_CATEGORY, CLASSIFICATION_KEY, CLASSIFICATION_ID, WORKBASKET_ID, WORKBASKET_KEY, DOMAIN, BUSINESS_PROCESS_ID, PARENT_BUSINESS_PROCESS_ID, OWNER, POR_COMPANY, " + "POR_SYSTEM, POR_INSTANCE, POR_TYPE, POR_VALUE, IS_READ, IS_TRANSFERRED, CALLBACK_INFO, CALLBACK_STATE, CUSTOM_ATTRIBUTES, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8, " + "CUSTOM_9, CUSTOM_10, CUSTOM_11, CUSTOM_12, CUSTOM_13, CUSTOM_14, CUSTOM_15, CUSTOM_16 ) " + "VALUES(#{id},#{externalId}, #{created}, #{claimed}, #{completed}, #{modified}, #{planned}, #{due}, #{name}, #{creator}, #{description}, #{note}, #{priority}, #{state}, #{classificationSummary.category}, " + "#{classificationSummary.key}, #{classificationSummary.id}, #{workbasketSummary.id}, #{workbasketSummary.key}, #{workbasketSummary.domain}, #{businessProcessId}, " + "#{parentBusinessProcessId}, #{owner}, #{primaryObjRef.company}, #{primaryObjRef.system}, #{primaryObjRef.systemInstance}, #{primaryObjRef.type}, #{primaryObjRef.value}, " + "#{isRead}, #{isTransferred}, #{callbackInfo,jdbcType=CLOB,javaType=java.util.Map,typeHandler=pro.taskana.common.internal.persistence.MapTypeHandler}, #{callbackState}, " + "#{customAttributes,jdbcType=CLOB,javaType=java.util.Map,typeHandler=pro.taskana.common.internal.persistence.MapTypeHandler}, " + "#{custom1}, #{custom2}, #{custom3}, #{custom4}, #{custom5}, #{custom6}, #{custom7}, #{custom8}, #{custom9}, #{custom10}, " + "#{custom11}, #{custom12}, #{custom13}, #{custom14}, #{custom15}, #{custom16})") @Options(keyProperty = "id", keyColumn = "ID") void insert(TaskImpl task);
Example #6
Source File: InsertMapper.java From mybaties with Apache License 2.0 | 5 votes |
@Insert({ "insert into mbtest.test_identity", "(first_name, last_name)", "values(#{firstName,jdbcType=VARCHAR}, #{lastName,jdbcType=VARCHAR})" }) @Options(keyProperty="id", useGeneratedKeys=true, keyColumn="name_id") int insertNameAnnotated(Name name);
Example #7
Source File: UserMapper.java From voj with GNU General Public License v3.0 | 5 votes |
/** * 通过用户名获取用户对象. * @param username - 用户名 * @return 预期的用户对象或空引用 */ @Select("SELECT * FROM voj_users WHERE username = #{username}") @Options(useCache = false) @Results(value = { @Result(property = "userGroup", column = "user_group_id", javaType = UserGroup.class, one = @One(select="org.verwandlung.voj.judger.mapper.UserGroupMapper.getUserGroupUsingId")), @Result(property = "preferLanguage", column = "prefer_language_id", javaType = Language.class, one = @One(select="org.verwandlung.voj.judger.mapper.LanguageMapper.getLanguageUsingId")) }) User getUserUsingUsername(@Param("username") String username);
Example #8
Source File: CheckpointMapper.java From voj with GNU General Public License v3.0 | 5 votes |
/** * 获取某个试题的全部测试点. * @param problemId - 试题的唯一标识符 * @return 某个试题的全部测试点 */ @Select("SELECT * FROM voj_problem_checkpoints WHERE problem_id = #{problemId}") @Options(useCache = true) @Results({ @Result(property = "problemId", column = "problem_id"), @Result(property = "checkpointId", column = "checkpoint_id"), @Result(property = "isExactlyMatch", column = "checkpoint_exactly_match"), @Result(property = "score", column = "checkpoint_score"), @Result(property = "input", column = "checkpoint_input"), @Result(property = "output", column = "checkpoint_output"), }) List<Checkpoint> getCheckpointsUsingProblemId(@Param("problemId") long problemId);
Example #9
Source File: LanguageMapper.java From voj with GNU General Public License v3.0 | 5 votes |
/** * 通过编程语言的唯一标识符获取编程语言对象. * @param languageId - 编程语言的唯一标识符 * @return 预期的编程语言对象或空引用 */ @Select("SELECT * FROM voj_languages WHERE language_id = #{languageId}") @Options(useCache = true) @Results({ @Result(property = "languageId", column = "language_id"), @Result(property = "languageSlug", column = "language_slug"), @Result(property = "languageName", column = "language_name"), @Result(property = "compileCommand", column = "language_compile_command"), @Result(property = "runCommand", column = "language_run_command"), }) Language getLanguageUsingId(@Param("languageId") int languageId);
Example #10
Source File: LanguageMapper.java From voj with GNU General Public License v3.0 | 5 votes |
/** * 通过编程语言的唯一英文缩写获取编程语言对象. * @param languageSlug - 编程语言的唯一英文缩写 * @return 预期的编程语言对象或空引用 */ @Select("SELECT * FROM voj_languages WHERE language_slug = #{languageSlug}") @Options(useCache = true) @Results({ @Result(property = "languageId", column = "language_id"), @Result(property = "languageSlug", column = "language_slug"), @Result(property = "languageName", column = "language_name"), @Result(property = "compileCommand", column = "language_compile_command"), @Result(property = "runCommand", column = "language_run_command"), }) Language getLanguageUsingSlug(@Param("languageSlug") String languageSlug);
Example #11
Source File: JudgeResultMapper.java From voj with GNU General Public License v3.0 | 5 votes |
/** * 通过评测结果的唯一标识符获取评测结果对象. * @return 预期的评测结果对象或空引用 */ @Select("SELECT * FROM voj_judge_results") @Options(useCache = true) @Results({ @Result(property = "judgeResultId", column = "judge_result_id"), @Result(property = "judgeResultSlug", column = "judge_result_slug"), @Result(property = "judgeResultName", column = "judge_result_name") }) List<JudgeResult> getAllJudgeResults();
Example #12
Source File: JudgeResultMapper.java From voj with GNU General Public License v3.0 | 5 votes |
/** * 通过评测结果的唯一英文缩写获取评测结果对象. * @param judgeResultSlug - 评测结果的唯一英文缩写 * @return 预期的评测结果对象或空引用 */ @Select("SELECT * FROM voj_judge_results WHERE judge_result_slug = #{judgeResultSlug}") @Options(useCache = true) @Results({ @Result(property = "judgeResultId", column = "judge_result_id"), @Result(property = "judgeResultSlug", column = "judge_result_slug"), @Result(property = "judgeResultName", column = "judge_result_name") }) JudgeResult getJudgeResultUsingSlug(@Param("judgeResultSlug") String judgeResultSlug);
Example #13
Source File: SPMapper.java From mybatis with Apache License 2.0 | 4 votes |
@Select({ "{call sptest.adder(", "#{addend1,jdbcType=INTEGER,mode=IN},", "#{addend2,jdbcType=INTEGER,mode=IN},", "#{sum,jdbcType=INTEGER,mode=OUT})}" }) @Options(statementType = StatementType.CALLABLE) Object adderAsSelectAnnotated(Parameter parameter);
Example #14
Source File: MailDao.java From cloud-service with MIT License | 4 votes |
@Options(useGeneratedKeys = true, keyProperty = "id") @Insert("insert into t_mail(userId, username, toEmail, subject, content, status, createTime, updateTime) values(#{userId}, #{username}, #{toEmail}, #{subject}, #{content}, #{status}, #{createTime}, #{updateTime})") int save(Mail mail);
Example #15
Source File: SPMapper.java From mybatis with Apache License 2.0 | 4 votes |
@Select("{call sptest.getname(#{id,jdbcType=INTEGER,mode=IN})}") @Results({ @Result(column = "ID", property = "id"), @Result(column = "FIRST_NAME", property = "firstName"), @Result(column = "LAST_NAME", property = "lastName") }) @Options(statementType = StatementType.CALLABLE) Name getNameAnnotated(Integer id);
Example #16
Source File: SPMapper.java From mybaties with Apache License 2.0 | 4 votes |
@Select({ "{call sptest.getnames(", "#{lowestId,jdbcType=INTEGER,mode=IN},", "#{totalRows,jdbcType=INTEGER,mode=OUT})}" }) @ResultMap("nameResult") @Options(statementType = StatementType.CALLABLE) List<Name> getNamesAnnotatedWithXMLResultMap(Map<String, Object> parms);
Example #17
Source File: SPMapper.java From mybaties with Apache License 2.0 | 4 votes |
@Select({ "{call sptest.getnames(", "#{lowestId,jdbcType=INTEGER,mode=IN},", "#{totalRows,jdbcType=INTEGER,mode=OUT})}" }) @Results({ @Result(column = "ID", property = "id"), @Result(column = "FIRST_NAME", property = "firstName"), @Result(column = "LAST_NAME", property = "lastName") }) @Options(statementType = StatementType.CALLABLE) List<Name> getNamesAnnotated(Map<String, Object> parms);
Example #18
Source File: SPMapper.java From mybaties with Apache License 2.0 | 4 votes |
@Select("{call sptest.getname(#{id,jdbcType=INTEGER,mode=IN})}") @ResultMap("nameResult") @Options(statementType = StatementType.CALLABLE) Name getNameAnnotatedWithXMLResultMap(Integer id);
Example #19
Source File: SPMapper.java From mybaties with Apache License 2.0 | 4 votes |
@Select("{call sptest.getname(#{id,jdbcType=INTEGER,mode=IN})}") @Results({ @Result(column = "ID", property = "id"), @Result(column = "FIRST_NAME", property = "firstName"), @Result(column = "LAST_NAME", property = "lastName") }) @Options(statementType = StatementType.CALLABLE) Name getNameAnnotated(Integer id);
Example #20
Source File: SPMapper.java From mybaties with Apache License 2.0 | 4 votes |
@Update({ "{call sptest.adder(", "#{addend1,jdbcType=INTEGER,mode=IN},", "#{addend2,jdbcType=INTEGER,mode=IN},", "#{sum,jdbcType=INTEGER,mode=OUT})}" }) @Options(statementType = StatementType.CALLABLE) void adderAsUpdateAnnotated(Parameter parameter);
Example #21
Source File: SPMapper.java From mybaties with Apache License 2.0 | 4 votes |
@Select({ "{call sptest.adder(", "#{addend1,jdbcType=INTEGER,mode=IN},", "#{addend2,jdbcType=INTEGER,mode=IN},", "#{sum,jdbcType=INTEGER,mode=OUT})}" }) @Options(statementType = StatementType.CALLABLE) Object adderAsSelectAnnotated(Parameter parameter);
Example #22
Source File: WechatDao.java From cloud-service with MIT License | 4 votes |
@Options(useGeneratedKeys = true, keyProperty = "id") @Insert("insert into t_wechat(openid, unionid, userId, app, nickname, sex, province, city, country, headimgurl, createTime, updateTime) " + "values(#{openid}, #{unionid}, #{userId}, #{app}, #{nickname}, #{sex}, #{province}, #{city}, #{country}, #{headimgurl}, #{createTime}, #{updateTime})") int save(WechatUserInfo info);
Example #23
Source File: AnnotatedMapper.java From mybaties with Apache License 2.0 | 4 votes |
@Update("update table2 set name = #{name} where id = #{nameId}") @Options(useGeneratedKeys=true, keyProperty="generatedName") int updateTable2WithGeneratedKey(Name name);
Example #24
Source File: AnnotatedMapper.java From mybaties with Apache License 2.0 | 4 votes |
@Insert("insert into table2 (name) values(#{name})") @Options(useGeneratedKeys=true, keyProperty="nameId,generatedName", keyColumn="ID,NAME_FRED") int insertTable2WithGeneratedKey(Name name);
Example #25
Source File: SPMapper.java From mybatis with Apache License 2.0 | 4 votes |
@Select({ "{call sptest.getnames(", "#{lowestId,jdbcType=INTEGER,mode=IN},", "#{totalRows,jdbcType=INTEGER,mode=OUT})}" }) @Results({ @Result(column = "ID", property = "id"), @Result(column = "FIRST_NAME", property = "firstName"), @Result(column = "LAST_NAME", property = "lastName") }) @Options(statementType = StatementType.CALLABLE) List<Name> getNamesAnnotated(Map<String, Object> parms);
Example #26
Source File: UserMapper.java From j360-boot-app-all with Apache License 2.0 | 4 votes |
@Insert("INSERT INTO `t_user` (`name`) VALUES " + "( #{name})") @Options(useGeneratedKeys = true, keyProperty = "uid") int insert(User user);
Example #27
Source File: WorkbasketMapper.java From taskana with Apache License 2.0 | 4 votes |
@Insert( "<script>INSERT INTO WORKBASKET (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, MARKED_FOR_DELETION) VALUES (#{workbasket.id}, #{workbasket.key}, #{workbasket.created}, #{workbasket.modified}, #{workbasket.name}, #{workbasket.domain}, #{workbasket.type}, #{workbasket.description}, #{workbasket.owner}, #{workbasket.custom1}, #{workbasket.custom2}, #{workbasket.custom3}, #{workbasket.custom4}, #{workbasket.orgLevel1}, #{workbasket.orgLevel2}, #{workbasket.orgLevel3}, #{workbasket.orgLevel4}, #{workbasket.markedForDeletion}) " + "</script>") @Options(keyProperty = "id", keyColumn = "ID") void insert(@Param("workbasket") WorkbasketImpl workbasket);
Example #28
Source File: WorkbasketAccessMapper.java From taskana with Apache License 2.0 | 4 votes |
@Insert( "INSERT INTO WORKBASKET_ACCESS_LIST (ID, WORKBASKET_ID, ACCESS_ID, ACCESS_NAME, 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, PERM_CUSTOM_9, PERM_CUSTOM_10, PERM_CUSTOM_11, PERM_CUSTOM_12) " + "VALUES (#{workbasketAccessItem.id}, #{workbasketAccessItem.workbasketId}, #{workbasketAccessItem.accessId}, #{workbasketAccessItem.accessName}, #{workbasketAccessItem.permRead}, #{workbasketAccessItem.permOpen}, #{workbasketAccessItem.permAppend}, #{workbasketAccessItem.permTransfer}, #{workbasketAccessItem.permDistribute}, #{workbasketAccessItem.permCustom1}, #{workbasketAccessItem.permCustom2}, #{workbasketAccessItem.permCustom3}, #{workbasketAccessItem.permCustom4}, #{workbasketAccessItem.permCustom5}, #{workbasketAccessItem.permCustom6}, #{workbasketAccessItem.permCustom7}, #{workbasketAccessItem.permCustom8}, #{workbasketAccessItem.permCustom9}, #{workbasketAccessItem.permCustom10}, #{workbasketAccessItem.permCustom11}, #{workbasketAccessItem.permCustom12})") @Options(keyProperty = "id", keyColumn = "ID") void insert(@Param("workbasketAccessItem") WorkbasketAccessItemImpl workbasketAccessItem);
Example #29
Source File: SPMapper.java From mybatis with Apache License 2.0 | 4 votes |
@Select({ "{call sptest.arraytest(", "#{ids,mode=IN,jdbcType=ARRAY},", "#{requestedRows,jdbcType=INTEGER,mode=OUT},", "#{returnedIds,mode=OUT,jdbcType=ARRAY})}" }) @Results({ @Result(column = "ID", property = "id"), @Result(column = "FIRST_NAME", property = "firstName"), @Result(column = "LAST_NAME", property = "lastName") }) @Options(statementType = StatementType.CALLABLE) List<Name> getNamesWithArrayAnnotated(Map<String, Object> parms);
Example #30
Source File: SPMapper.java From mybaties with Apache License 2.0 | 4 votes |
@Select({ "{call sptest.getnamesLowHigh(", "#{lowestId,jdbcType=INTEGER,mode=IN},", "#{highestId,jdbcType=INTEGER,mode=IN})}" }) @ResultMap("nameResult") @Options(statementType = StatementType.CALLABLE) List<Name> getNamesAnnotatedLowHighWithXMLResultMap(@Param("lowestId") int lowestId, @Param("highestId") int highestId);