java.lang.Object
ru.cg.webbpm.modules.security.api.impl.dao.jooq.BaseDao<OrgUnitRecord,OrgUnit>
ru.cg.webbpm.modules.security.api.impl.dao.jooq.OrgUnitDao

@Repository public class OrgUnitDao extends BaseDao<OrgUnitRecord,OrgUnit>
Author:
latypov
  • Constructor Details

    • OrgUnitDao

      public OrgUnitDao()
  • Method Details

    • createRecordMapper

      protected org.jooq.RecordMapper<OrgUnitRecord,OrgUnit> createRecordMapper()
      Creates org unit record mapper.
      Specified by:
      createRecordMapper in class BaseDao<OrgUnitRecord,OrgUnit>
      Returns:
      new record mapper.
    • getOrgUnit

      public OrgUnit getOrgUnit(String id)
      Gets org unit by passed id.
      Parameters:
      id - id of object to receive. Instance of String type.
      Returns:
      requested org unit or null if does not exist. Instance of OrgUnit type.
    • createOrgUnit

      public void createOrgUnit(OrgUnit orgUnit)
      Inserts org unit into database.
      Parameters:
      orgUnit - org unit to add. Instance of OrgUnit type.
    • updateOrgUnit

      public void updateOrgUnit(OrgUnit orgUnit)
      Updates org unit in database.
      Parameters:
      orgUnit - org unit to update. Instance of OrgUnit type.
    • deleteOrgUnits

      public void deleteOrgUnits(Collection<String> ids)
      Removes org units by org unit ids.
      Parameters:
      ids - ids collection of org units to remove. Instance of Collection type.
    • getByCode

      public OrgUnit getByCode(String code)
      Gets org unit by org unit code.
      Parameters:
      code - code of object to receive. Instance of String type.
      Returns:
      requested org unit or null if does not exist. Instance of OrgUnit type.
    • getOrgUnits

      public List<OrgUnit> getOrgUnits(OrgUnitService.OrgUnitFilter filter, boolean searchOnlyActual)
      Gets org units filtered by org unit filter.
      Parameters:
      filter - org unit filter. Instance of OrgUnitService.OrgUnitFilter type.
      searchOnlyActual - marker for removed filter. Instance of Boolean type.
      Returns:
      list of org units. Instance of List type.
    • getOrgUnitWithChildrenExisting

      public List<OrgUnit> getOrgUnitWithChildrenExisting(String id, OrgUnitService.OrgUnitFilter filter)
      Gets org units using downward recursion by filter.
      Parameters:
      id - id of object to receive from table. Instance of String type.
      filter - org unit filter. Instance of OrgUnitService.OrgUnitFilter type.
      Returns:
      list of org units. Instance of List type.
    • getIdsWithChildrenIdsExisting

      public List<String> getIdsWithChildrenIdsExisting(Collection<String> ids)
      Gets org units using downward recursion.
      Parameters:
      ids - ids of objects to receive. Instance of Collection type.
      Returns:
      list of org units. Instance of List type.
    • getIdsWithParentIdsExisting

      public List<String> getIdsWithParentIdsExisting(String... ids)
      Gets org units using bottom-up recursion by ids.
      Parameters:
      ids - ids of objects to receive. Instance of String type.
      Returns:
      list of requested children org units ids. Instance of List type.
    • getOrgUnitsWithParentsExisting

      public List<OrgUnit> getOrgUnitsWithParentsExisting(NonPageableLoadOptions options)
      Gets org units using bottom-up recursion by load options.
      Parameters:
      options - indicates load option properties. Instance of NonPageableLoadOptions type.
      Returns:
      list of org units. Instance of List type.
    • updateOrgUnitsRemoved

      public void updateOrgUnitsRemoved(Collection<String> ids, boolean removed)
      Updates removed status of org units by ids.
      Parameters:
      ids - ids of objects to update. Instance of String type.
      removed - value of org unit remove status. Instance of boolean type.