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

com.enterprisemath.dao.big.MyBatisBigEntityMapper Maven / Gradle / Ivy

There is a newer version: 4.3.2
Show newest version
package com.enterprisemath.dao.big;

import com.enterprisemath.dao.filter.Criterium;
import com.enterprisemath.dao.filter.Filter;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.ibatis.annotations.Param;

/**
 * My batis mapper for big entity objects.
 *
 * @author radek.hecl
 *
 */
public interface MyBatisBigEntityMapper {

    /**
     * Inserts big entity into table.
     *
     * @param table table
     * @param fields field names
     * @param values values
     */
    public void insertBigEntity(@Param("table") String table, @Param("fields") List fields, @Param("values") List values);

    /**
     * Inserts big entities into table.
     *
     * @param table table
     * @param fields field names
     * @param values values from all entities
     */
    public void insertBigEntities(@Param("table") String table, @Param("fields") List fields, @Param("values") List> values);

    /**
     * Selects big entities.
     *
     * @param table table
     * @param filter filter
     * @param fields fields to pull
     * @return selected entities
     */
    public List> selectBigEntities(@Param("table") String table, @Param("filter") Filter filter,
            @Param("fields") Set fields);

    /**
     * Counts big entities.
     *
     * @param table table
     * @param criteria criteria used for counting
     * @return how many big entities satisfies the criteria
     */
    public long countBigEntities(@Param("table") String table, @Param("criteria") List> criteria);

    /**
     * Deletes big entity.
     *
     * @param table table
     * @param code entity identification code
     */
    public void deleteBigEntity(@Param("table") String table, @Param("code") String code);

    /**
     * Updates field in the big entity.
     *
     * @param table table
     * @param code entity identification code
     * @param field field name
     * @param value value
     */
    public void updateBigEntityField(@Param("table") String table, @Param("code") String code, @Param("field") String field,
            @Param("value") Object value);
}