Thank you,
it should be Jena-Statements and Resources, which I want to provide.

Do the Objects need to implement Serializable for your first way?

Natanael

Am 12.08.2010 13:42, schrieb Kostya Vasilyev:
Natanael,

It just really depends on what this data structure is, how big it is,
and how it's used.

One of the primitive types supposed by Cursor is Blob, so you have:

byte[] getBlob(int columnIndex)

And a matching method in ContentValues:

void put(String key, byte[] value)

To convert between your data structure and a byte array you can use Java
serialization, or any other format.

Another way is to break down your data structure into individual pieces
and store and retrieve them individually. Define various ContentProvider
URIs to access different parts of the data structure.

-- Kostya

12.08.2010 15:12, Natanael Arndt пишет:
Hello,
I have a custom class, which represents my data-structure. This custom
class is in a normal Java-library, which is included in both projects.
I have one Project with a ContentProvider which provides this data to
Activities of other Projects.
And an other Project with an Activity, where I want to handle this
data in objects of this custom class.

How can I get this data to the Activity? The Cursor [1] only supports
primitive Types.

[1] http://developer.android.com/reference/android/database/Cursor.html





--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to