Android Getting Started with Sugar ORM
I am new to SugarORM and I want to use this library in my application. after installing this library meta tag i have to be Extend SugarRecord for all classes, for this action i create a new class as Product like this sample
@Table
public class ProductTable {
private String id;
private String count;
public ProductTable() {
}
public ProductTable(String id, String count) {
this.id = id;
this.count = count;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCount() {
return count;
}
public void setCount(String count) {
this.count = count;
}
}
and for extending SugarRecord, I want to have a class as this example:
public class ProductModel extends SugarRecord<ProductModel> {
String title;
String edition;
public ProductModel(){
}
public ProductModel(String title, String edition){
this.title = title;
this.edition = edition;
}
}
but I am getting this error:
Error:(9, 46) java: type com.orm.SugarRecord does not take parameters
for this line:
public class ProductModel extends SugarRecord<ProductModel> {
I am using this Document
+3
user4790312
source
to share