把下表建成java类CREATE TABLE `t_vbs_vas_data_import_task` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除', `task_type` smallint(6) NOT NULL DEFAULT '0' COMMENT '任务类型 1-拉数任务 2-补数任务', `task_code` varchar(50) NOT NULL DEFAULT '' COMMENT '任务编码', `task_description` varchar(200) NOT NULL DEFAULT '' COMMENT '任务描述', `last_catch_data_where_start_time` datetime NOT NULL DEFAULT '1900-01-01 00:00:00' COMMENT '上一次取数的条件的执行开始时间', `last_catch_data_where_end_time` datetime NOT NULL DEFAULT '1900-01-01 00:00:00' COMMENT '上一次取数的条件的执行结束时间', `last_catch_data_where_time_step` int(11) NOT NULL DEFAULT '0' COMMENT '上一次取数的条件的执行时间的步频(单位:分钟)', `add_where_condition_of_loan_kind` varchar(200) NOT NULL DEFAULT '' COMMENT '补充where条件之LoanKind', `data_push_batch_num_in_dimension` int(11) NOT NULL DEFAULT '50' COMMENT '维度化的数据推送量(并非真正的batchSize)', PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=270017 COMMENT='从vbs抽取数据至vas的计划任务';
时间: 2024-01-05 22:03:40 浏览: 63
以下是将上述表创建为Java类的示例代码:
```java
import java.util.Date;
public class VbsVasDataImportTask {
private int id;
private Date createdTime;
private Date updatedTime;
private boolean isDeleted;
private int taskType;
private String taskCode;
private String taskDescription;
private Date lastCatchDataWhereStartTime;
private Date lastCatchDataWhereEndTime;
private int lastCatchDataWhereTimeStep;
private String addWhereConditionOfLoanKind;
private int dataPushBatchNumInDimension;
// 构造函数
public VbsVasDataImportTask() {
// 默认构造函数
}
// Getters 和 Setters
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Date getUpdatedTime() {
return updatedTime;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public boolean getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(boolean isDeleted) {
this.isDeleted = isDeleted;
}
public int getTaskType() {
return taskType;
}
public void setTaskType(int taskType) {
this.taskType = taskType;
}
public String getTaskCode() {
return taskCode;
}
public void setTaskCode(String taskCode) {
this.taskCode = taskCode;
}
public String getTaskDescription() {
return taskDescription;
}
public void setTaskDescription(String taskDescription) {
this.taskDescription = taskDescription;
}
public Date getLastCatchDataWhereStartTime() {
return lastCatchDataWhereStartTime;
}
public void setLastCatchDataWhereStartTime(Date lastCatchDataWhereStartTime) {
this.lastCatchDataWhereStartTime = lastCatchDataWhereStartTime;
}
public Date getLastCatchDataWhereEndTime() {
return lastCatchDataWhereEndTime;
}
public void setLastCatchDataWhereEndTime(Date lastCatchDataWhereEndTime) {
this.lastCatchDataWhereEndTime = lastCatchDataWhereEndTime;
}
public int getLastCatchDataWhereTimeStep() {
return lastCatchDataWhereTimeStep;
}
public void setLastCatchDataWhereTimeStep(int lastCatchDataWhereTimeStep) {
this.lastCatchDataWhereTimeStep = lastCatchDataWhereTimeStep;
}
public String getAddWhereConditionOfLoanKind() {
return addWhereConditionOfLoanKind;
}
public void setAddWhereConditionOfLoanKind(String addWhereConditionOfLoanKind) {
this.addWhereConditionOfLoanKind = addWhereConditionOfLoanKind;
}
public int getDataPushBatchNumInDimension() {
return dataPushBatchNumInDimension;
}
public void setDataPushBatchNumInDimension(int dataPushBatchNumInDimension) {
this.dataPushBatchNumInDimension = dataPushBatchNumInDimension;
}
}
```
在上述代码中,我们将表中的字段映射到了Java类中的属性,并提供了相应的Getters和Setters方法。这样,我们就可以在Java中方便地操作该表的数据了。
阅读全文