/** * Get a User Mapping DAO from a table name * * @param tableName mapping table name * @return user mapping dao */ public UserMappingDao getMappingDao(String tableName) { UserMappingDao userMappingDao = new UserMappingDao(getUserDao(tableName)); userMappingDao.registerCursorWrapper(getGeoPackage()); return userMappingDao; }
/** * Get the base ID column * * @return base ID column */ public UserCustomColumn getBaseIdColumn() { return getTable().getBaseIdColumn(); }
/** * Delete user mappings by related id * * @param userMappingRow user mapping row * @return rows deleted */ public int deleteByRelatedId(UserMappingRow userMappingRow) { return deleteByRelatedId(userMappingRow.getRelatedId()); }
/** * Delete user mappings by both base id and related id * * @param userMappingRow * user mapping row * @return rows deleted */ public int deleteByIds(UserMappingRow userMappingRow) { return deleteByIds(userMappingRow.getBaseId(), userMappingRow.getRelatedId()); }
/** * Remove a specific relationship from the GeoPackage * * @param extendedRelation * extended relation */ public void removeRelationship(ExtendedRelation extendedRelation) { removeRelationship(extendedRelation.getBaseTableName(), extendedRelation.getRelatedTableName(), extendedRelation.getRelationName()); }
/** * Query by both base id and related id * * @param userMappingRow user mapping row * @return cursor */ public UserCustomCursor queryByIds(UserMappingRow userMappingRow) { return queryByIds(userMappingRow.getBaseId(), userMappingRow.getRelatedId()); }
/** * Get a User Mapping DAO from an extended relation * * @param extendedRelation extended relation * @return user mapping dao */ public UserMappingDao getMappingDao(ExtendedRelation extendedRelation) { return getMappingDao(extendedRelation.getMappingTableName()); }
/** * Get a related media table DAO * * @param extendedRelation extended relation * @return media DAO */ public MediaDao getMediaDao(ExtendedRelation extendedRelation) { return getMediaDao(extendedRelation.getRelatedTableName()); }
/** * Get the base id mappings for the related id * * @param extendedRelation extended relation * @param relatedId related id * @return IDs representing the matching base IDs */ public List<Long> getMappingsForRelated(ExtendedRelation extendedRelation, long relatedId) { return getMappingsForRelated(extendedRelation.getMappingTableName(), relatedId); }
/** * Get the related id mappings for the base id * * @param extendedRelation extended relation * @param baseId base id * @return IDs representing the matching related IDs */ public List<Long> getMappingsForBase(ExtendedRelation extendedRelation, long baseId) { return getMappingsForBase(extendedRelation.getMappingTableName(), baseId); }
/** * Count by related id * * @param userMappingRow * user mapping row * @return count */ public int countByRelatedId(UserMappingRow userMappingRow) { return countByRelatedId(userMappingRow.getRelatedId()); }
/** * Delete user mappings by base id * * @param userMappingRow * user mapping row * @return rows deleted */ public int deleteByBaseId(UserMappingRow userMappingRow) { return deleteByBaseId(userMappingRow.getBaseId()); }
/** * Get the related ID column * * @return related ID column */ public UserCustomColumn getRelatedIdColumn() { return getTable().getRelatedIdColumn(); }
/** * {@inheritDoc} */ @Override public UserMappingRow newRow() { return new UserMappingRow(getTable()); }
/** * Count by base id * * @param userMappingRow user mapping row * @return count */ public int countByBaseId(UserMappingRow userMappingRow) { return countByBaseId(userMappingRow.getBaseId()); }
/** * Query by related id * * @param userMappingRow * user mapping row * @return result set */ public UserCustomResultSet queryByRelatedId(UserMappingRow userMappingRow) { return queryByRelatedId(userMappingRow.getRelatedId()); }
/** * Get a User Mapping DAO from a table name * * @param tableName * mapping table name * @return user mapping dao */ public UserMappingDao getMappingDao(String tableName) { return new UserMappingDao(getUserDao(tableName)); }
/** * Get the related ID column index * * @return related ID column index */ public int getRelatedIdColumnIndex() { return getTable().getRelatedIdColumnIndex(); }
/** * Get the relation type for pre-known types * * @return relation type or null */ public RelationType getRelationType() { return RelationType.fromName(getRelationName()); }
/** * Delete user mappings by both base id and related id * * @param userMappingRow user mapping row * @return rows deleted */ public int deleteByIds(UserMappingRow userMappingRow) { return deleteByIds(userMappingRow.getBaseId(), userMappingRow.getRelatedId()); }