code: public List<Long> getMappingsForRelated(String tableName, long relatedId) {
  
  		List<Long> baseIds = new ArrayList<>();
  
  		UserMappingDao userMappingDao = getMappingDao(tableName);
  		UserCustomResultSet resultSet = userMappingDao
  				.queryByRelatedId(relatedId);
  		try {
  			while (resultSet.moveToNext()) {
  				UserMappingRow row = userMappingDao.getRow(resultSet);
  				baseIds.add(row.getBaseId());
  			}
  		} finally {
  			resultSet.close();
  		}
  
  		return baseIds;
  	}
docs: Get the base id mappings for the related id
  
  @param tableName
  mapping table name
  @param relatedId
  related id
  @return IDs representing the matching base IDs