Class UserMappingDao

  • Direct Known Subclasses:
    StyleMappingDao

    public class UserMappingDao
    extends UserCustomDao
    User Mapping DAO for reading user mapping data tables
    Since:
    3.0.1
    Author:
    osbornb
    • Constructor Detail

      • UserMappingDao

        public UserMappingDao​(UserCustomDao dao)
        Constructor
        Parameters:
        dao - user custom data access object
      • UserMappingDao

        protected UserMappingDao​(UserCustomDao dao,
                                 UserMappingTable userMappingTable)
        Constructor
        Parameters:
        dao - user custom data access object
        userMappingTable - user mapping table
    • Method Detail

      • getRow

        public UserMappingRow getRow​(UserCustomResultSet resultSet)
        Get the user mapping row from the current result set location
        Parameters:
        resultSet - result set
        Returns:
        user mapping row
      • getRow

        public UserMappingRow getRow​(UserCustomRow row)
        Get a user mapping row from the user custom row
        Parameters:
        row - custom row
        Returns:
        user mapping row
      • queryByBaseId

        public UserCustomResultSet queryByBaseId​(UserMappingRow userMappingRow)
        Query by base id
        Parameters:
        userMappingRow - user mapping row
        Returns:
        result set
      • queryByBaseId

        public UserCustomResultSet queryByBaseId​(long baseId)
        Query by base id
        Parameters:
        baseId - base id
        Returns:
        result set
      • countByBaseId

        public int countByBaseId​(UserMappingRow userMappingRow)
        Count by base id
        Parameters:
        userMappingRow - user mapping row
        Returns:
        count
      • countByBaseId

        public int countByBaseId​(long baseId)
        Count by base id
        Parameters:
        baseId - base id
        Returns:
        count
      • queryByRelatedId

        public UserCustomResultSet queryByRelatedId​(UserMappingRow userMappingRow)
        Query by related id
        Parameters:
        userMappingRow - user mapping row
        Returns:
        result set
      • queryByRelatedId

        public UserCustomResultSet queryByRelatedId​(long relatedId)
        Query by related id
        Parameters:
        relatedId - related id
        Returns:
        result set
      • countByRelatedId

        public int countByRelatedId​(UserMappingRow userMappingRow)
        Count by related id
        Parameters:
        userMappingRow - user mapping row
        Returns:
        count
      • countByRelatedId

        public int countByRelatedId​(long relatedId)
        Count by related id
        Parameters:
        relatedId - related id
        Returns:
        count
      • queryByIds

        public UserCustomResultSet queryByIds​(UserMappingRow userMappingRow)
        Query by both base id and related id
        Parameters:
        userMappingRow - user mapping row
        Returns:
        result set
      • queryByIds

        public UserCustomResultSet queryByIds​(long baseId,
                                              long relatedId)
        Query by both base id and related id
        Parameters:
        baseId - base id
        relatedId - related id
        Returns:
        result set
      • uniqueBaseIds

        public List<Long> uniqueBaseIds()
        Get the unique base ids
        Returns:
        list of unique base ids
        Since:
        3.2.0
      • uniqueRelatedIds

        public List<Long> uniqueRelatedIds()
        Get the unique related ids
        Returns:
        list of unique related ids
        Since:
        3.2.0
      • countByIds

        public int countByIds​(UserMappingRow userMappingRow)
        Count by both base id and related id
        Parameters:
        userMappingRow - user mapping row
        Returns:
        count
      • countByIds

        public int countByIds​(long baseId,
                              long relatedId)
        Count by both base id and related id
        Parameters:
        baseId - base id
        relatedId - related id
        Returns:
        count
      • deleteByBaseId

        public int deleteByBaseId​(UserMappingRow userMappingRow)
        Delete user mappings by base id
        Parameters:
        userMappingRow - user mapping row
        Returns:
        rows deleted
      • deleteByBaseId

        public int deleteByBaseId​(long baseId)
        Delete user mappings by base id
        Parameters:
        baseId - base id
        Returns:
        rows deleted
      • deleteByRelatedId

        public int deleteByRelatedId​(UserMappingRow userMappingRow)
        Delete user mappings by related id
        Parameters:
        userMappingRow - user mapping row
        Returns:
        rows deleted
      • deleteByRelatedId

        public int deleteByRelatedId​(long relatedId)
        Delete user mappings by related id
        Parameters:
        relatedId - related id
        Returns:
        rows deleted
      • deleteByIds

        public int deleteByIds​(UserMappingRow userMappingRow)
        Delete user mappings by both base id and related id
        Parameters:
        userMappingRow - user mapping row
        Returns:
        rows deleted
      • deleteByIds

        public int deleteByIds​(long baseId,
                               long relatedId)
        Delete user mappings by both base id and related id
        Parameters:
        baseId - base id
        relatedId - related id
        Returns:
        rows deleted