All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nbcp.myoql.db.es.component.EsBulkInsertClip.kt Maven / Gradle / Ivy

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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy