nbcp.myoql.db.es.component.EsBulkInsertClip.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ktmyoql Show documentation
Show all versions of ktmyoql Show documentation
kotlin orm -- mysql,mongo , just like ktorm
The newest version!
package nbcp.myoql.db.es.component
import nbcp.myoql.db.es.enums.EsPutRefreshEnum
import org.slf4j.LoggerFactory
import java.io.Serializable
/**
* Created by udi on 17-4-17.
*/
/**
* EsInsert
*/
class EsBulkInsertClip, E : Serializable>(var moerEntity: M)
: EsBaseBulkInsertClip(moerEntity.tableName) {
companion object {
private var logger = LoggerFactory.getLogger(this::class.java.declaringClass)
}
fun add(entity: E): EsBulkInsertClip {
super.addEntity(entity)
return this;
}
@JvmOverloads
fun routing(routing:String = ""): EsBulkInsertClip {
this.withRouting(routing)
return this;
}
@JvmOverloads
fun pipeline(pipeline:String = ""): EsBulkInsertClip {
this.withPipeLine(pipeline)
return this;
}
fun refresh(refresh: EsPutRefreshEnum): EsBulkInsertClip {
this.withRefresh(refresh)
return this;
}
}