You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,19 @@
1
1
# JDXAndroidImagesExample
2
2
### A Simple Android Project Demonstrating Persistence of Binary (e.g., image) Data Using JDXA ORM
3
3
4
-
Storing some binary (e.g., image or encoded bytes) data in a separate attribute along with 'normal' data in other attributes is an important object modeling requirement for many applications. This project exemplifies how some binary data, as part of an object, can easily be stored and retrieved using SQLite database and JDXA ORM.
4
+
Storing some binary (e.g., image or encoded bytes) data in a separate attribute along with 'normal' data in other attributes is an important object modeling requirement for many applications. This project exemplifies how some binary data, as part of an object, can easily be stored and retrieved using SQLite database and JDXA ORM.
5
5
6
-
Some highlights:
6
+
##### Some highlights:
7
7
* The object model consists of a Person class that contains a byte[] attribute (named picture) to hold binary (image) data. Some US Presidents are instances of the Person class in this project.
8
8
* The binary data is stored in a 'blob' column of a database table. The other 'normal' data is stored in separate columns.
9
9
* The declarative mapping specification (in the file .../res/raw/images_example.jdx) is simple, intuitive, non-intrusive, and succinct.
10
10
* API calls for CRUD operations are simple and flexible.
11
11
* Although, in the example code, the images of the Person objects are obtained from the res\drawable folder through resource ids, there could be other sources of the pictures also (e.g. URLs or file names).
12
12
* If the image data is persistently and reliably available from non-database sources (e.g. resource ids, file names, or URLs), one may just save the source location in the database instead of the actual image data. This project is intended to illustrate how JDXA ORM can be used to easily save binary data in a database.
13
13
14
-
To run this app in your own setup, please do the following:
##### To run this app in your own setup, please do the following:
15
17
* Clone this project on your desktop.
16
18
* Get the JDXA SDK download instructions from [this link](http://softwaretree.com/v1/products/jdxa/download-jdxa.php).
17
19
* You may download just the mini version of the SDK.
@@ -23,7 +25,7 @@ JDXA is a simple yet powerful, non-intrusive, flexible, and lightweight Object-R
23
25
24
26
Adhering to some well thought-out [KISS (Keep It Simple and Straightforward) principles](http://softwaretree.com/v1/KISSPrinciples.html), JDXA boosts developer productivity and reduces maintenance hassles by eliminating endless lines of tedious SQL code.
25
27
26
-
Some of the powerful and practical features of JDXA include:
28
+
##### Some of the powerful and practical features of JDXA include:
27
29
* Declarative mapping specification between an object model and a relational model is done textually using a simple grammar (no XML complexity).
28
30
* Full flexibility in domain object modeling – one-to-one, one-to-many, and many-to-many relationships as well as class-hierarchies supported.
29
31
* POJO (Plain Old Java Objects) friendly non-intrusive programming model, which does not require you to change your Java classes in any way:
0 commit comments