本文整理汇总了Java中org.apache.ibatis.annotations.Options类的典型用法代码示例。如果您正苦于以下问题:Java Options类的具体用法?Java Options怎么用?Java Options使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Options类属于org.apache.ibatis.annotations包,在下文中一共展示了Options类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSubmission
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* 通过评测记录唯一标识符获取试题对象.
* @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);
示例2: getProblem
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* 通过试题唯一标识符获取试题对象.
* @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);
示例3: MAIL_LOG
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table MAIL_LOG
*
* @mbggenerated
*/
@Insert({
"insert into MAIL_LOG (LAUNCHED_BY, LAUNCHED_AT, ",
"MAIL_STATUS, MESSAGE_NAME, ",
"SCHEDULED_AT, SENT_AT, ",
"FROM_ADDR, SUBJECT, ",
"BODY, UPDATED_AT, ",
"CREATED_AT, LOCK_VERSION, ",
"DELETED_FLG)",
"values (#{launchedBy,jdbcType=VARCHAR}, #{launchedAt,jdbcType=TIMESTAMP}, ",
"#{mailStatus,jdbcType=INTEGER}, #{messageName,jdbcType=VARCHAR}, ",
"#{scheduledAt,jdbcType=TIMESTAMP}, #{sentAt,jdbcType=TIMESTAMP}, ",
"#{fromAddr,jdbcType=VARCHAR}, #{subject,jdbcType=VARCHAR}, ",
"#{body,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, ",
"#{createdAt,jdbcType=TIMESTAMP}, #{lockVersion,jdbcType=INTEGER}, ",
"#{deletedFlg,jdbcType=INTEGER})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(MailLog record);
示例4: SQLTOOL_CLAUSE
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table SQLTOOL_CLAUSE
*
* @mbggenerated
*/
@Insert({
"insert into SQLTOOL_CLAUSE (DATABASE_NAME, SELECT_CLAUSE, ",
"FROM_CLAUSE, WHERE_CLAUSE, ",
"GROUP_BY_CLAUSE, HAVING_CLAUSE, ",
"ORDER_BY_CLAUSE, PARAM_MAP, ",
"UPDATED_AT, CREATED_AT, ",
"LOCK_VERSION, DELETED_FLG)",
"values (#{databaseName,jdbcType=VARCHAR}, #{selectClause,jdbcType=VARCHAR}, ",
"#{fromClause,jdbcType=VARCHAR}, #{whereClause,jdbcType=VARCHAR}, ",
"#{groupByClause,jdbcType=VARCHAR}, #{havingClause,jdbcType=VARCHAR}, ",
"#{orderByClause,jdbcType=VARCHAR}, #{paramMap,jdbcType=VARCHAR}, ",
"#{updatedAt,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP}, ",
"#{lockVersion,jdbcType=INTEGER}, #{deletedFlg,jdbcType=INTEGER})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(SqltoolClause record);
示例5: ASYNC_PROCESS
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ASYNC_PROCESS
*
* @mbggenerated
*/
@Insert({
"insert into ASYNC_PROCESS (LAUNCHED_BY, DESCRIPTION, ",
"ASYNC_TYPE, ASYNC_STATUS, ",
"REGISTERED_AT, LAUNCHED_AT, ",
"STARTED_AT, FINISHED_AT, ",
"UPDATED_AT, CREATED_AT, ",
"LOCK_VERSION, DELETED_FLG)",
"values (#{launchedBy,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, ",
"#{asyncType,jdbcType=VARCHAR}, #{asyncStatus,jdbcType=VARCHAR}, ",
"#{registeredAt,jdbcType=TIMESTAMP}, #{launchedAt,jdbcType=TIMESTAMP}, ",
"#{startedAt,jdbcType=TIMESTAMP}, #{finishedAt,jdbcType=TIMESTAMP}, ",
"#{updatedAt,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP}, ",
"#{lockVersion,jdbcType=INTEGER}, #{deletedFlg,jdbcType=INTEGER})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(AsyncProcess record);
示例6: MAIL_RCPT
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table MAIL_RCPT
*
* @mbggenerated
*/
@Insert({
"insert into MAIL_RCPT (MAIL_ID, RCPT_TYPE, ",
"RCPT_ADDR, UPDATED_AT, ",
"CREATED_AT, LOCK_VERSION, ",
"DELETED_FLG)",
"values (#{mailId,jdbcType=BIGINT}, #{rcptType,jdbcType=VARCHAR}, ",
"#{rcptAddr,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, ",
"#{createdAt,jdbcType=TIMESTAMP}, #{lockVersion,jdbcType=INTEGER}, ",
"#{deletedFlg,jdbcType=INTEGER})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(MailRcpt record);
示例7: MAIL_LOG
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table MAIL_LOG
*
* @mbggenerated
*/
@Insert({
"insert into MAIL_LOG (LAUNCHED_BY, LAUNCHED_AT, ",
"MAIL_STATUS, MESSAGE_NAME, ",
"SCHEDULED_AT, SENT_AT, ",
"FROM_ADDR, REPLY_TO_ADDR, ",
"SUBJECT, BODY, UPDATED_AT, ",
"CREATED_AT, LOCK_VERSION, ",
"DELETED_FLG)",
"values (#{launchedBy,jdbcType=VARCHAR}, #{launchedAt,jdbcType=TIMESTAMP}, ",
"#{mailStatus,jdbcType=INTEGER}, #{messageName,jdbcType=VARCHAR}, ",
"#{scheduledAt,jdbcType=TIMESTAMP}, #{sentAt,jdbcType=TIMESTAMP}, ",
"#{fromAddr,jdbcType=VARCHAR}, #{replyToAddr,jdbcType=VARCHAR}, ",
"#{subject,jdbcType=VARCHAR}, #{body,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, ",
"#{createdAt,jdbcType=TIMESTAMP}, #{lockVersion,jdbcType=INTEGER}, ",
"#{deletedFlg,jdbcType=INTEGER})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(MailLog record);
示例8: ZIPCD_MASTER
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ZIPCD_MASTER
*
* @mbggenerated
*/
@Insert({
"insert into ZIPCD_MASTER (CITY_CD, ZIPCD, ",
"PREF, CITY, ADDR, ",
"PREF_KANA, CITY_KANA, ",
"ADDR_KANA, UPDATED_AT, ",
"CREATED_AT, LOCK_VERSION, ",
"DELETED_FLG)",
"values (#{cityCd,jdbcType=INTEGER}, #{zipcd,jdbcType=VARCHAR}, ",
"#{pref,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{addr,jdbcType=VARCHAR}, ",
"#{prefKana,jdbcType=VARCHAR}, #{cityKana,jdbcType=VARCHAR}, ",
"#{addrKana,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, ",
"#{createdAt,jdbcType=TIMESTAMP}, #{lockVersion,jdbcType=INTEGER}, ",
"#{deletedFlg,jdbcType=INTEGER})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(ZipcdMaster record);
示例9: insertNameAnnotated
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
@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);
示例10:
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
@Select({ "{call sptest.arraytest(", "#{ids,mode=IN,jdbcType=ARRAY},", "#{requestedRows,jdbcType=INTEGER,mode=OUT},", "#{returnedIds,mode=OUT,jdbcType=ARRAY})}" })
@ResultMap("nameResult")
@Options(statementType = StatementType.CALLABLE)
List<Name> getNamesWithArrayAnnotatedWithXMLResultMap(Map<String, Object> parms);
示例11: location
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
@Insert({
"insert into location (username, instant, latitude, longitude) values (",
"lower(#{username}),",
"#{location.instant,javaType=java.time.LocalDateTime,jdbcType=TIMESTAMP},",
"#{location.latitude},",
"#{location.longitude}",
")"
})
@Options(useGeneratedKeys = true, keyProperty = "location.id")
void insert(@Param("username") String username, @Param("location") Location location);
示例12: getUserUsingUsername
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* 通过用户名获取用户对象.
* @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);
示例13: getCheckpointsUsingProblemId
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* 获取某个试题的全部测试点.
* @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);
示例14: getLanguageUsingId
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* 通过编程语言的唯一标识符获取编程语言对象.
* @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);
示例15: getLanguageUsingSlug
import org.apache.ibatis.annotations.Options; //导入依赖的package包/类
/**
* 通过编程语言的唯一英文缩写获取编程语言对象.
* @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);