/** Turn a cursor to a Building entity */ private Building cursorToBuilding(Cursor cursor) { Building building = new Building(); building.setId(cursor.getLong(0)); building.setName(cursor.getString(1)); building.setDescription(cursor.getString(2)); building.setMap(cursor.getString(3)); return building; }
public Building insert(Building building) { return this.insert(building.getName(), building.getDescription(), building.getMap()); }