package org.warp.jcwdb.ann; import java.io.IOException; public class DBDBObjectList extends DBArrayList { @DBField(id = 1, type = DBDataType.OBJECT) private Class type; public DBDBObjectList() { super(); } public DBDBObjectList(JCWDatabase database, Class type) throws IOException { super(database); this.type = type; } @Override protected T loadItem(long uid) throws IOException { return database.getDataLoader().loadDBObject(type, uid); } @Override protected void writeItemToDisk(long uid, T item) throws IOException { database.getDataLoader().writeObjectProperty(uid, DBDataType.DATABASE_OBJECT, item); } }