当前位置: 首页>>代码示例>>Java>>正文


Java Insert类代码示例

本文整理汇总了Java中org.apache.ibatis.annotations.Insert的典型用法代码示例。如果您正苦于以下问题:Java Insert类的具体用法?Java Insert怎么用?Java Insert使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Insert类属于org.apache.ibatis.annotations包,在下文中一共展示了Insert类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSqlCommandType

import org.apache.ibatis.annotations.Insert; //导入依赖的package包/类
private SqlCommandType getSqlCommandType(Method method) {
    Class<? extends Annotation> type = getSqlAnnotationType(method);

    if (type == null) {
        type = getSqlProviderAnnotationType(method);

        if (type == null) {
            return SqlCommandType.UNKNOWN;
        }

        if (type == SelectProvider.class) {
            type = Select.class;
        } else if (type == InsertProvider.class) {
            type = Insert.class;
        } else if (type == UpdateProvider.class) {
            type = Update.class;
        } else if (type == DeleteProvider.class) {
            type = Delete.class;
        }
    }

    return SqlCommandType.valueOf(type.getSimpleName().toUpperCase(Locale.ENGLISH));
}
 
开发者ID:Caratacus,项目名称:mybatis-plus-mini,代码行数:24,代码来源:MybatisMapperAnnotationBuilder.java

示例2: MapperAnnotationBuilder

import org.apache.ibatis.annotations.Insert; //导入依赖的package包/类
public MapperAnnotationBuilder(Configuration configuration, Class<?> type) {
  String resource = type.getName().replace('.', '/') + ".java (best guess)";
  this.assistant = new MapperBuilderAssistant(configuration, resource);
  this.configuration = configuration;
  this.type = type;

  sqlAnnotationTypes.add(Select.class);
  sqlAnnotationTypes.add(Insert.class);
  sqlAnnotationTypes.add(Update.class);
  sqlAnnotationTypes.add(Delete.class);

  sqlProviderAnnotationTypes.add(SelectProvider.class);
  sqlProviderAnnotationTypes.add(InsertProvider.class);
  sqlProviderAnnotationTypes.add(UpdateProvider.class);
  sqlProviderAnnotationTypes.add(DeleteProvider.class);
}
 
开发者ID:txazo,项目名称:mybatis,代码行数:17,代码来源:MapperAnnotationBuilder.java

示例3: getSqlCommandType

import org.apache.ibatis.annotations.Insert; //导入依赖的package包/类
private SqlCommandType getSqlCommandType(Method method) {
  Class<? extends Annotation> type = getSqlAnnotationType(method);

  if (type == null) {
    type = getSqlProviderAnnotationType(method);

    if (type == null) {
      return SqlCommandType.UNKNOWN;
    }

    if (type == SelectProvider.class) {
      type = Select.class;
    } else if (type == InsertProvider.class) {
      type = Insert.class;
    } else if (type == UpdateProvider.class) {
      type = Update.class;
    } else if (type == DeleteProvider.class) {
      type = Delete.class;
    }
  }

  return SqlCommandType.valueOf(type.getSimpleName().toUpperCase(Locale.ENGLISH));
}
 
开发者ID:txazo,项目名称:mybatis,代码行数:24,代码来源:MapperAnnotationBuilder.java

示例4: MybatisMapperAnnotationBuilder

import org.apache.ibatis.annotations.Insert; //导入依赖的package包/类
public MybatisMapperAnnotationBuilder(Configuration configuration, Class<?> type) {
    // 执行父类
    super(configuration, type);

    String resource = type.getName().replace('.', '/') + ".java (best guess)";
    this.assistant = new MapperBuilderAssistant(configuration, resource);
    this.configuration = configuration;
    this.type = type;

    sqlAnnotationTypes.add(Select.class);
    sqlAnnotationTypes.add(Insert.class);
    sqlAnnotationTypes.add(Update.class);
    sqlAnnotationTypes.add(Delete.class);

    sqlProviderAnnotationTypes.add(SelectProvider.class);
    sqlProviderAnnotationTypes.add(InsertProvider.class);
    sqlProviderAnnotationTypes.add(UpdateProvider.class);
    sqlProviderAnnotationTypes.add(DeleteProvider.class);
}
 
开发者ID:baomidou,项目名称:mybatis-plus,代码行数:20,代码来源:MybatisMapperAnnotationBuilder.java

示例5: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的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);
 
