Back to project page ContentProviderProcessor.
The source code is released under:
Apache License
If you think the Android project ContentProviderProcessor listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.wackernagel.android.contractcontentprovider; /* w w w .j a v a 2s . c o m*/ import android.net.Uri; public class ContentProviderUtils { public static Uri appendGroupBy( Uri uri, String groupBy ) { if( uri == null ) { throw new IllegalArgumentException( "Uri can't be null" ); } return uri.buildUpon() .appendQueryParameter( AbstractContentProviderProcessor.QUERY_PARAMETER_GROUP_BY, groupBy ) .build(); } public static Uri appendHaving( Uri uri, String having ) { if( uri == null ) { throw new IllegalArgumentException( "Uri can't be null" ); } return uri.buildUpon() .appendQueryParameter( AbstractContentProviderProcessor.QUERY_PARAMETER_HAVING, having ) .build(); } public static String[] min( String[] projection, String column ) { for( int index = 0; index < projection.length; index++ ) { if( projection[ index ].equals( column ) ) { projection[ index ] = String.format( "min(%s)", column ); return projection; } } return projection; } }