Android Open Source - sqlite-provider Firework Writer

From Project

Back to project page sqlite-provider.


The source code is released under:

Apache License

If you think the Android project sqlite-provider listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.novoda.sqliteprovider.demo.persistance;
//  w  w  w  .  j  a v a  2  s. c  o m
import android.content.ContentValues;

import com.novoda.sqliteprovider.demo.domain.Firework;

import static com.novoda.sqliteprovider.demo.persistance.DatabaseConstants.Fireworks.*;

public class FireworkWriter {

    private final DatabaseWriter databaseWriter;

    public FireworkWriter(DatabaseWriter databaseWriter) {
        this.databaseWriter = databaseWriter;

    public void saveFirework(Firework firework) {
        ContentValues values = new ContentValues();
        values.put(COL_NAME, firework.getName());
        values.put(COL_COLOR, firework.getColor());
        values.put(COL_NOISE, firework.getNoise());
        values.put(COL_TYPE, firework.getType());
        values.put(COL_PRICE, firework.getPrice());
        values.put(COL_SHOP, 1);



Java Source Code List