开发者ID:agwlvssainokuni,项目名称:sqlapp,代码行数:25,代码来源:MailLogMapper.java

示例6: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的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);
 
开发者ID:agwlvssainokuni,项目名称:sqlapp,代码行数:23,代码来源:SqltoolClauseMapper.java

示例7: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的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);
 
开发者ID:agwlvssainokuni,项目名称:sqlapp,代码行数:23,代码来源:AsyncProcessMapper.java

示例8: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的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);
 
开发者ID:agwlvssainokuni,项目名称:sqlapp,代码行数:19,代码来源:MailRcptMapper.java

示例9: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的package包/类
@Insert({
		"INSERT INTO conversion_test (",
		"joda_date, joda_time, joda_datetime, sec_str, sec_int, sec_long, sec_bigint, sec_bigdec, flag_code, deleted_flg",
		") VALUES (", //
		"#{jodaDate,jdbcType=DATE},", //
		"#{jodaTime,jdbcType=TIME},", //
		"#{jodaDatetime,jdbcType=TIMESTAMP},", //
		"#{secStr,jdbcType=VARCHAR},", //
		"#{secInt,jdbcType=VARCHAR},", //
		"#{secLong,jdbcType=VARCHAR},", //
		"#{secBigint,jdbcType=VARCHAR},", //
		"#{secBigdec,jdbcType=VARCHAR},", //
		"#{flagCode,jdbcType=INTEGER},", //
		"#{deletedFlg,jdbcType=INTEGER}", //
		")" })
@Options(useGeneratedKeys = true, keyProperty = "id")
int insert(ConversionTest record);
 
开发者ID:agwlvssainokuni,项目名称:sqlapp,代码行数:18,代码来源:ConversionTestMapper.java

示例10: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的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);
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:25,代码来源:MailLogMapper.java

示例11: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的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);
 
开发者ID:agwlvssainokuni,项目名称:springapp,代码行数:23,代码来源:ZipcdMasterMapper.java

示例12: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的package包/类
/**
 * This method was generated by MyBatis Generator.
 * This method corresponds to the database table m_crm_opportunity
 *
 * @mbg.generated Sat Oct 21 18:03:12 ICT 2017
 */
@Insert({
    "insert into m_crm_opportunity (id, opportunityName, ",
    "currencyid, accountid, ",
    "amount, type, source, ",
    "expectedClosedDate, campaignid, ",
    "nextStep, probability, ",
    "createdTime, createdUser, ",
    "sAccountId, assignUser, ",
    "opportunityType, salesStage, ",
    "lastUpdatedTime, avatarId, ",
    "description)",
    "values (#{id,jdbcType=INTEGER}, #{opportunityname,jdbcType=VARCHAR}, ",
    "#{currencyid,jdbcType=VARCHAR}, #{accountid,jdbcType=INTEGER}, ",
    "#{amount,jdbcType=DOUBLE}, #{type,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, ",
    "#{expectedcloseddate,jdbcType=TIMESTAMP}, #{campaignid,jdbcType=INTEGER}, ",
    "#{nextstep,jdbcType=VARCHAR}, #{probability,jdbcType=INTEGER}, ",
    "#{createdtime,jdbcType=TIMESTAMP}, #{createduser,jdbcType=VARCHAR}, ",
    "#{saccountid,jdbcType=INTEGER}, #{assignuser,jdbcType=VARCHAR}, ",
    "#{opportunitytype,jdbcType=VARCHAR}, #{salesstage,jdbcType=VARCHAR}, ",
    "#{lastupdatedtime,jdbcType=TIMESTAMP}, #{avatarid,jdbcType=VARCHAR}, ",
    "#{description,jdbcType=LONGVARCHAR})"
})
int insert(Opportunity record);
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:30,代码来源:OpportunityMapper.java

示例13: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的package包/类
/**
 * This method was generated by MyBatis Generator.
 * This method corresponds to the database table m_crm_campaign
 *
 * @mbg.generated Sat Oct 21 18:03:12 ICT 2017
 */
@Insert({
    "insert into m_crm_campaign (id, campaignName, ",
    "startDate, endDate, ",
    "currencyId, budget, ",
    "actualCost, expectedRevenue, ",
    "expectedCost, impression, ",
    "createdTime, createdUser, ",
    "sAccountId, status, ",
    "type, assignUser, ",
    "lastUpdatedTime, avatarId, ",
    "impressionnote, objective, ",
    "description)",
    "values (#{id,jdbcType=INTEGER}, #{campaignname,jdbcType=VARCHAR}, ",
    "#{startdate,jdbcType=TIMESTAMP}, #{enddate,jdbcType=TIMESTAMP}, ",
    "#{currencyid,jdbcType=VARCHAR}, #{budget,jdbcType=DOUBLE}, ",
    "#{actualcost,jdbcType=DOUBLE}, #{expectedrevenue,jdbcType=DOUBLE}, ",
    "#{expectedcost,jdbcType=DOUBLE}, #{impression,jdbcType=INTEGER}, ",
    "#{createdtime,jdbcType=TIMESTAMP}, #{createduser,jdbcType=VARCHAR}, ",
    "#{saccountid,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, ",
    "#{type,jdbcType=VARCHAR}, #{assignuser,jdbcType=VARCHAR}, ",
    "#{lastupdatedtime,jdbcType=TIMESTAMP}, #{avatarid,jdbcType=VARCHAR}, ",
    "#{impressionnote,jdbcType=LONGVARCHAR}, #{objective,jdbcType=LONGVARCHAR}, ",
    "#{description,jdbcType=LONGVARCHAR})"
})
int insert(CampaignWithBLOBs record);
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:32,代码来源:CampaignMapper.java

示例14: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的package包/类
/**
 * This method was generated by MyBatis Generator.
 * This method corresponds to the database table m_crm_customer
 *
 * @mbg.generated Sat Oct 21 18:03:12 ICT 2017
 */
@Insert({
    "insert into m_crm_customer (id, firstname, ",
    "lastname, leadsource, ",
    "assignUser, department, ",
    "officePhone, mobile, ",
    "homePhone, assisstant, ",
    "assisstantPhone, birthday, ",
    "createdTime, createdUser, ",
    "sAccountId, lastUpdatedTime, ",
    "title)",
    "values (#{id,jdbcType=INTEGER}, #{firstname,jdbcType=VARCHAR}, ",
    "#{lastname,jdbcType=VARCHAR}, #{leadsource,jdbcType=INTEGER}, ",
    "#{assignuser,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, ",
    "#{officephone,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, ",
    "#{homephone,jdbcType=VARCHAR}, #{assisstant,jdbcType=VARCHAR}, ",
    "#{assisstantphone,jdbcType=VARCHAR}, #{birthday,jdbcType=DATE}, ",
    "#{createdtime,jdbcType=TIMESTAMP}, #{createduser,jdbcType=VARCHAR}, ",
    "#{saccountid,jdbcType=INTEGER}, #{lastupdatedtime,jdbcType=TIMESTAMP}, ",
    "#{title,jdbcType=VARCHAR})"
})
int insert(Customer record);
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:28,代码来源:CustomerMapper.java

示例15: insert

import org.apache.ibatis.annotations.Insert; //导入依赖的package包/类
/**
 * This method was generated by MyBatis Generator.
 * This method corresponds to the database table m_crm_call
 *
 * @mbg.generated Sat Oct 21 18:03:12 ICT 2017
 */
@Insert({
    "insert into m_crm_call (id, subject, ",
    "startDate, durationInSeconds, ",
    "calltype, type, ",
    "typeid, lastUpdatedTime, ",
    "createdTime, createdUser, ",
    "assignUser, contactId, ",
    "sAccountId, status, ",
    "purpose, isClosed, description, ",
    "result)",
    "values (#{id,jdbcType=INTEGER}, #{subject,jdbcType=VARCHAR}, ",
    "#{startdate,jdbcType=TIMESTAMP}, #{durationinseconds,jdbcType=INTEGER}, ",
    "#{calltype,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, ",
    "#{typeid,jdbcType=INTEGER}, #{lastupdatedtime,jdbcType=TIMESTAMP}, ",
    "#{createdtime,jdbcType=TIMESTAMP}, #{createduser,jdbcType=VARCHAR}, ",
    "#{assignuser,jdbcType=VARCHAR}, #{contactid,jdbcType=INTEGER}, ",
    "#{saccountid,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, ",
    "#{purpose,jdbcType=VARCHAR}, #{isclosed,jdbcType=BIT}, #{description,jdbcType=LONGVARCHAR}, ",
    "#{result,jdbcType=LONGVARCHAR})"
})
int insert(CallWithBLOBs record);
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:28,代码来源:CallMapper.java


注:本文中的org.apache.ibatis.annotations.Insert类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。