MiG InfoCom MiG Calendar DBConnect Guide User Manual

Page 14

Advertising
background image

MiG InfoCom AB

For

Categories

:

Parents – Since categories are hierarchical this relationship must be
persisted to the database. The actual relationship is much like for the
activities' Category mapping above only that here it points to other
category id:s. Instead of repeating the text here we refer to the
explanation for Categories above. It should be noted that there is
much less need for the join table for this property since the number of
categories are usually much smaller and the are usually all read into
memory all at once. They are also updated much less frequently.

Categories can have more than one parent. This is only for special
cases where this is needed and normally a category will only have
one parent, except for the root which has a null id and are not
persisted.

ID, Last Modified, Status and Version - These are mandatory
columns also for the categories. They are exactly the same as for
activities so they are not re-iterated here.

Custom and Non-mandatory Properties

Both activities and categories support the addition of custom
properties. You can for instance add a property to activities that states
if they are disabled or not. Chances are that you want to include this
property in the data that is persisted so that it is preserved from one
run to another.

You handle these custom properties like any property on the
activities/categories, by setting up a property mapping for it. You will
actually do this for the non-mandatory properties summary,
description and location anyway.

SimplePropertyMapping

has

been made for this and you create one of these as you create any
object in Java:

new SimplePropertyMapping(name, propertyKey,
mapType, colType)

;

Refer to the sample code provided with the plugin for examples of the
usage of these properties.

Update Tables for Increased Performance

To increase performance in a multi user environment (multiple
DBConnect clients are connected to a database at the same time)
DBConnect support the use of update tables. These tables, one for
activities and one for categories, contains rows with an id of which

DBConnect Guide

Page 14 / 25

Advertising