如何存储对象为在Android的SQLite数据库? [英] How to store an Object into a SQLite database in Android?

查看:233
本文介绍了如何存储对象为在Android的SQLite数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些帮助使用Android.I不知道是否有可能或not.If就可以存储在对象SQLite数据库方式请给一些code片段创建能够存储表一个对象。

I need some help to store a Object in an SQLite database using Android.I don't know whether it is possible or not.If it is possible means please give some code snippets to create a table which can store an object.

问候,
Rajapandian.K

Regards, Rajapandian.K

推荐答案

如果你想存储Java对象,尝试用的系列化 BLOB存储而不是创建的OR映射的。当然,存储序列化的对象是不推荐。有很多的知名的情况下,是个头疼的那些类型的设计数据库的工作。

If you want to store a Java object, try with serialization and BLOB storing instead of creating an OR Mapping. Certainly storing serialized objects is not recommendable. There are a lot of well known cases where is a headache to work with those kind of designed databases.

这篇关于如何存储对象为在Android的SQLite数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