public function addInsertEntity($table, Entity $entity)
    {
        Validate::canCastAsString($table, 'table');
        Validate::notNullOrEmpty($entity, 'entity');

        $operation = new BatchOperation();
        $type      = BatchOperationType::INSERT_ENTITY_OPERATION;
        $operation->setType($type);
        $operation->addParameter(BatchOperationParameterName::BP_TABLE, $table);
        $operation->addParameter(BatchOperationParameterName::BP_ENTITY, $entity);
        $this->addOperation($operation);
    }
public function addInsertEntity($table, Entity $entity)
    {
        Validate::canCastAsString($table, 'table');
        Validate::notNullOrEmpty($entity, 'entity');

        $operation = new BatchOperation();
        $type      = BatchOperationType::INSERT_ENTITY_OPERATION;
        $operation->setType($type);
        $operation->addParameter(BatchOperationParameterName::BP_TABLE, $table);
        $operation->addParameter(BatchOperationParameterName::BP_ENTITY, $entity);
        $this->addOperation($operation);
    }
public function addInsertEntity ( $ table , Entity $ entity ) { Validate :: canCastAsString ( $ table , 'table' ) ; Validate :: notNullOrEmpty ( $ entity , 'entity' ) ; $ operation = new BatchOperation ( ) ; $ type = BatchOperationType :: INSERT_ENTITY_OPERATION ; $ operation -> setType ( $ type ) ; $ operation -> addParameter ( BatchOperationParameterName :: BP_TABLE , $ table ) ; $ operation -> addParameter ( BatchOperationParameterName :: BP_ENTITY , $ entity ) ; $ this -> addOperation ( $ operation ) ; }
Adds insertEntity operation.

@param string $table  The table name.
@param Entity $entity The entity instance.

@return void
Adds insertEntity operation .