class CategoryDatabaseAdapter implements DatabaseAdapter<Category> {

    @Override
    @NonNull
    public ContentValues write(@NonNull Category category, @NonNull DatabaseOperationMetadata databaseOperationMetadata) {
        final ContentValues values = new ContentValues();
        values.put(CategoriesTable.COLUMN_NAME, category.getName());
        values.put(CategoriesTable.COLUMN_CODE, category.getCode());
        values.put(CategoriesTable.COLUMN_CUSTOM_ORDER_ID, category.getCustomOrderId());
        values.put(CategoriesTable.COLUMN_UUID, category.getUuid().toString());
        if (databaseOperationMetadata.getOperationFamilyType() == OperationFamilyType.Sync) {
            values.putAll(mSyncStateAdapter.write(category.getSyncState()));
        } else {
            values.putAll(mSyncStateAdapter.writeUnsynced(category.getSyncState()));
        }
        return values;
    }

    public  CategoryDatabaseAdapter();
    public  CategoryDatabaseAdapter(@NonNull SyncStateAdapter syncStateAdapter);

}