Last active
December 20, 2015 10:49
-
-
Save mdellavo/6118218 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Table("users") | |
public class User implements Entity { | |
private int id; | |
@Column("user_name") | |
private String userName; | |
} | |
Database.attach(User.class) | |
Database db = Database.getInstance(context) | |
Session session = db.createSession() | |
session.add(new User("foo")) | |
session.commit() | |
Query query = session.query(User.class); | |
query.where("name like ?%", new String[] {"blah"}); | |
query.all(new QueryListener<User>(final List<User> results) { | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment