Android Open Source - kvs-schema Example Prefs Schema






From Project

Back to project page kvs-schema.

License

The source code is released under:

MIT License

If you think the Android project kvs-schema 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.example.android.kvs;
//from  w w  w  .j  a  va 2s  .  c  o  m
import android.content.Context;

import com.rejasupotaro.android.kvs.PrefSchema;
import com.rejaupotaro.android.kvs.annotations.Key;
import com.rejaupotaro.android.kvs.annotations.Table;

@Table("example")
public abstract class ExamplePrefsSchema extends PrefSchema {
    public static ExamplePrefs prefs;

    @Key("user_id")
    protected long userId = -1;
    @Key("user_name")
    protected String userName = "guest";

    public static synchronized ExamplePrefs get(Context context) {
        if (prefs == null) {
            prefs = new ExamplePrefs(context);
        }
        return prefs;
    }
}




Java Source Code List

com.example.android.kvs.ApplicationTest.java
com.example.android.kvs.ExamplePrefsSchema.java
com.example.android.kvs.MainActivity.java
com.rejasupotaro.android.kvs.ApplicationTest.java
com.rejasupotaro.android.kvs.PrefSchema.java
com.rejasupotaro.android.kvs.Schema.java
com.rejasupotaro.android.kvs.internal.Classes.java
com.rejasupotaro.android.kvs.internal.EnvParser.java
com.rejasupotaro.android.kvs.internal.SchemaModel.java
com.rejasupotaro.android.kvs.internal.SchemaProcessor.java
com.rejasupotaro.android.kvs.internal.SchemaWriter.java
com.rejasupotaro.android.kvs.internal.StringUtils.java
com.rejasupotaro.android.kvs.internal.exceptions.TableNameDuplicateException.java
com.rejasupotaro.android.kvs.internal.exceptions.TableNameIsInvalidException.java
com.rejasupotaro.android.kvs.internal.exceptions.TableNameIsNotDefinedException.java
com.rejaupotaro.android.kvs.annotations.Key.java
com.rejaupotaro.android.kvs.annotations.Table.java