Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
jvx:reference [2020/06/15 08:49] cduncan [DataRow] |
jvx:reference [2020/06/15 09:03] cduncan [MetaData] |
||
---|---|---|---|
Line 584: | Line 584: | ||
This example demonstrates how a simple launcher is implemented and why it is necessary to have a launcher in the first place. Compared with the “[[#jvx|JVx]] are of course a lot more complex than these examples, that is because they implement all the required functionality and also take care of a lot of boiler plate operations. It is taking care of all technology specific code and allows to keep your application free from knowing about the platform it runs on. | This example demonstrates how a simple launcher is implemented and why it is necessary to have a launcher in the first place. Compared with the “[[#jvx|JVx]] are of course a lot more complex than these examples, that is because they implement all the required functionality and also take care of a lot of boiler plate operations. It is taking care of all technology specific code and allows to keep your application free from knowing about the platform it runs on. | ||
- | ====== DataBooks ====== | + | ====== Data Books ====== |
- | Let’s talk about DataBooks, which allow access to data without any effort. | + | Let’s talk about data books, which allow access to data without any effort. |
===== What is it? ===== | ===== What is it? ===== | ||
Line 624: | Line 624: | ||
columnDefinition.setNullable(false); | columnDefinition.setNullable(false); | ||
</code> | </code> | ||
- | ==== MetaData ==== | + | ==== Meta Data ==== |
Most of the column definition is additional information about the column, like if it is nullable, the label of the column, default values, allowed values, and similar information. | Most of the column definition is additional information about the column, like if it is nullable, the label of the column, default values, allowed values, and similar information. | ||
Line 653: | Line 653: | ||
dataRow.setValue("COLUMN_A", "New Value"); | dataRow.setValue("COLUMN_A", "New Value"); | ||
</code> | </code> | ||
- | ===== DataPage ===== | + | ===== Data Page ===== |
- | The data page is basically a list of data rows, it also holds its own row definition, which is shared with all the contained data rows. | + | The data page is basically a list of data rows. It also holds its own row definition, which is shared with all the contained data rows. |
- | The main usage of data pages is to allow paging in a master/detail relationship. If the master selects a different row, the detail databook selects the related data page. | + | The main usage of data pages is to allow paging in a master/detail relationship. If the master selects a different row, the detail data book selects the related data page. |
- | ===== DataBook ===== | + | ===== Data Book ===== |
The data book is the main model of [[https://sourceforge.net/projects/jvx/|JVx]], it provides direct access to its current data page and data row by extending from IDataRow and IDataPage. | The data book is the main model of [[https://sourceforge.net/projects/jvx/|JVx]], it provides direct access to its current data page and data row by extending from IDataRow and IDataPage. | ||
Line 724: | Line 724: | ||
===== Master/Detail ===== | ===== Master/Detail ===== | ||
- | [[https://en.wikipedia.org/wiki/Master%E2%80%93detail_interface#Data_model|Master/detail]] is something that occurs in nearly every data model. It means simply that there is one master dataset which is referenced by one or multiple detail datasets. Or to express it in SQL: | + | [[https://en.wikipedia.org/wiki/Master%E2%80%93detail_interface#Data_model|Master/detail]] is something that occurs in nearly every data model. It simply means that there is one master data set that is referenced by one or multiple detail data sets. Or to express it in SQL: |
<code sql> | <code sql> | ||
Line 733: | Line 733: | ||
left join DETAIL d on m.ID=d.MASTER_ID; | left join DETAIL d on m.ID=d.MASTER_ID; | ||
</code> | </code> | ||
- | We can of course express a master/detail relationship when using data books. For that we just create a ''%%ReferenceDefinition%%'' and assign it to the detail data book: | + | We can, of course, express a master/detail relationship when using data books. For that, we just create a ''%%ReferenceDefinition%%'' and assign it to the detail data book: |
<code java> | <code java> | ||
Line 767: | Line 767: | ||
8| 3 | 8| 3 | ||
</code> | </code> | ||
- | Now if we select the second row in the ''%%masterDataBook%%'', the ''%%detailDataBook%%'' will just contain the rows with the corresponding ''%%MASTER_ID%%'', so 3, 4 and 5. | + | Now, if we select the second row in the ''%%masterDataBook%%'', the ''%%detailDataBook%%'' will just contain the rows with the corresponding ''%%MASTER_ID%%'', so 3, 4, and 5. |
<code> | <code> | ||
Line 778: | Line 778: | ||
3 5| 2 | 3 5| 2 | ||
</code> | </code> | ||
- | The ''%%detailDataBook%%'' is automatically adjusted according to the selection in the ''%%masterDatabook%%''. Of course this can have an arbitrary depth, too. | + | The ''%%detailDataBook%%'' is automatically adjusted according to the selection in the ''%%masterDatabook%%''. Of course, this can have an arbitrary depth too. |
===== Conclusion ===== | ===== Conclusion ===== | ||
- | The data book is the backbone of [[https://sourceforge.net/projects/jvx/|JVx]], it provides a clean and easy way to access and manipulate data. At the same time, it is flexible and can be customized to specific needs with ease. | + | The data book is the backbone of [[https://sourceforge.net/projects/jvx/|JVx]]: it provides a clean and easy way to access and manipulate data. At the same time, it is flexible and can be customized to specific needs with ease. |
====== Application Basics ====== | ====== Application Basics ====== |