mybatis学习(52):扩展结果的展现

首先使用逆向工程创建相关类

数据库表

author

blog

新建一个项目,将逆向工程的生成的拷贝进来

配置文件

log4j.properties

### \u914D\u7F6E\u6839 ###
log4j.rootLogger = debug,console ,fileAppender,dailyRollingFile,ROLLING_FILE,MAIL,DATABASE### \u8BBE\u7F6E\u8F93\u51FAsql\u7684\u7EA7\u522B\uFF0C\u5176\u4E2Dlogger\u540E\u9762\u7684\u5185\u5BB9\u5168\u90E8\u4E3Ajar\u5305\u4E2D\u6240\u5305\u542B\u7684\u5305\u540D ###
log4j.logger.org.apache=dubug
log4j.logger.java.sql.Connection=dubug
log4j.logger.java.sql.Statement=dubug
log4j.logger.java.sql.PreparedStatement=dubug
log4j.logger.java.sql.ResultSet=dubug### \u914D\u7F6E\u8F93\u51FA\u5230\u63A7\u5236\u53F0 ###
log4j.appender.console = org.apache.log4j.ConsoleAppender
log4j.appender.console.Target = System.out
log4j.appender.console.layout = org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern =  %d{ABSOLUTE} %5p %c{1}:%L - %m%n

mybatis-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings><setting name="useGeneratedKeys" value="true"/>
</settings>
<typeAliases><!--  <typeAlias type="com.geyao.mybatis.pojo.Blog" alias="Blog"/><typeAlias type="com.geyao.mybatis.pojo.Author" alias="Author"/>--><package name="com.geyao.mybatis.pojo"/><package name="com.geyao.mybatis.mvo"/>
</typeAliases><environments default="development"><environment id="development"><transactionManager type="JDBC" /><!-- 配置数据库连接信息 --><dataSource type="POOLED"><property name="driver" value="com.mysql.cj.jdbc.Driver" /><property name="url" value="jdbc:mysql://localhost:3306/blog_gp1701?serverTimezone=GMT%2B8" /><property name="username" value="root" /><property name="password" value="123" /></dataSource></environment></environments><mappers><!-- 注册userMapper.xml文件, userMapper.xml位于me.gacl.mapping这个包下,所以resource写成me/gacl/mapping/userMapper.xml--><mapper resource="com/geyao/mybatis/mapper/BlogMapper.xml"/><mapper resource="com/geyao/mybatis/mapper/AuthorMapper.xml"/><mapper resource="com/geyao/mybatis/mapper/BlogMapperCustom.xml"/></mappers></configuration>

com.geyao.mybatis.mapper

BlogMapper.java

package com.geyao.mybatis.mapper;import com.geyao.mybatis.pojo.Blog;
import com.geyao.mybatis.pojo.BlogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;public interface BlogMapper {int countByExample(BlogExample example);int deleteByExample(BlogExample example);int insert(Blog record);int insertSelective(Blog record);List<Blog> selectByExample(BlogExample example);int updateByExampleSelective(@Param("record") Blog record, @Param("example") BlogExample example);int updateByExample(@Param("record") Blog record, @Param("example") BlogExample example);
}

BlogMapper.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.geyao.mybatis.mapper.BlogMapper" ><resultMap id="BaseResultMap" type="com.geyao.mybatis.pojo.Blog" ><result column="id" property="id" jdbcType="INTEGER" /><result column="title" property="title" jdbcType="VARCHAR" /><result column="authod_id" property="authodId" jdbcType="INTEGER" /><result column="state" property="state" jdbcType="VARCHAR" /><result column="featured" property="featured" jdbcType="TINYINT" /><result column="style" property="style" jdbcType="VARCHAR" /></resultMap><sql id="Example_Where_Clause" ><where ><foreach collection="oredCriteria" item="criteria" separator="or" ><if test="criteria.valid" ><trim prefix="(" suffix=")" prefixOverrides="and" ><foreach collection="criteria.criteria" item="criterion" ><choose ><when test="criterion.noValue" >and ${criterion.condition}</when><when test="criterion.singleValue" >and ${criterion.condition} #{criterion.value}</when><when test="criterion.betweenValue" >and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}</when><when test="criterion.listValue" >and ${criterion.condition}<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >#{listItem}</foreach></when></choose></foreach></trim></if></foreach></where></sql><sql id="Update_By_Example_Where_Clause" ><where ><foreach collection="example.oredCriteria" item="criteria" separator="or" ><if test="criteria.valid" ><trim prefix="(" suffix=")" prefixOverrides="and" ><foreach collection="criteria.criteria" item="criterion" ><choose ><when test="criterion.noValue" >and ${criterion.condition}</when><when test="criterion.singleValue" >and ${criterion.condition} #{criterion.value}</when><when test="criterion.betweenValue" >and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}</when><when test="criterion.listValue" >and ${criterion.condition}<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >#{listItem}</foreach></when></choose></foreach></trim></if></foreach></where></sql><sql id="Base_Column_List" >id, title, authod_id, state, featured, style</sql><select id="selectByExample" resultMap="BaseResultMap" parameterType="com.geyao.mybatis.pojo.BlogExample" >select<if test="distinct" >distinct</if><include refid="Base_Column_List" />from blog<if test="_parameter != null" ><include refid="Example_Where_Clause" /></if><if test="orderByClause != null" >order by ${orderByClause}</if></select><delete id="deleteByExample" parameterType="com.geyao.mybatis.pojo.BlogExample" >delete from blog<if test="_parameter != null" ><include refid="Example_Where_Clause" /></if></delete><insert id="insert" parameterType="com.geyao.mybatis.pojo.Blog" >insert into blog (id, title, authod_id, state, featured, style)values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{authodId,jdbcType=INTEGER}, #{state,jdbcType=VARCHAR}, #{featured,jdbcType=TINYINT}, #{style,jdbcType=VARCHAR})</insert><insert id="insertSelective" parameterType="com.geyao.mybatis.pojo.Blog" >insert into blog<trim prefix="(" suffix=")" suffixOverrides="," ><if test="id != null" >id,</if><if test="title != null" >title,</if><if test="authodId != null" >authod_id,</if><if test="state != null" >state,</if><if test="featured != null" >featured,</if><if test="style != null" >style,</if></trim><trim prefix="values (" suffix=")" suffixOverrides="," ><if test="id != null" >#{id,jdbcType=INTEGER},</if><if test="title != null" >#{title,jdbcType=VARCHAR},</if><if test="authodId != null" >#{authodId,jdbcType=INTEGER},</if><if test="state != null" >#{state,jdbcType=VARCHAR},</if><if test="featured != null" >#{featured,jdbcType=TINYINT},</if><if test="style != null" >#{style,jdbcType=VARCHAR},</if></trim></insert><select id="countByExample" parameterType="com.geyao.mybatis.pojo.BlogExample" resultType="java.lang.Integer" >select count(*) from blog<if test="_parameter != null" ><include refid="Example_Where_Clause" /></if></select><update id="updateByExampleSelective" parameterType="map" >update blog<set ><if test="record.id != null" >id = #{record.id,jdbcType=INTEGER},</if><if test="record.title != null" >title = #{record.title,jdbcType=VARCHAR},</if><if test="record.authodId != null" >authod_id = #{record.authodId,jdbcType=INTEGER},</if><if test="record.state != null" >state = #{record.state,jdbcType=VARCHAR},</if><if test="record.featured != null" >featured = #{record.featured,jdbcType=TINYINT},</if><if test="record.style != null" >style = #{record.style,jdbcType=VARCHAR},</if></set><if test="_parameter != null" ><include refid="Update_By_Example_Where_Clause" /></if></update><update id="updateByExample" parameterType="map" >update blogset id = #{record.id,jdbcType=INTEGER},title = #{record.title,jdbcType=VARCHAR},authod_id = #{record.authodId,jdbcType=INTEGER},state = #{record.state,jdbcType=VARCHAR},featured = #{record.featured,jdbcType=TINYINT},style = #{record.style,jdbcType=VARCHAR}<if test="_parameter != null" ><include refid="Update_By_Example_Where_Clause" /></if></update>
</mapper>

AuthorMapper.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- 为这个mapper指定一个唯一的namespace,namespace的值习惯上设置成包名+sql映射文件名,这样就能够保证namespace的值是唯一的
例如namespace="me.gacl.mapping.userMapper"就是me.gacl.mapping(包名)+userMapper(userMapper.xml文件去除后缀)-->
<mapper namespace="com.geyao.mybatis.mapper.AuthorMapper"><resultMap type="Author" id="authorResultMap"><id column="id" property="id" jdbcType="INTEGER"></id></resultMap><select id="selectAuthorById" parameterType="int" resultMap="authorResultMap">select * from author where id=#{id}</select>
</mapper>

AuthorMapper类

package com.geyao.mybatis.mapper;import com.geyao.mybatis.pojo.Author;
public interface AuthorMapper {Author selectAuthorById(Integer id);
}

BlogAuthorMapperCustom.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.geyao.mybatis.mapper.BlogMapperCustom" >
<sql id="baseColumn">b.`id`,b.`title`,b.`state`,b.`featured`,b.`style`,a.username as authorUsername</sql><select id="selectBlogById" parameterType="int" resultType="BlogCustom">select<include refid="baseColumn"></include>from blog bleft join author aon b.author =a.idwhere b.id=#{id}</select>
</mapper>

BlogMapperCustom类

package com.geyao.mybatis.mapper;import com.geyao.mybatis.mvo.BlogCustom;public interface BlogMapperCustom {BlogCustom selectBlogById(Integer id);
}

com.geyao.mybatis.pojo

Blog

package com.geyao.mybatis.pojo;public class Blog {private Integer id;private String title;private Integer authodId;private String state;private Byte featured;private String style;public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}public String getTitle() {return title;}public void setTitle(String title) {this.title = title == null ? null : title.trim();}public Integer getAuthodId() {return authodId;}public void setAuthodId(Integer authodId) {this.authodId = authodId;}public String getState() {return state;}public void setState(String state) {this.state = state == null ? null : state.trim();}public Byte getFeatured() {return featured;}public void setFeatured(Byte featured) {this.featured = featured;}public String getStyle() {return style;}public void setStyle(String style) {this.style = style == null ? null : style.trim();}
}

BlogExample

