Search in sources :

Example 36 with Override

use of java.lang.Override in project storio by pushtorefresh.

the class PrimitiveMethodsConstructorStorIOSQLitePutResolver method mapToContentValues.

/**
     * {@inheritDoc}
     */
@Override
@NonNull
public ContentValues mapToContentValues(@NonNull PrimitiveMethodsConstructor object) {
    ContentValues contentValues = new ContentValues(8);
    contentValues.put("field1", object.getField1());
    contentValues.put("field7", object.getField7());
    contentValues.put("field6", object.getField6());
    contentValues.put("field8", object.getField8());
    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 37 with Override

use of java.lang.Override in project storio by pushtorefresh.

the class PrimitiveMethodsFactoryMethodStorIOSQLiteGetResolver method mapFromCursor.

/**
     * {@inheritDoc}
     */
@Override
@NonNull
public PrimitiveMethodsFactoryMethod mapFromCursor(@NonNull Cursor cursor) {
    boolean field1 = cursor.getInt(cursor.getColumnIndex("field1")) == 1;
    short field2 = cursor.getShort(cursor.getColumnIndex("field2"));
    int field3 = cursor.getInt(cursor.getColumnIndex("field3"));
    long field4 = cursor.getLong(cursor.getColumnIndex("field4"));
    float field5 = cursor.getFloat(cursor.getColumnIndex("field5"));
    double field6 = cursor.getDouble(cursor.getColumnIndex("field6"));
    String field7 = cursor.getString(cursor.getColumnIndex("field7"));
    byte[] field8 = cursor.getBlob(cursor.getColumnIndex("field8"));
    PrimitiveMethodsFactoryMethod object = PrimitiveMethodsFactoryMethod.create(field1, field2, field3, field4, field5, field6, field7, field8);
    return object;
}
Also used : String(java.lang.String) NonNull(android.support.annotation.NonNull) Override(java.lang.Override)

Example 38 with Override

use of java.lang.Override in project storio by pushtorefresh.

the class PrimitiveMethodsFactoryMethodStorIOSQLitePutResolver method mapToContentValues.

/**
     * {@inheritDoc}
     */
@Override
@NonNull
public ContentValues mapToContentValues(@NonNull PrimitiveMethodsFactoryMethod object) {
    ContentValues contentValues = new ContentValues(8);
    contentValues.put("field1", object.getField1());
    contentValues.put("field7", object.getField7());
    contentValues.put("field6", object.getField6());
    contentValues.put("field8", object.getField8());
    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 39 with Override

use of java.lang.Override in project storio by pushtorefresh.

the class BoxedTypesMethodsConstructorIgnoreNullStorIOSQLiteGetResolver method mapFromCursor.

/**
     * {@inheritDoc}
     */
@Override
@NonNull
public BoxedTypesMethodsConstructorIgnoreNull 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"));
    }
    BoxedTypesMethodsConstructorIgnoreNull object = new BoxedTypesMethodsConstructorIgnoreNull(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 40 with Override

use of java.lang.Override in project wire by square.

the class Thing method newBuilder.

@Override
public Builder newBuilder() {
    Builder builder = new Builder();
    builder.name = name;
    builder.addUnknownFields(unknownFields());
    return builder;
}
Also used : StringBuilder(java.lang.StringBuilder) Override(java.lang.Override)

Aggregations

Override (java.lang.Override)177 StringBuilder (java.lang.StringBuilder)83 String (java.lang.String)36 NonNull (android.support.annotation.NonNull)24 ContentValues (android.content.ContentValues)12 ArrayList (java.util.ArrayList)11 View (android.view.View)10 Integer (java.lang.Integer)9 Long (java.lang.Long)9 HashMap (java.util.HashMap)9 Boolean (java.lang.Boolean)8 Double (java.lang.Double)8 Float (java.lang.Float)8 Short (java.lang.Short)8 Bitmap (android.graphics.Bitmap)5 Canvas (android.graphics.Canvas)5 Handler (android.os.Handler)5 HandlerThread (android.os.HandlerThread)5 SmallTest (android.test.suitebuilder.annotation.SmallTest)5 Map (java.util.Map)5