@Retention(value=CLASS)
@Target(value=METHOD)
public @interface Transactional
This annotation is intended to be used on methods to run it into a database transaction.
The method MUST have at least one parameter :
SQLiteDatabase parameter at **FIRST**
position
Example :
@EBean
public class MyBean {
@Transactional
void successfulTransaction(SQLiteDatabase db) {
db.execSQL("Some SQL");
}
@Transactional
void mehodUsingArrayParameters(SQLiteDatabase db, MySerializableBean[] parameters) {
// ...
}
}
OrmLiteDaoCopyright © 2010-2014. All Rights Reserved.