public class InsertionBuilder extends QueryBuilder<InsertionBuilder,android.net.Uri>
ContentResolver
and
Uri
.
Insert a row.
long nID = QueryBuilder.insertInto( rslv, uri ) .setValues( vals ) .execute() ;
Insert a collection of rows.
Vector<Uri> vnIDs = new Vector<>() ; for( ContentValues vals : aSeveralValues ) { Uri uriID = QueryBuilder.insertInto( rslv, uri ) .setValues( vals ) .execute() ; if( uriID != InsertionBuilder.FAILED ) vnIDs.add(uriID) ; }
QueryBuilder.ExecutionException, QueryBuilder.UnboundException
Modifier and Type | Field and Description |
---|---|
static android.net.Uri |
FAILED |
protected static java.lang.String |
LOG_TAG |
m_asExplicitWhereParams, m_rslv, m_sExplicitWhereFormat, m_uri, m_valsToWrite
Constructor and Description |
---|
InsertionBuilder() |
InsertionBuilder(android.content.ContentResolver rslv,
android.net.Uri uri) |
InsertionBuilder(android.content.Context ctx,
android.net.Uri uri) |
Modifier and Type | Method and Description |
---|---|
android.net.Uri |
executeQuery(android.content.ContentResolver rslv,
android.net.Uri uri)
Inserts the data values in this builder into the given data context.
|
delete, deleteFrom, deleteFrom, execute, executeOn, executeOn, getContentResolver, getWhereFormat, getWhereParams, insert, insertInto, insertInto, onDataSource, onDataSource, select, selectFrom, selectFrom, setValues, update, update, update, validateDataContextBinding, where, where, where
protected static final java.lang.String LOG_TAG
public static final android.net.Uri FAILED
public InsertionBuilder(android.content.ContentResolver rslv, android.net.Uri uri)
public InsertionBuilder(android.content.Context ctx, android.net.Uri uri)
public InsertionBuilder()
public android.net.Uri executeQuery(android.content.ContentResolver rslv, android.net.Uri uri) throws java.lang.Exception
null
trivially.executeQuery
in class QueryBuilder<InsertionBuilder,android.net.Uri>
rslv
- the resolver through which the query should be executeduri
- the URI at which the query should be executednull
if no values were
suppliedjava.lang.Exception
- if anything goes wrong