package org.hisp.dhis.android.core.category;


import android.content.ContentValues;
import android.database.Cursor;
import android.support.annotation.NonNull;

import com.google.auto.value.AutoValue;

import org.hisp.dhis.android.core.common.BaseIdentifiableObjectModel;

@AutoValue
public abstract class CategoryOptionModel extends BaseIdentifiableObjectModel {
    public static final String TABLE = "CategoryOption";

    public static class Columns extends BaseIdentifiableObjectModel.Columns {
    }

    @NonNull
    public abstract ContentValues toContentValues();

    @NonNull
    public static CategoryOptionModel.Builder builder() {
        return new $$AutoValue_CategoryOptionModel.Builder();
    }

    @NonNull
    public static CategoryOptionModel create(Cursor cursor) {
        return AutoValue_CategoryOptionModel.createFromCursor(cursor);

    }

    @AutoValue.Builder
    public static abstract class Builder extends
            BaseIdentifiableObjectModel.Builder<CategoryOptionModel.Builder> {

        public abstract CategoryOptionModel build();
    }
}

@@ -59,29 +59,23 @@
 oid.
-content.ContentValues
+database.Cursor
 ;%0Aim
@@ -100,169 +100,607 @@
 ase.
-Cursor;%0Aimport android.support.annotation.NonNull;%0A%0Aimport com.google.auto.value.AutoValue;%0A%0Aimport org.hisp.dhis.android.core.common.BaseIdentifiableObjectModel
+sqlite.SQLiteStatement;%0Aimport android.support.annotation.NonNull;%0Aimport android.support.annotation.Nullable;%0A%0Aimport com.gabrielittner.auto.value.cursor.ColumnAdapter;%0Aimport com.gabrielittner.auto.value.cursor.ColumnName;%0Aimport com.google.auto.value.AutoValue;%0A%0Aimport org.hisp.dhis.android.core.common.BaseNameableObjectModel;%0Aimport org.hisp.dhis.android.core.common.StatementBinder;%0Aimport org.hisp.dhis.android.core.data.database.DbDateColumnAdapter;%0Aimport org.hisp.dhis.android.core.utils.Utils;%0A%0Aimport java.util.Date;%0A%0Aimport static org.hisp.dhis.android.core.utils.StoreUtils.sqLiteBind
 ;%0A%0A@
@@ -759,32 +759,28 @@
 extends Base
-Identifi
+Name
 ableObjectMo
@@ -783,16 +783,43 @@
 ctModel 
+implements StatementBinder 
 %7B%0A    pu
@@ -918,114 +918,862 @@
 Base
-IdentifiableObjectModel.Columns %7B%0A    %7D%0A%0A    @NonNull%0A    public abstract ContentValues toContentValues();
+NameableObjectModel.Columns %7B%0A        public static final String START_DATE = %22startDate%22;%0A        public static final String END_DATE = %22endDate%22;%0A%0A        private Columns() %7B%7D%0A%0A        public static String%5B%5D all() %7B%0A            return Utils.appendInNewArray(BaseNameableObjectModel.Columns.all(), START_DATE, END_DATE);%0A        %7D%0A    %7D%0A%0A    @Nullable%0A    @ColumnName(Columns.START_DATE)%0A    @ColumnAdapter(DbDateColumnAdapter.class)%0A    public abstract Date startDate();%0A%0A    @Nullable%0A    @ColumnName(Columns.END_DATE)%0A    @ColumnAdapter(DbDateColumnAdapter.class)%0A    public abstract Date endDate();%0A%0A    @Override%0A    public void bindToStatement(@NonNull SQLiteStatement sqLiteStatement) %7B%0A        super.bindToStatement(sqLiteStatement);%0A        sqLiteBind(sqLiteStatement, 11, startDate());%0A        sqLiteBind(sqLiteStatement, 12, endDate());%0A    %7D
 %0A%0A  
@@ -1801,36 +1801,16 @@
  static 
-CategoryOptionModel.
 Builder 
@@ -1840,17 +1840,16 @@
 urn new 
-$
 $AutoVal
@@ -2035,17 +2035,16 @@
 ursor);%0A
-%0A
     %7D%0A%0A 
@@ -2117,87 +2117,167 @@
 ends
-%0A            BaseIdentifiableObjectModel.Builder%3CCategoryOptionModel.Builder%3E %7B
+ BaseNameableObjectModel.Builder%3CBuilder%3E %7B%0A%0A        public abstract Builder startDate(Date startDate);%0A%0A        public abstract Builder endDate(Date endDate);
 %0A%0A  

add start and end date to categoryOptionModel