本文整理汇总了Java中org.apache.ibatis.annotations.Result类的典型用法代码示例。如果您正苦于以下问题:Java Result类的具体用法?Java Result怎么用?Java Result使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Result类属于org.apache.ibatis.annotations包,在下文中一共展示了Result类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: selectByExample
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@SelectProvider(type=UserSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="username", property="username", jdbcType=JdbcType.VARCHAR),
@Result(column="psw", property="psw", jdbcType=JdbcType.VARCHAR)
})
List<User> selectByExample(UserCriteria example);
示例2: selectByExampleWithRowbounds
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
/**
* 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);
示例3: selectByExample
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
/**
* 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);
示例4: IN
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@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);
示例5: findAttachmentsByTaskId
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@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);
示例6: findById
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@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);
示例7: findByAccessId
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@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);
示例8: findByWorkbasketKey
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@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);
示例9: findAll
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@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();
示例10: findById
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@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);
示例11: findByKey
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@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);
示例12: IN
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@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);
示例13: getAllClassificationsWithKey
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
@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);
示例14: applyResults
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
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);
}
}
示例15: selectRunningTasks
import org.apache.ibatis.annotations.Result; //导入依赖的package包/类
/**
* 查询所有正在运行的任务
*
* @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();