package com.geyao.mybatis.pojo;import java.util.ArrayList;
import java.util.List;public class BlogExample {protected String orderByClause;protected boolean distinct;protected List<Criteria> oredCriteria;public BlogExample() {oredCriteria = new ArrayList<Criteria>();}public void setOrderByClause(String orderByClause) {this.orderByClause = orderByClause;}public String getOrderByClause() {return orderByClause;}public void setDistinct(boolean distinct) {this.distinct = distinct;}public boolean isDistinct() {return distinct;}public List<Criteria> getOredCriteria() {return oredCriteria;}public void or(Criteria criteria) {oredCriteria.add(criteria);}public Criteria or() {Criteria criteria = createCriteriaInternal();oredCriteria.add(criteria);return criteria;}public Criteria createCriteria() {Criteria criteria = createCriteriaInternal();if (oredCriteria.size() == 0) {oredCriteria.add(criteria);}return criteria;}protected Criteria createCriteriaInternal() {Criteria criteria = new Criteria();return criteria;}public void clear() {oredCriteria.clear();orderByClause = null;distinct = false;}protected abstract static class GeneratedCriteria {protected List<Criterion> criteria;protected GeneratedCriteria() {super();criteria = new ArrayList<Criterion>();}public boolean isValid() {return criteria.size() > 0;}public List<Criterion> getAllCriteria() {return criteria;}public List<Criterion> getCriteria() {return criteria;}protected void addCriterion(String condition) {if (condition == null) {throw new RuntimeException("Value for condition cannot be null");}criteria.add(new Criterion(condition));}protected void addCriterion(String condition, Object value, String property) {if (value == null) {throw new RuntimeException("Value for " + property + " cannot be null");}criteria.add(new Criterion(condition, value));}protected void addCriterion(String condition, Object value1, Object value2, String property) {if (value1 == null || value2 == null) {throw new RuntimeException("Between values for " + property + " cannot be null");}criteria.add(new Criterion(condition, value1, value2));}public Criteria andIdIsNull() {addCriterion("id is null");return (Criteria) this;}public Criteria andIdIsNotNull() {addCriterion("id is not null");return (Criteria) this;}public Criteria andIdEqualTo(Integer value) {addCriterion("id =", value, "id");return (Criteria) this;}public Criteria andIdNotEqualTo(Integer value) {addCriterion("id <>", value, "id");return (Criteria) this;}public Criteria andIdGreaterThan(Integer value) {addCriterion("id >", value, "id");return (Criteria) this;}public Criteria andIdGreaterThanOrEqualTo(Integer value) {addCriterion("id >=", value, "id");return (Criteria) this;}public Criteria andIdLessThan(Integer value) {addCriterion("id <", value, "id");return (Criteria) this;}public Criteria andIdLessThanOrEqualTo(Integer value) {addCriterion("id <=", value, "id");return (Criteria) this;}public Criteria andIdIn(List<Integer> values) {addCriterion("id in", values, "id");return (Criteria) this;}public Criteria andIdNotIn(List<Integer> values) {addCriterion("id not in", values, "id");return (Criteria) this;}public Criteria andIdBetween(Integer value1, Integer value2) {addCriterion("id between", value1, value2, "id");return (Criteria) this;}public Criteria andIdNotBetween(Integer value1, Integer value2) {addCriterion("id not between", value1, value2, "id");return (Criteria) this;}public Criteria andTitleIsNull() {addCriterion("title is null");return (Criteria) this;}public Criteria andTitleIsNotNull() {addCriterion("title is not null");return (Criteria) this;}public Criteria andTitleEqualTo(String value) {addCriterion("title =", value, "title");return (Criteria) this;}public Criteria andTitleNotEqualTo(String value) {addCriterion("title <>", value, "title");return (Criteria) this;}public Criteria andTitleGreaterThan(String value) {addCriterion("title >", value, "title");return (Criteria) this;}public Criteria andTitleGreaterThanOrEqualTo(String value) {addCriterion("title >=", value, "title");return (Criteria) this;}public Criteria andTitleLessThan(String value) {addCriterion("title <", value, "title");return (Criteria) this;}public Criteria andTitleLessThanOrEqualTo(String value) {addCriterion("title <=", value, "title");return (Criteria) this;}public Criteria andTitleLike(String value) {addCriterion("title like", value, "title");return (Criteria) this;}public Criteria andTitleNotLike(String value) {addCriterion("title not like", value, "title");return (Criteria) this;}public Criteria andTitleIn(List<String> values) {addCriterion("title in", values, "title");return (Criteria) this;}public Criteria andTitleNotIn(List<String> values) {addCriterion("title not in", values, "title");return (Criteria) this;}public Criteria andTitleBetween(String value1, String value2) {addCriterion("title between", value1, value2, "title");return (Criteria) this;}public Criteria andTitleNotBetween(String value1, String value2) {addCriterion("title not between", value1, value2, "title");return (Criteria) this;}public Criteria andAuthodIdIsNull() {addCriterion("authod_id is null");return (Criteria) this;}public Criteria andAuthodIdIsNotNull() {addCriterion("authod_id is not null");return (Criteria) this;}public Criteria andAuthodIdEqualTo(Integer value) {addCriterion("authod_id =", value, "authodId");return (Criteria) this;}public Criteria andAuthodIdNotEqualTo(Integer value) {addCriterion("authod_id <>", value, "authodId");return (Criteria) this;}public Criteria andAuthodIdGreaterThan(Integer value) {addCriterion("authod_id >", value, "authodId");return (Criteria) this;}public Criteria andAuthodIdGreaterThanOrEqualTo(Integer value) {addCriterion("authod_id >=", value, "authodId");return (Criteria) this;}public Criteria andAuthodIdLessThan(Integer value) {addCriterion("authod_id <", value, "authodId");return (Criteria) this;}public Criteria andAuthodIdLessThanOrEqualTo(Integer value) {addCriterion("authod_id <=", value, "authodId");return (Criteria) this;}public Criteria andAuthodIdIn(List<Integer> values) {addCriterion("authod_id in", values, "authodId");return (Criteria) this;}public Criteria andAuthodIdNotIn(List<Integer> values) {addCriterion("authod_id not in", values, "authodId");return (Criteria) this;}public Criteria andAuthodIdBetween(Integer value1, Integer value2) {addCriterion("authod_id between", value1, value2, "authodId");return (Criteria) this;}public Criteria andAuthodIdNotBetween(Integer value1, Integer value2) {addCriterion("authod_id not between", value1, value2, "authodId");return (Criteria) this;}public Criteria andStateIsNull() {addCriterion("state is null");return (Criteria) this;}public Criteria andStateIsNotNull() {addCriterion("state is not null");return (Criteria) this;}public Criteria andStateEqualTo(String value) {addCriterion("state =", value, "state");return (Criteria) this;}public Criteria andStateNotEqualTo(String value) {addCriterion("state <>", value, "state");return (Criteria) this;}public Criteria andStateGreaterThan(String value) {addCriterion("state >", value, "state");return (Criteria) this;}public Criteria andStateGreaterThanOrEqualTo(String value) {addCriterion("state >=", value, "state");return (Criteria) this;}public Criteria andStateLessThan(String value) {addCriterion("state <", value, "state");return (Criteria) this;}public Criteria andStateLessThanOrEqualTo(String value) {addCriterion("state <=", value, "state");return (Criteria) this;}public Criteria andStateLike(String value) {addCriterion("state like", value, "state");return (Criteria) this;}public Criteria andStateNotLike(String value) {addCriterion("state not like", value, "state");return (Criteria) this;}public Criteria andStateIn(List<String> values) {addCriterion("state in", values, "state");return (Criteria) this;}public Criteria andStateNotIn(List<String> values) {addCriterion("state not in", values, "state");return (Criteria) this;}public Criteria andStateBetween(String value1, String value2) {addCriterion("state between", value1, value2, "state");return (Criteria) this;}public Criteria andStateNotBetween(String value1, String value2) {addCriterion("state not between", value1, value2, "state");return (Criteria) this;}public Criteria andFeaturedIsNull() {addCriterion("featured is null");return (Criteria) this;}public Criteria andFeaturedIsNotNull() {addCriterion("featured is not null");return (Criteria) this;}public Criteria andFeaturedEqualTo(Byte value) {addCriterion("featured =", value, "featured");return (Criteria) this;}public Criteria andFeaturedNotEqualTo(Byte value) {addCriterion("featured <>", value, "featured");return (Criteria) this;}public Criteria andFeaturedGreaterThan(Byte value) {addCriterion("featured >", value, "featured");return (Criteria) this;}public Criteria andFeaturedGreaterThanOrEqualTo(Byte value) {addCriterion("featured >=", value, "featured");return (Criteria) this;}public Criteria andFeaturedLessThan(Byte value) {addCriterion("featured <", value, "featured");return (Criteria) this;}public Criteria andFeaturedLessThanOrEqualTo(Byte value) {addCriterion("featured <=", value, "featured");return (Criteria) this;}public Criteria andFeaturedIn(List<Byte> values) {addCriterion("featured in", values, "featured");return (Criteria) this;}public Criteria andFeaturedNotIn(List<Byte> values) {addCriterion("featured not in", values, "featured");return (Criteria) this;}public Criteria andFeaturedBetween(Byte value1, Byte value2) {addCriterion("featured between", value1, value2, "featured");return (Criteria) this;}public Criteria andFeaturedNotBetween(Byte value1, Byte value2) {addCriterion("featured not between", value1, value2, "featured");return (Criteria) this;}public Criteria andStyleIsNull() {addCriterion("style is null");return (Criteria) this;}public Criteria andStyleIsNotNull() {addCriterion("style is not null");return (Criteria) this;}public Criteria andStyleEqualTo(String value) {addCriterion("style =", value, "style");return (Criteria) this;}public Criteria andStyleNotEqualTo(String value) {addCriterion("style <>", value, "style");return (Criteria) this;}public Criteria andStyleGreaterThan(String value) {addCriterion("style >", value, "style");return (Criteria) this;}public Criteria andStyleGreaterThanOrEqualTo(String value) {addCriterion("style >=", value, "style");return (Criteria) this;}public Criteria andStyleLessThan(String value) {addCriterion("style <", value, "style");return (Criteria) this;}public Criteria andStyleLessThanOrEqualTo(String value) {addCriterion("style <=", value, "style");return (Criteria) this;}public Criteria andStyleLike(String value) {addCriterion("style like", value, "style");return (Criteria) this;}public Criteria andStyleNotLike(String value) {addCriterion("style not like", value, "style");return (Criteria) this;}public Criteria andStyleIn(List<String> values) {addCriterion("style in", values, "style");return (Criteria) this;}public Criteria andStyleNotIn(List<String> values) {addCriterion("style not in", values, "style");return (Criteria) this;}public Criteria andStyleBetween(String value1, String value2) {addCriterion("style between", value1, value2, "style");return (Criteria) this;}public Criteria andStyleNotBetween(String value1, String value2) {addCriterion("style not between", value1, value2, "style");return (Criteria) this;}}public static class Criteria extends GeneratedCriteria {protected Criteria() {super();}}public static class Criterion {private String condition;private Object value;private Object secondValue;private boolean noValue;private boolean singleValue;private boolean betweenValue;private boolean listValue;private String typeHandler;public String getCondition() {return condition;}public Object getValue() {return value;}public Object getSecondValue() {return secondValue;}public boolean isNoValue() {return noValue;}public boolean isSingleValue() {return singleValue;}public boolean isBetweenValue() {return betweenValue;}public boolean isListValue() {return listValue;}public String getTypeHandler() {return typeHandler;}protected Criterion(String condition) {super();this.condition = condition;this.typeHandler = null;this.noValue = true;}protected Criterion(String condition, Object value, String typeHandler) {super();this.condition = condition;this.value = value;this.typeHandler = typeHandler;if (value instanceof List<?>) {this.listValue = true;} else {this.singleValue = true;}}protected Criterion(String condition, Object value) {this(condition, value, null);}protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {super();this.condition = condition;this.value = value;this.secondValue = secondValue;this.typeHandler = typeHandler;this.betweenValue = true;}protected Criterion(String condition, Object value, Object secondValue) {this(condition, value, secondValue, null);}}
}

Aothor类

package com.geyao.mybatis.pojo;public class Author {private Integer id;private String username;private String password;private String email;private String bio;private String favouriteSection;private String nickname;private String realname;public Author() {super();}public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}public String getPassword() {return password;}public void setPassword(String password) {this.password = password;}public String getEmail() {return email;}public void setEmail(String email) {this.email = email;}public String getBio() {return bio;}public void setBio(String bio) {this.bio = bio;}public String getFavouriteSection() {return favouriteSection;}public void setFavouriteSection(String favouriteSection) {this.favouriteSection = favouriteSection;}public String getNickname() {return nickname;}public void setNickname(String nickname) {this.nickname = nickname;}public String getRealname() {return realname;}public void setRealname(String realname) {this.realname = realname;}public Author(Integer id, String username, String password, String email, String bio, String favouriteSection,String nickname, String realname) {super();this.id = id;this.username = username;this.password = password;this.email = email;this.bio = bio;this.favouriteSection = favouriteSection;this.nickname = nickname;this.realname = realname;}@Overridepublic String toString() {return "Author [id=" + id + ", username=" + username + ", password=" + password + ", email=" + email + ", bio="+ bio + ", favouriteSection=" + favouriteSection + ", nickname=" + nickname + ", realname=" + realname+ "]";}}

AuthorExample

package com.geyao.mybatis.pojo;import java.util.ArrayList;
import java.util.List;public class AuthorExample {protected String orderByClause;protected boolean distinct;protected List<Criteria> oredCriteria;public AuthorExample() {oredCriteria = new ArrayList<Criteria>();}public void setOrderByClause(String orderByClause) {this.orderByClause = orderByClause;}public String getOrderByClause() {return orderByClause;}public void setDistinct(boolean distinct) {this.distinct = distinct;}public boolean isDistinct() {return distinct;}public List<Criteria> getOredCriteria() {return oredCriteria;}public void or(Criteria criteria) {oredCriteria.add(criteria);}public Criteria or() {Criteria criteria = createCriteriaInternal();oredCriteria.add(criteria);return criteria;}public Criteria createCriteria() {Criteria criteria = createCriteriaInternal();if (oredCriteria.size() == 0) {oredCriteria.add(criteria);}return criteria;}protected Criteria createCriteriaInternal() {Criteria criteria = new Criteria();return criteria;}public void clear() {oredCriteria.clear();orderByClause = null;distinct = false;}protected abstract static class GeneratedCriteria {protected List<Criterion> criteria;protected GeneratedCriteria() {super();criteria = new ArrayList<Criterion>();}public boolean isValid() {return criteria.size() > 0;}public List<Criterion> getAllCriteria() {return criteria;}public List<Criterion> getCriteria() {return criteria;}protected void addCriterion(String condition) {if (condition == null) {throw new RuntimeException("Value for condition cannot be null");}criteria.add(new Criterion(condition));}protected void addCriterion(String condition, Object value, String property) {if (value == null) {throw new RuntimeException("Value for " + property + " cannot be null");}criteria.add(new Criterion(condition, value));}protected void addCriterion(String condition, Object value1, Object value2, String property) {if (value1 == null || value2 == null) {throw new RuntimeException("Between values for " + property + " cannot be null");}criteria.add(new Criterion(condition, value1, value2));}public Criteria andIdIsNull() {addCriterion("id is null");return (Criteria) this;}public Criteria andIdIsNotNull() {addCriterion("id is not null");return (Criteria) this;}public Criteria andIdEqualTo(Integer value) {addCriterion("id =", value, "id");return (Criteria) this;}public Criteria andIdNotEqualTo(Integer value) {addCriterion("id <>", value, "id");return (Criteria) this;}public Criteria andIdGreaterThan(Integer value) {addCriterion("id >", value, "id");return (Criteria) this;}public Criteria andIdGreaterThanOrEqualTo(Integer value) {addCriterion("id >=", value, "id");return (Criteria) this;}public Criteria andIdLessThan(Integer value) {addCriterion("id <", value, "id");return (Criteria) this;}public Criteria andIdLessThanOrEqualTo(Integer value) {addCriterion("id <=", value, "id");return (Criteria) this;}public Criteria andIdIn(List<Integer> values) {addCriterion("id in", values, "id");return (Criteria) this;}public Criteria andIdNotIn(List<Integer> values) {addCriterion("id not in", values, "id");return (Criteria) this;}public Criteria andIdBetween(Integer value1, Integer value2) {addCriterion("id between", value1, value2, "id");return (Criteria) this;}public Criteria andIdNotBetween(Integer value1, Integer value2) {addCriterion("id not between", value1, value2, "id");return (Criteria) this;}public Criteria andUsernameIsNull() {addCriterion("username is null");return (Criteria) this;}public Criteria andUsernameIsNotNull() {addCriterion("username is not null");return (Criteria) this;}public Criteria andUsernameEqualTo(String value) {addCriterion("username =", value, "username");return (Criteria) this;}public Criteria andUsernameNotEqualTo(String value) {addCriterion("username <>", value, "username");return (Criteria) this;}public Criteria andUsernameGreaterThan(String value) {addCriterion("username >", value, "username");return (Criteria) this;}public Criteria andUsernameGreaterThanOrEqualTo(String value) {addCriterion("username >=", value, "username");return (Criteria) this;}public Criteria andUsernameLessThan(String value) {addCriterion("username <", value, "username");return (Criteria) this;}public Criteria andUsernameLessThanOrEqualTo(String value) {addCriterion("username <=", value, "username");return (Criteria) this;}public Criteria andUsernameLike(String value) {addCriterion("username like", value, "username");return (Criteria) this;}public Criteria andUsernameNotLike(String value) {addCriterion("username not like", value, "username");return (Criteria) this;}public Criteria andUsernameIn(List<String> values) {addCriterion("username in", values, "username");return (Criteria) this;}public Criteria andUsernameNotIn(List<String> values) {addCriterion("username not in", values, "username");return (Criteria) this;}public Criteria andUsernameBetween(String value1, String value2) {addCriterion("username between", value1, value2, "username");return (Criteria) this;}public Criteria andUsernameNotBetween(String value1, String value2) {addCriterion("username not between", value1, value2, "username");return (Criteria) this;}public Criteria andPasswordIsNull() {addCriterion("password is null");return (Criteria) this;}public Criteria andPasswordIsNotNull() {addCriterion("password is not null");return (Criteria) this;}public Criteria andPasswordEqualTo(String value) {addCriterion("password =", value, "password");return (Criteria) this;}public Criteria andPasswordNotEqualTo(String value) {addCriterion("password <>", value, "password");return (Criteria) this;}public Criteria andPasswordGreaterThan(String value) {addCriterion("password >", value, "password");return (Criteria) this;}public Criteria andPasswordGreaterThanOrEqualTo(String value) {addCriterion("password >=", value, "password");return (Criteria) this;}public Criteria andPasswordLessThan(String value) {addCriterion("password <", value, "password");return (Criteria) this;}public Criteria andPasswordLessThanOrEqualTo(String value) {addCriterion("password <=", value, "password");return (Criteria) this;}public Criteria andPasswordLike(String value) {addCriterion("password like", value, "password");return (Criteria) this;}public Criteria andPasswordNotLike(String value) {addCriterion("password not like", value, "password");return (Criteria) this;}public Criteria andPasswordIn(List<String> values) {addCriterion("password in", values, "password");return (Criteria) this;}public Criteria andPasswordNotIn(List<String> values) {addCriterion("password not in", values, "password");return (Criteria) this;}public Criteria andPasswordBetween(String value1, String value2) {addCriterion("password between", value1, value2, "password");return (Criteria) this;}public Criteria andPasswordNotBetween(String value1, String value2) {addCriterion("password not between", value1, value2, "password");return (Criteria) this;}public Criteria andEmailIsNull() {addCriterion("email is null");return (Criteria) this;}public Criteria andEmailIsNotNull() {addCriterion("email is not null");return (Criteria) this;}public Criteria andEmailEqualTo(String value) {addCriterion("email =", value, "email");return (Criteria) this;}public Criteria andEmailNotEqualTo(String value) {addCriterion("email <>", value, "email");return (Criteria) this;}public Criteria andEmailGreaterThan(String value) {addCriterion("email >", value, "email");return (Criteria) this;}public Criteria andEmailGreaterThanOrEqualTo(String value) {addCriterion("email >=", value, "email");return (Criteria) this;}public Criteria andEmailLessThan(String value) {addCriterion("email <", value, "email");return (Criteria) this;}public Criteria andEmailLessThanOrEqualTo(String value) {addCriterion("email <=", value, "email");return (Criteria) this;}public Criteria andEmailLike(String value) {addCriterion("email like", value, "email");return (Criteria) this;}public Criteria andEmailNotLike(String value) {addCriterion("email not like", value, "email");return (Criteria) this;}public Criteria andEmailIn(List<String> values) {addCriterion("email in", values, "email");return (Criteria) this;}public Criteria andEmailNotIn(List<String> values) {addCriterion("email not in", values, "email");return (Criteria) this;}public Criteria andEmailBetween(String value1, String value2) {addCriterion("email between", value1, value2, "email");return (Criteria) this;}public Criteria andEmailNotBetween(String value1, String value2) {addCriterion("email not between", value1, value2, "email");return (Criteria) this;}public Criteria andBioIsNull() {addCriterion("bio is null");return (Criteria) this;}public Criteria andBioIsNotNull() {addCriterion("bio is not null");return (Criteria) this;}public Criteria andBioEqualTo(String value) {addCriterion("bio =", value, "bio");return (Criteria) this;}public Criteria andBioNotEqualTo(String value) {addCriterion("bio <>", value, "bio");return (Criteria) this;}public Criteria andBioGreaterThan(String value) {addCriterion("bio >", value, "bio");return (Criteria) this;}public Criteria andBioGreaterThanOrEqualTo(String value) {addCriterion("bio >=", value, "bio");return (Criteria) this;}public Criteria andBioLessThan(String value) {addCriterion("bio <", value, "bio");return (Criteria) this;}public Criteria andBioLessThanOrEqualTo(String value) {addCriterion("bio <=", value, "bio");return (Criteria) this;}public Criteria andBioLike(String value) {addCriterion("bio like", value, "bio");return (Criteria) this;}public Criteria andBioNotLike(String value) {addCriterion("bio not like", value, "bio");return (Criteria) this;}public Criteria andBioIn(List<String> values) {addCriterion("bio in", values, "bio");return (Criteria) this;}public Criteria andBioNotIn(List<String> values) {addCriterion("bio not in", values, "bio");return (Criteria) this;}public Criteria andBioBetween(String value1, String value2) {addCriterion("bio between", value1, value2, "bio");return (Criteria) this;}public Criteria andBioNotBetween(String value1, String value2) {addCriterion("bio not between", value1, value2, "bio");return (Criteria) this;}public Criteria andFavouritesectionIsNull() {addCriterion("favouriteSection is null");return (Criteria) this;}public Criteria andFavouritesectionIsNotNull() {addCriterion("favouriteSection is not null");return (Criteria) this;}public Criteria andFavouritesectionEqualTo(String value) {addCriterion("favouriteSection =", value, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionNotEqualTo(String value) {addCriterion("favouriteSection <>", value, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionGreaterThan(String value) {addCriterion("favouriteSection >", value, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionGreaterThanOrEqualTo(String value) {addCriterion("favouriteSection >=", value, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionLessThan(String value) {addCriterion("favouriteSection <", value, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionLessThanOrEqualTo(String value) {addCriterion("favouriteSection <=", value, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionLike(String value) {addCriterion("favouriteSection like", value, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionNotLike(String value) {addCriterion("favouriteSection not like", value, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionIn(List<String> values) {addCriterion("favouriteSection in", values, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionNotIn(List<String> values) {addCriterion("favouriteSection not in", values, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionBetween(String value1, String value2) {addCriterion("favouriteSection between", value1, value2, "favouritesection");return (Criteria) this;}public Criteria andFavouritesectionNotBetween(String value1, String value2) {addCriterion("favouriteSection not between", value1, value2, "favouritesection");return (Criteria) this;}public Criteria andNicknameIsNull() {addCriterion("nickname is null");return (Criteria) this;}public Criteria andNicknameIsNotNull() {addCriterion("nickname is not null");return (Criteria) this;}public Criteria andNicknameEqualTo(String value) {addCriterion("nickname =", value, "nickname");return (Criteria) this;}public Criteria andNicknameNotEqualTo(String value) {addCriterion("nickname <>", value, "nickname");return (Criteria) this;}public Criteria andNicknameGreaterThan(String value) {addCriterion("nickname >", value, "nickname");return (Criteria) this;}public Criteria andNicknameGreaterThanOrEqualTo(String value) {addCriterion("nickname >=", value, "nickname");return (Criteria) this;}public Criteria andNicknameLessThan(String value) {addCriterion("nickname <", value, "nickname");return (Criteria) this;}public Criteria andNicknameLessThanOrEqualTo(String value) {addCriterion("nickname <=", value, "nickname");return (Criteria) this;}public Criteria andNicknameLike(String value) {addCriterion("nickname like", value, "nickname");return (Criteria) this;}public Criteria andNicknameNotLike(String value) {addCriterion("nickname not like", value, "nickname");return (Criteria) this;}public Criteria andNicknameIn(List<String> values) {addCriterion("nickname in", values, "nickname");return (Criteria) this;}public Criteria andNicknameNotIn(List<String> values) {addCriterion("nickname not in", values, "nickname");return (Criteria) this;}public Criteria andNicknameBetween(String value1, String value2) {addCriterion("nickname between", value1, value2, "nickname");return (Criteria) this;}public Criteria andNicknameNotBetween(String value1, String value2) {addCriterion("nickname not between", value1, value2, "nickname");return (Criteria) this;}public Criteria andRealnameIsNull() {addCriterion("realname is null");return (Criteria) this;}public Criteria andRealnameIsNotNull() {addCriterion("realname is not null");return (Criteria) this;}public Criteria andRealnameEqualTo(String value) {addCriterion("realname =", value, "realname");return (Criteria) this;}public Criteria andRealnameNotEqualTo(String value) {addCriterion("realname <>", value, "realname");return (Criteria) this;}public Criteria andRealnameGreaterThan(String value) {addCriterion("realname >", value, "realname");return (Criteria) this;}public Criteria andRealnameGreaterThanOrEqualTo(String value) {addCriterion("realname >=", value, "realname");return (Criteria) this;}public Criteria andRealnameLessThan(String value) {addCriterion("realname <", value, "realname");return (Criteria) this;}public Criteria andRealnameLessThanOrEqualTo(String value) {addCriterion("realname <=", value, "realname");return (Criteria) this;}public Criteria andRealnameLike(String value) {addCriterion("realname like", value, "realname");return (Criteria) this;}public Criteria andRealnameNotLike(String value) {addCriterion("realname not like", value, "realname");return (Criteria) this;}public Criteria andRealnameIn(List<String> values) {addCriterion("realname in", values, "realname");return (Criteria) this;}public Criteria andRealnameNotIn(List<String> values) {addCriterion("realname not in", values, "realname");return (Criteria) this;}public Criteria andRealnameBetween(String value1, String value2) {addCriterion("realname between", value1, value2, "realname");return (Criteria) this;}public Criteria andRealnameNotBetween(String value1, String value2) {addCriterion("realname not between", value1, value2, "realname");return (Criteria) this;}}public static class Criteria extends GeneratedCriteria {protected Criteria() {super();}}public static class Criterion {private String condition;private Object value;private Object secondValue;private boolean noValue;private boolean singleValue;private boolean betweenValue;private boolean listValue;private String typeHandler;public String getCondition() {return condition;}public Object getValue() {return value;}public Object getSecondValue() {return secondValue;}public boolean isNoValue() {return noValue;}public boolean isSingleValue() {return singleValue;}public boolean isBetweenValue() {return betweenValue;}public boolean isListValue() {return listValue;}public String getTypeHandler() {return typeHandler;}protected Criterion(String condition) {super();this.condition = condition;this.typeHandler = null;this.noValue = true;}protected Criterion(String condition, Object value, String typeHandler) {super();this.condition = condition;this.value = value;this.typeHandler = typeHandler;if (value instanceof List<?>) {this.listValue = true;} else {this.singleValue = true;}}protected Criterion(String condition, Object value) {this(condition, value, null);}protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {super();this.condition = condition;this.value = value;this.secondValue = secondValue;this.typeHandler = typeHandler;this.betweenValue = true;}protected Criterion(String condition, Object value, Object secondValue) {this(condition, value, secondValue, null);}}
}

com.geyao.mybatis.mvo

BlogCustom

package com.geyao.mybatis.mvo;import com.geyao.mybatis.pojo.Blog;public class BlogCustom extends Blog {private String authorUsername;public String getAuthorUsername() {return authorUsername;}public void setAuthorUsername(String authorUsername) {this.authorUsername = authorUsername;}}

com.geyao.mybatis.util

MybatisUtil

package com.geyao.mybatis.util;import java.io.InputStream;
import java.io.Reader;import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;public class MyBatisUtil {private static SqlSessionFactory sqlSessionFactory =null;static {try {InputStream in = Resources.getResourceAsStream("mybatis-config.xml");sqlSessionFactory = new SqlSessionFactoryBuilder().build(in);} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}}private MyBatisUtil() {}public static SqlSession getSqlSession() {return sqlSessionFactory.openSession();}
}

com.geyao.mybatis.mapper

BlogMapperCustomTest

package com.geyao.mybatis.mapper;import java.util.ArrayList;
import java.util.List;import org.apache.ibatis.session.SqlSession;
import org.junit.Test;import com.geyao.mybatis.mvo.BlogCustom;import com.geyao.mybatis.util.MyBatisUtil;public class BlogMapperCustomTest {@Testpublic void testselectBlogById() {SqlSession session =MyBatisUtil.getSqlSession();BlogMapperCustom blogMapper =session.getMapper(BlogMapperCustom.class);BlogCustom blog=blogMapper.selectBlogById(1);session.close();System.out.println(blog);}
}

运行结果

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/423720.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

统计HDFS文件数量,大小,以及在某范围大小的文件数量

统计HDFS文件数量大小&#xff0c;小于20M文件数量 hadoop fs -du -h / # 统计文件大小hadoop fs -count / # 统计文件数量&#xff0c;返回的数据是目录个数&#xff0c;文件个数&#xff0c;文件总计大小&#xff0c;输入路径hadoop fs -ls -R /path/data | grep ^- > ~/d…

mybatis学习(53):构造方法映射

数据库表 数据库叫blog_gp1701 author表 数据 blog表 数据 comment表 数据 post表 数据 目录结构 jar包导入 先给对应的jar包导入 建立一个junit单元测试 配置文件 log4j.properties ### \u914D\u7F6E\u6839 ### log4j.rootLogger debug,console ,fileAppender,dailyRo…

python 实现统计ftp服务器指定目录下文件夹数目、文件数目及所有文件大小 本次主要为满足应用方核对上传到ftp服务器的文件是否缺漏。 主要要求:指定目录下,文件夹数目/文件数目/所有文件大小

python 实现统计ftp服务器指定目录下文件夹数目、文件数目及所有文件大小 本次主要为满足应用方核对上传到ftp服务器的文件是否缺漏。 主要要求&#xff1a;指定目录下&#xff0c;文件夹数目/文件数目/所有文件大小&#xff0c;类似Windows如下功能&#xff1a; 模块介绍&…

Linux 内核编码风格【转】

原文&#xff1a;http://www.cnblogs.com/baochuan/archive/2013/04/08/3006615.htmlLinux 内核编码风格序像其他大型软件一样&#xff0c;Linux制订了一套编码风格&#xff0c;对代码的格式、风格和布局做出了规定。我写这篇的目的也就是希望大家能够从中借鉴&#xff0c;有利…

mybatis学习(54):鉴定器

数据库表 数据库叫blog_gp1701 author表 数据 blog表 数据 comment表 数据 post表 数据 vechcle 目录结构 jar包导入 先给对应的jar包导入 建立一个junit单元测试 配置文件 log4j.properties ### \u914D\u7F6E\u6839 ### log4j.rootLogger debug,console ,fileAppender…

hadoop fs:du统计hdfs文件(目录下文件)大小的用法

hadoop fs:du统计hdfs文件&#xff08;目录下文件&#xff09;大小的用法 hadoop fs 更多用法&#xff0c;请参考官网&#xff1a;http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_shell.html 以下是我的使用统计文件时使用的记录&#xff1a; [tdv00938 ~]$ hadoop fs -ls /jc_…

sqoop操作之Oracle导入到HDFS

导入表的所有字段 sqoop import --connect jdbc:oracle:thin:192.168.1.100:1521:ORCL \ --username SCOTT --password tiger \ --table EMP -m 1; 查看执行结果&#xff1a; hadoop fs -cat /user/hadoop/EMP/part-m-00000 7369,SMITH,CLERK,7902,1980-12-17 00:00:00.0,800,n…

ps学习1:去除图片上的文字

首先我们看到如图所示的图&#xff0c;这个时候我们要给他右上角的文字去除 首先打开我们的ps工具--我登陆的在线ps教程 https://www.uupoop.com/ 点击编辑---填充 保存 完成修改

Java面试题16 牛客 以下java程序代码,执行后的结果是()

Java面试题16 牛客 以下java程序代码&#xff0c;执行后的结果是&#xff08;&#xff09; 1 2 3 4 5 6 7 8 9 10 public class Test { public static void main(String[] args) { Object o new Object() { public boolean equals(Object o…

Hive压缩说明

为什么要压缩 在Hive中对中间数据或最终数据做压缩&#xff0c;是提高数据吞吐量和性能的一种手段。对数据做压缩&#xff0c;可以大量减少磁盘的存储空间&#xff0c;比如基于文本的数据文件&#xff0c;可以将文件压缩40%或更多。同时压缩后的文件在磁盘间传输和I/O也会大大减…

kubelet源码学习(一):kubelet工作原理、kubelet启动过程

本文基于Kubernetes v1.22.4版本进行源码学习 1、kubelet工作原理 1&#xff09;、kubelet核心工作 kubelet的工作核心就是一个控制循环&#xff0c;即&#xff1a;SyncLoop&#xff08;图中的大圆圈&#xff09;。而驱动这个控制循环运行的事件&#xff0c;包括&#xff1a;P…

Java面试题18 牛客 假定Base b = new Derived();

Java面试题18 牛客 假定Base b new Derived&#xff08;&#xff09;; 调用执行b.methodOne&#xff08;&#xff09;后&#xff0c;输出结果是什么&#xff1f; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 public class Base { public…

ReactOS,硬件抽象层,HAL概述

分析环境reactos0.3.4 &#xff0c;i386体系] ReactOS的硬件抽象层 HAL(Hardware Abstraction Layer)位于OS与硬件的中间&#xff0c;和windows的hal原理基本一致&#xff0c;硬件抽象层隐藏特定平台的硬件接口细节&#xff0c;为上层的系统提供标准的稳定的虚拟硬件平台&…

[给ASP.NET 初学者的话]不要练功练了三年,才发现自己必须「砍掉重练」!....学习ASP.NET之前,请先把自己杯中的水倒掉...

这是我的文章备份&#xff0c;原文请看&#xff1a; [给ASP.NET 初学者的话]不要练功练了三年&#xff0c;才发现自己必须「砍掉重练」&#xff01;....学习ASP.NET之前&#xff0c;请先把自己杯中的水倒掉 http://www.dotblogs.com.tw/mis2000lab/archive/2012/03/15/game_ove…

Java面试题19 牛客下面有关java的引用类型,说法正确的有?

Java面试题19下面有关java的引用类型&#xff0c;说法正确的有&#xff1f; A:对于一个对象来说&#xff0c;只要有强引用的存在&#xff0c;它就会一直存在于内存中 B&#xff1a;如果一个对象仅持有虚引用&#xff0c;那么它就和没有任何引用一样&#xff0c;在任何时候都可…

MapReduce运行机制

相关链接 MapReduce中Shuffle机制详解——Map端Shuffle链接 MapReduce中Shuffle机制详解——Reduce端Shuffle链接MapReduce将作业job的整个运行过程分为两个阶段&#xff1a;Map阶段和Reduce阶段。按照时间顺序包括&#xff1a;输入分片&#xff08;input split&#xff09;、m…

WebService Software Factory 设计草图

以下是根据WSSF设计理念&#xff0c;按现公司的业务需求设计的接口项目拟稿&#xff0c;实现细分。仅供参考。&#xff08;WSSF---ASMX版&#xff09; 建议用1680*1050分辩浏览 转载于:https://www.cnblogs.com/RuiLei/archive/2008/10/05/1304160.html

Java面试题 20在面向对象编程里,经常使用is-a来说明对象之间的继承关系

Java面试题 20在面向对象编程里&#xff0c;经常使用is-a来说明对象之间的继承关系&#xff0c;下列对象中不具备继承关系的是&#xff1f;&#xff08;&#xff09; A:手机与小米手机 B&#xff1a;企业家与雷军 C:编程语言与Java D&#xff1a;中国与北京 类之间存在以下…

MapReduce计数器

原文链接&#xff1a;http://itfish.net/article/61067.html 1、MapReduce计数器是什么&#xff1f;计数器是用来记录job的执行进度和状态的。它的作用可以理解为日志。我们可以在程序的某个位置插入计数器&#xff0c;记录数据或者进度的变化情况。 2、MapReduce计数器能做什么…

编写“线围棋”程序-2-可开局

棋盘有了&#xff0c;怎么支持在上面落子呢&#xff1f; 只要解决下面3个问题就可以了&#xff1a; 1.响应鼠标点击事件&#xff0c;获得“下棋子”的动作源。 2.修改和记录棋局状态。 3.在棋盘上显示棋局的状态。 为此&#xff0c;直接增加一个“棋局类“&#xff0c;也就是对…