// Path: cn.ieclipse.aorm.example/src/main/java/cn/ieclipse/aorm/example/bean/Course.java
// @Table(name = "course")
// public class Course implements Serializable {
// 
//     private static final long serialVersionUID = 4957742859044875650L;
// 
//     @Column(name = "_id", id = true)
//     private long id;
// 
//     @Column(name = "_name")
//     private String name;
// 
//     public long getId() {
//         return id;
//     }
// 
//     public void setId(long id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
// }


import java.util.List;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListAdapter;
import android.widget.TextView;
import cn.ieclipse.aorm.example.bean.Course;
/**
 * 
 */
package cn.ieclipse.aorm.example;



/**
 * @author Jamling
 * 
 */
public class CourseListActivity extends ListActivity {
    
    private CourseAdapter adapter;
    
    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position,
            long id) {
        Course s = adapter.getItem(position);
        Intent intent = new Intent(this, CourseDetailActivity.class);
        intent.putExtra(Intent.EXTRA_UID, s.getId());
        startActivity(intent);
    }
    
    @Override
    protected void add() {
        Intent intent = new Intent(this, CourseDetailActivity.class);
        startActivity(intent);
    }
    
// Path: cn.ieclipse.aorm.example/src/main/java/cn/ieclipse/aorm/example/bean/Course.java
// @Table(name = "course")
// public class Course implements Serializable {
// 
//     private static final long serialVersionUID = 4957742859044875650L;
// 
//     @Column(name = "_id", id = true)
//     private long id;
// 
//     @Column(name = "_name")
//     private String name;
// 
//     public long getId() {
//         return id;
//     }
// 
//     public void setId(long id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
// }


// Path: cn.ieclipse.aorm.example/src/main/java/cn/ieclipse/aorm/example/CourseListActivity.java
import java.util.List;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListAdapter;
import android.widget.TextView;
import cn.ieclipse.aorm.example.bean.Course;

/**
 * 
 */
package cn.ieclipse.aorm.example;



/**
 * @author Jamling
 * 
 */
public class CourseListActivity extends ListActivity {
    
    private CourseAdapter adapter;
    
    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position,
            long id) {
        Course s = adapter.getItem(position);
        Intent intent = new Intent(this, CourseDetailActivity.class);
        intent.putExtra(Intent.EXTRA_UID, s.getId());
        startActivity(intent);
    }
    
    @Override
    protected void add() {
        Intent intent = new Intent(this, CourseDetailActivity.class);
        startActivity(intent);
    }
    
    @Override