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

com.enterprisemath.dao.relational.MyBatisRelationMapper Maven / Gradle / Ivy

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

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.enterprisemath.dao.filter.Criterium;
import com.enterprisemath.dao.filter.Filter;

/**
 * My batis mapper for relation objects.
 * This is internal class and might be changed or removed at any time.
 *
 * @author radek.hecl
 *
 */
public interface MyBatisRelationMapper {

    /**
     * Inserts code.
     *
     * @param code relation identification code
     * @param subjectCode subject code
     * @param objectCode object code
     * @param type type
     */
    public void insertRelation(
            @Param("code") String code,
            @Param("subject_code") String subjectCode,
            @Param("object_code") String objectCode,
            @Param("type") String type);

    /**
     * Deletes the specified relation.
     *
     * @param code identification code
     */
    public void deleteRelation(@Param("code") String code);

    /**
     * Selects relations according the filter.
     *
     * @param subjectJoins joins for subject
     * @param objectJoins joins for object
     * @param filter filter
     * @return selected relations
     */
    public List> selectRelations(
            @Param("subjectJoins") Map> subjectJoins,
            @Param("objectJoins") Map> objectJoins,
            @Param("filter") Filter filter);

    /**
     * Counts relations.
     *
     * @param subjectTables tables which are involved in counting for subject
     * @param objectTables tables which are involved in counting for object
     * @param criteria criteria used for counting
     * @return how many entities satisfies the criteria
     */
    public long countRelations(
            @Param("subjectTables") Set subjectTables,
            @Param("objectTables") Set objectTables,
            @Param("criteria") Set> criteria);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy