基本クラスがありPeripheralます。クラスSensorとMasterは の拡張ですPeripheral。以前に保存した Peripheral オブジェクトをインスタンス化するには、ORMlite が必要です。明らかに、Peripheral反射的にインスタンス化しようとするClassInstantiationExceptionと、その抽象性のために が発生します。抽象的であるため、 ORMliteにPeripheralオブジェクトをロードさせるにはどうすればよいですか?Peripheral
これが私がやっていることのサンプルです:
@DatabaseTable(tableName="Peripheral")
abstract class Peripheral {
@DatabaseField(generatedId="true")
int _ID;
@DatabaseField
int mSerial;
}
class Sensor extends Peripheral {
}
class Master extends Peripheral {
}