Skip to content

Instantly share code, notes, and snippets.

@florent37
Last active July 14, 2017 00:51
Show Gist options
  • Save florent37/4b68d5fa07ef6e37ff24 to your computer and use it in GitHub Desktop.
Save florent37/4b68d5fa07ef6e37ff24 to your computer and use it in GitHub Desktop.
@Model
public class User {
String name;
int age;
}
List<User> user = UserDAO.findByAge(3);
User user = UserDAO.findByAge(3).first();
List<User> user = UserDAO.selectWhere()
.ageEquals(3)
.and()
.nameEquals("florent");
List<User> user = UserDAO.selectWhere()
.ageEquals(3)
.or()
.not()
.nameEquals("florent");
Inside Application
onCreate()
DAO.onCreate(this);
onDestroy()
DAO.onDestroy();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment