wiki:UTGBCore/SQLite

Version 6 (modified by leo, 18 years ago) (diff)

--

wiki:Devel/Index

Using SQLite database

UTGB Core supports SQLite3 database access. In the default setting, the database files within utgb-core/resource folder can be accessed from UTGB core.

After launching the GWTShell, try the following URL:

http://localhost:8888/org.utgenome.gwt.utgb.UTGBResourceCenter/dispatcher?actionClass=org.utgenome.gwt.utgb.server.app.SQLiteAccessSample

The source code of this servlet is here: source:trunk/utgb/utgb-core/src/main/java/org/utgenome/gwt/utgb/server/app/SQLiteAccessSample.java

Simple SQL query processing with BeanUtil?

Prepare a bean class with appropriate getter/setters;

public class A 
{
   int id;
   String name;

   public A() {}
   
   public int getId() { return id; }
   public String getName() { return name; }
   
   public void setId(int id) { return id; }
   public void setName(String name) { return name; }
}

Sample Table data: