本文整理匯總了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));
}
示例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);
}
示例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));
}
示例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);
}
示例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);
示例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);
示例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);
示例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);
示例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);
示例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);
示例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);
示例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);
示例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);
示例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);
示例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);