ArrayList<ScheduleVO> scheduleList = new ArrayList<ScheduleVO>();泛型我见过的是<>这里面不都是string类型之类的吗;下面那个怎么出现类名了呀;怎么解释呀;为什么要那样写呀;谢谢
/**
* 当点击每一个gridview中item时,查询出此日期上所有的日程标记(scheduleID)* @param year
* @param month
* @param day
* @return
*/
public String[] getScheduleByTagDate(int year, int month, int day){
ArrayList<ScheduleVO> scheduleList = new ArrayList<ScheduleVO>();
SQLiteDatabase db = dbOpenHelper.getReadableDatabase();
//根据时间查询出日程ID(scheduleID),一个日期可能对应多个日程ID
Cursor cursor = db.query("scheduletagdate", new String[]{"scheduleID"}, "year=? and month=? and day=?", new String[]{String.valueOf(year),String.valueOf(month),String.valueOf(day)}, null, null, null);
String scheduleIDs[] = null;
scheduleIDs = new String[cursor.getCount()];
int i = 0;
while(cursor.moveToNext()){
String scheduleID = cursor.getString(cursor.getColumnIndex("scheduleID"));
scheduleIDs[i] = scheduleID;
i++;
}
cursor.close();
db.close();
return scheduleIDs;
································
/**
* 日程的VO类
* @author jack_peng
*
*/
public class ScheduleVO implements Serializable{
private int scheduleID;
private int scheduleTypeID;
private int remindID;
private String scheduleContent;
private String scheduleDate;
private String time;
private long alartime;
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
· ·
· ·
· ·
· ·