Search in sources :

Example 31 with NonNull

use of android.support.annotation.NonNull in project storio by pushtorefresh.

the class BoxedTypesFieldsStorIOContentResolverPutResolver method mapToContentValues.

/**
     * {@inheritDoc}
     */
@Override
@NonNull
public ContentValues mapToContentValues(@NonNull BoxedTypesFields object) {
    ContentValues contentValues = new ContentValues(6);
    contentValues.put("field1", object.field1);
    contentValues.put("field6", object.field6);
    contentValues.put("field3", object.field3);
    contentValues.put("field2", object.field2);
    contentValues.put("field5", object.field5);
    contentValues.put("field4", object.field4);
    return contentValues;
}
Also used : ContentValues(android.content.ContentValues) NonNull(android.support.annotation.NonNull) Override(java.lang.Override)

Example 32 with NonNull

use of android.support.annotation.NonNull in project storio by pushtorefresh.

the class BoxedTypesMethodsConstructorStorIOContentResolverGetResolver method mapFromCursor.

/**
     * {@inheritDoc}
     */
@Override
@NonNull
public BoxedTypesMethodsConstructor mapFromCursor(@NonNull Cursor cursor) {
    Boolean field1 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field1"))) {
        field1 = cursor.getInt(cursor.getColumnIndex("field1")) == 1;
    }
    Short field2 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field2"))) {
        field2 = cursor.getShort(cursor.getColumnIndex("field2"));
    }
    Integer field3 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field3"))) {
        field3 = cursor.getInt(cursor.getColumnIndex("field3"));
    }
    Long field4 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field4"))) {
        field4 = cursor.getLong(cursor.getColumnIndex("field4"));
    }
    Float field5 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field5"))) {
        field5 = cursor.getFloat(cursor.getColumnIndex("field5"));
    }
    Double field6 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field6"))) {
        field6 = cursor.getDouble(cursor.getColumnIndex("field6"));
    }
    BoxedTypesMethodsConstructor object = new BoxedTypesMethodsConstructor(field1, field2, field3, field4, field5, field6);
    return object;
}
Also used : Integer(java.lang.Integer) Float(java.lang.Float) Long(java.lang.Long) Boolean(java.lang.Boolean) Double(java.lang.Double) Short(java.lang.Short) NonNull(android.support.annotation.NonNull) Override(java.lang.Override)

Example 33 with NonNull

use of android.support.annotation.NonNull in project storio by pushtorefresh.

the class BoxedTypesMethodsFactoryMethodIgnoreNullStorIOContentResolverGetResolver method mapFromCursor.

/**
     * {@inheritDoc}
     */
@Override
@NonNull
public BoxedTypesMethodsFactoryMethodIgnoreNull mapFromCursor(@NonNull Cursor cursor) {
    Boolean field1 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field1"))) {
        field1 = cursor.getInt(cursor.getColumnIndex("field1")) == 1;
    }
    Short field2 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field2"))) {
        field2 = cursor.getShort(cursor.getColumnIndex("field2"));
    }
    Integer field3 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field3"))) {
        field3 = cursor.getInt(cursor.getColumnIndex("field3"));
    }
    Long field4 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field4"))) {
        field4 = cursor.getLong(cursor.getColumnIndex("field4"));
    }
    Float field5 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field5"))) {
        field5 = cursor.getFloat(cursor.getColumnIndex("field5"));
    }
    Double field6 = null;
    if (!cursor.isNull(cursor.getColumnIndex("field6"))) {
        field6 = cursor.getDouble(cursor.getColumnIndex("field6"));
    }
    BoxedTypesMethodsFactoryMethodIgnoreNull object = BoxedTypesMethodsFactoryMethodIgnoreNull.create(field1, field2, field3, field4, field5, field6);
    return object;
}
Also used : Integer(java.lang.Integer) Float(java.lang.Float) Long(java.lang.Long) Boolean(java.lang.Boolean) Double(java.lang.Double) Short(java.lang.Short) NonNull(android.support.annotation.NonNull) Override(java.lang.Override)

Example 34 with NonNull

use of android.support.annotation.NonNull in project storio by pushtorefresh.

the class BoxedTypesMethodsConstructorStorIOSQLitePutResolver method mapToContentValues.

/**
     * {@inheritDoc}
     */
@Override
@NonNull
public ContentValues mapToContentValues(@NonNull BoxedTypesMethodsConstructor object) {
    ContentValues contentValues = new ContentValues(6);
    contentValues.put("field1", object.getField1());
    contentValues.put("field6", object.getField6());
    contentValues.put("field3", object.getField3());
    contentValues.put("field2", object.getField2());
    contentValues.put("field5", object.getField5());
    contentValues.put("field4", object.getField4());
    return contentValues;
}
Also used : ContentValues(android.content.ContentValues) NonNull(android.support.annotation.NonNull) Override(java.lang.Override)

Example 35 with NonNull

use of android.support.annotation.NonNull in project storio by pushtorefresh.

the class BoxedTypesMethodsFactoryMethodStorIOSQLitePutResolver method mapToContentValues.

/**
     * {@inheritDoc}
     */
@Override
@NonNull
public ContentValues mapToContentValues(@NonNull BoxedTypesMethodsFactoryMethod object) {
    ContentValues contentValues = new ContentValues(6);
    contentValues.put("field1", object.getField1());
    contentValues.put("field6", object.getField6());
    contentValues.put("field3", object.getField3());
    contentValues.put("field2", object.getField2());
    contentValues.put("field5", object.getField5());
    contentValues.put("field4", object.getField4());
    return contentValues;
}
Also used : ContentValues(android.content.ContentValues) NonNull(android.support.annotation.NonNull) Override(java.lang.Override)

Aggregations

NonNull (android.support.annotation.NonNull)747 View (android.view.View)94 TextView (android.widget.TextView)90 ArrayList (java.util.ArrayList)83 Intent (android.content.Intent)53 ContentValues (android.content.ContentValues)46 Bundle (android.os.Bundle)46 Test (org.junit.Test)45 AlertDialog (android.support.v7.app.AlertDialog)41 Cursor (android.database.Cursor)38 List (java.util.List)34 IOException (java.io.IOException)32 MaterialDialog (com.afollestad.materialdialogs.MaterialDialog)31 LayoutInflater (android.view.LayoutInflater)29 RecyclerView (android.support.v7.widget.RecyclerView)28 ImageView (android.widget.ImageView)28 File (java.io.File)28 DialogAction (com.afollestad.materialdialogs.DialogAction)25 HashMap (java.util.HashMap)25 Bitmap (android.graphics.Bitmap)24