Skip to content
xcesco edited this page Apr 6, 2018 · 5 revisions

This annotation allows binding a specific field in a class when it is marked with @BindType(allFields=false). If allFields is set to true (as default), it is no useful use this annotation on fields.

You can mark public fields and fields with getter and setter.

For example, if we have a class definition like:

@BindType(allFields=false)
public class Friend {
  public int id;

  @BindType 
  public String name;
}

The JSON rapresentation is:

{"name":"dummy name"}

And XML rapresentation is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><friend><name>dummy name</name></friend>

As you can note, id field is not persisted on JSON or XML.

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