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

com.enterprisemath.dao.relational.RelationDao 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.Set;

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

/**
 * Defines data access layer for manipulation with relations.
 * 

* Note: Adding functions to this interface will NOT be * considered as breaking binary compatibility. *

* Criteria are defined according the following rules. *
    *
  • Subject respective object entities have prefix subject respective object
  • *
  • Entity property names are used - name, created_timestamp and type, for example subject.name
  • *
  • Everything is written in "_" notation
  • *
  • Join values has format join_table_name.property_name, for example subject.join_table.join_column
  • *
* * @author radek.hecl * */ public interface RelationDao { /** * Inserts new relation. * * @param code identification code * @param subjectCode subject entity code * @param objectCode object entity code * @param type type of the relation */ public void insertRelation(String code, String subjectCode, String objectCode, String type); /** * Deletes relation. * * @param code identification code */ public void deleteRelation(String code); /** * Selects all relations according filter. * * @param joinsData data from joined tables * @param filter filter object * @return relations which matches the filter */ public List selectRelations(Set joinsData, Filter filter); /** * Counts how many relations satisfies the criteria. * * @param joinsData data from joined tables which should be considered during count * @param criteria criteria to be satisfied * @return how many relations satisfies the criteria */ public long countRelations(Set joinsData, Set> criteria); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy