geopackage-sdk/src/main/java/mil/nga/geopackage/extension/RTreeIndexTableDao.java
@Override
    public int count(String where, String[] args) {

        int count = 0;

        StringBuilder countQuery = new StringBuilder();
        countQuery.append("select count(*) from ").append(CoreSQLUtils.quoteWrap(getTableName()));
        if (where != null) {
            countQuery.append(" where ").append(where);
        }
        String sql = countQuery.toString();

        UserCustomCursor customCursor = rawQuery(sql, args);

        Object value = ResultUtils.buildSingleResult(customCursor, 0, GeoPackageDataType.MEDIUMINT);
        if (value != null) {
            count = ((Number) value).intValue();
        }

        return count;
    }
@Override
    public int count(String where, String[] args) {

        int count = 0;

        StringBuilder countQuery = new StringBuilder();
        countQuery.append("select count(*) from ").append(CoreSQLUtils.quoteWrap(getTableName()));
        if (where != null) {
            countQuery.append(" where ").append(where);
        }
        String sql = countQuery.toString();

        UserCustomCursor customCursor = rawQuery(sql, args);

        Object value = ResultUtils.buildSingleResult(customCursor, 0, GeoPackageDataType.MEDIUMINT);
        if (value != null) {
            count = ((Number) value).intValue();
        }

        return count;
    }
@ Override public int count ( String where , String [ ] args ) { int count = 0 ; StringBuilder countQuery = new StringBuilder ( ) ; countQuery . append ( "select count(*) from " ) . append ( CoreSQLUtils . quoteWrap ( getTableName ( ) ) ) ; if ( where != null ) { countQuery . append ( " where " ) . append ( where ) ; } String sql = countQuery . toString ( ) ; UserCustomCursor customCursor = rawQuery ( sql , args ) ; Object value = ResultUtils . buildSingleResult ( customCursor , 0 , GeoPackageDataType . MEDIUMINT ) ; if ( value != null ) { count = ( ( Number ) value ) . intValue ( ) ; } return count ; }
{@inheritDoc}
{