sorry for the double post, but i have another question, if I have a couple of classes like
Code:
Foo{
String name
String summary
}
Bar{
String header
String desc
}
if I put the @Field Annotation in them so the field names are the same (so the field name would be like title and description) would I be access them when I'm going to display the information? I would think this is possible, but I'm not sure how to do it.
I'm talking about something like
Code:
Foo {
String name;
String summary;
@Field(name = "title", index = Index.TOKENIZED)
String getName(){
return this.string;
}
@Field(name = "description", index = Index.TOKENIZED)
String getSummary(){
return this.summary
}
}
Bar {
String header;
String desc;
@Field(name = "title", index = Index.TOKENIZED)
String getHeader(){
return this.string;
}
@Field(name = "description", index = Index.TOKENIZED)
String getDesc(){
return this.summary
}
}
and then i would be able to access the title and description of the objects no matter what their class is. is this possible?