I'm trying to use greenDAO's implementsInterface
method, here is most of my main generator class:
private static void addTables(final Schema schema) {
Entity photo_pronoun = addCard(schema);
Entity simple_pronoun = addSimpleCard(schema);
Entity original_pronoun = addOriginalCard(schema);
//implementsInterface method
original_pronoun.implementsInterface("addNewCard");
simple_pronoun.implementsInterface("addNewCard");
}
private static Entity addCard(final Schema schema) {
Entity card = schema.addEntity("addNewCard");
card.addIdProperty().primaryKey().autoincrement();
card.addStringProperty("cardName").notNull();
card.addStringProperty("cardSpeech");
card.addByteArrayProperty("cardIcon");
return card;
}
private static Entity addSimpleCard(final Schema schema) {
Entity card = schema.addEntity("addSimpleCard");
card.addIdProperty().primaryKey().autoincrement();
card.addStringProperty("cardName").notNull();
card.addStringProperty("cardSpeech");
card.addByteArrayProperty("cardIcon");
return card;
}
private static Entity addOriginalCard(final Schema schema) {
Entity card = schema.addEntity("addOriginalCard");
card.addIdProperty().primaryKey().autoincrement();
card.addStringProperty("cardName").notNull();
card.addStringProperty("cardSpeech");
card.addByteArrayProperty("cardIcon");
return card;
}
When I run this to create my files I get an error in original_pronoun and in simple_pronoun on my first line at addNewCard
:
interface expected here
public class addOriginalCard implements addNewCard {
I get that error because its not an interface, but I'm confused on how to fix it. The implementsInterface
method says it takes a string but I've tried this and the database name with no joy. Can anyone tell me what I need to do here?