I am working on Android platform. I am using POJO class to create the Sqlite DB field names.
e.x.
class Provider {
int id;
String data;
String value;
}
Based on the above POJO class, 3 fields with the given name will be generated at SQlite DB.But i want to create the name of fields(Column) different name into Sqlite DB.
e.x.
class Provider {
@Annotation(FieldNameInDB = loginId)
int id;
@Annotation(FieldNameInDB = providerData)
String data;
@Annotation(FieldNameInDB = providerValue)
String value;
}
Above POJO class having annotation and also the column names has been given using annotation, whatever the names being used needs to be created as column names (loginId,providerData,providerValue).
So, SQLite DB will have 3 columns named as (loginId,providerData,providerValue).
Please provide solution using Java Annotation to create Custom Column names into SQLite DB and using custom names, we can retrieve the values from it.
Try it out: