Skip to content

Features

xcesco edited this page Nov 28, 2017 · 30 revisions

Goals

Kripton was build with two objectives:

  • Create provide a simple and coherent way to persist data indipendently if you want to store data on file, on a SQLite database or a SharedPreferences.
  • Work at max speed: i want to realize the (or one of the best) persistence library in terms of speed to persist on. You can see Benchmark page to have more information about performance. This is obtained with the use the annotation processor.
  • Support the highest number of possible formats: JSON, XML, YAML, CBOR, (Java) properties, SQLite and SharedPreferences.

Features

Kritpon have some runtime-libraries (for Android plaftorm, for Java plaftform) and a java annotation processor library. Annotation processor generates code which is based on runtime libraries: kripton-android-library and kripton-library.

Supported field types

  • All primitive types (bool, int, long, float, etc..)
  • All simple types (Boolean, String, Byte, Float, Integer, etc..)
  • List collections: if you use List interface, an ArrayList will be used.
  • Set collections: if you use Set inteface, an HashSet will be used.
  • Map collections: if you use Map interface, an HashLinkedMap will be used.
  • BigDecimal, BigInteger, Calendar, Currency, Locale, Time, TimeZone, Url
  • Array collections
  • POJO bean type with @BindType annotation
  • Virtually every kind of other type thanks to type adapter you can define and use.

Supported persistence formats

Supported persistence methods are:

  • data format XML (since 1.0.0)
  • data format JSON (since 1.0.0)
  • data format YAML (since 1.5.0)
  • data fromat CBOR (since 1.5.0)
  • data (java) properties (since 1.5.0)
  • data format SMILE (since 2.0.0)
  • SQLite (since 1.2.0).
  • Shared preferences (since 1.2.0).

Platforms

Supported platforms:

  • Android 4.x+ (since 1.0.0)
  • Generic Java 1.7+ platform (since 1.0.0)

Limits

Kripton has some limitations:

  • No cyclic support: it's not possible bind object with cyclic references.
  • No complex generic type was tested: for simple and quite complex generic type there should be no problems.
  • In SQLite tables need to have a long primary key.
  • DAO does not support inner join between table: when you work with SQLite module, a bean entity is associated to a table and a single DAO works with a single table.

Table of Contents

Query definition

Features

Relations

Multithread supports

Modularization

Annotations for data convertion

Annotations for SQLite ORM

Annotations for shared preferences

Clone this wiki locally