Android(安卓)ormlite 简介中文版
OrmLite- Lightweight Java ORM Supports Android and SQLite
Object Relational Mapping Lite (ORM Lite) provides some lightweight functionality for persisting Java objects to SQL databases while avoiding the complexity and overhead of more standard ORM packages. It supports a number of SQL databases using JDBC and also supports Sqlite with native calls to Android OS database APIs. Documentation about how to configure ORMLite for Android specifically is available in the manual.
Pleasecontact mewith any feedback or questions about Android support. See the home page for more details.
ORMLite home page
Android specific documentation in the online manual
Collection of example projects and classes for Android developers
Download files: local repositorycentral maven repositorySourceForge files
Documentation:
Getting StartedHTMLPDF
Javadocs: corejdbcandroid
Code Examples
Change log file
Open source license (ISC)
SQL Data Types
Support:
Google Groups mailing lists: usersandroid usersdevelopers
Bug tracking site
Stackoverflow questions
SourceForge project page
Source control (GIT): corejdbcandroid
ORMLite provides the following features:
Setup your classes by simply adding Java annotations.
Powerful abstract Database Access Object (DAO) classes.
Flexible QueryBuilder to easily construct simple and complex queries.
Supports MySQL, Postgres, Microsoft SQL Server, H2, Derby, HSQLDB, and Sqlite and can be extended to additional databases relatively easily.
Provisional support for DB2, Oracle, ODBC, and Netezza. Contact the author if your database type is not supported.
Handles "compiled" SQL statements for repetitive query tasks.
Supports "foreign" objects with the class field being the object but an id stored in the database table.
Basic support for database transactions.
Auto generates SQL to create and drop database tables.
Spring configuration support for DOAs and class configurations.
Support for configuring of tables and fields without annotations.
Use Annotations to Mark Classes to be Persisted
To use the package you add the @DatabaseTable annotation to the top of each class and a @DatabaseField annotation to each of the fields in the class that are to be persisted to the database. For example:
@DatabaseTable(tableName="accounts")publicclassAccount{@DatabaseField(id=true)privateStringname;@DatabaseField(canBeNull=false)privateStringpassword;...Account(){//allpersistedclassesmustdefineano-argconstructorwithatleastpackagevisibility}...}
Classes can also be configured with javax.persistence annotations, Java calls, or Spring wiring. For more details, see theonline documentation.
Sample Code Example
The ORMLite Android code includes base activity, service, and tab classes to help create and manage your database connections and DAOs. The following is a quick code example to give you a taste on how to use the package
this web page and associated content is licensed byGray Watsonunder theCreative Commons Attribution-Share Alike 3.0 License.
This page should beW3C Valid XHTMLand should work with most browsers.
http://ormlite.com/sqlite_java_android_orm.shtml
FreeSpamProtectionEggnog RecipeAndroid ORMSimple Java MagicJMX using HTTPOAuth 2.0 Simple ExampleGreat Eggnog Recipe
Your host: (none) 61.141.136.73:56001
Your browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer