You are here: Basics Operations & Concepts > Activation > Transparent Activation > Object Types In TA

Object Types In TA

When working in TA enabled environment you must remember that db4o treats Activatable (TA Aware) and non Activatable (other) types differently.

In general we can distinguish the following types:

As it was mentioned before in TA enabled mode non-Activatable types are fully activated whereas Activatable types have 0 activation depth and are getting activated as requested.

Let's look at an example model below, which includes Activatable and non-Activatable classes:

Querying and traversing in TA enabled mode:

c#:

Customer c = container.QueryByExample(typeof(Customer)).Next();

VB:

Dim c as Customer = container.QueryByExample(GetType(Customer)).Next();

At this point the following paths should be already activated (Customer is not Activatable):

c.namec.addresses.addresses[N].firstLine

 

c.addresses[N].country - available but not activated (Activatable type).

 

Country.getState would cause the Country object to be activated

c#:

State state = c.Address[0].Country.GetState(someZipCode);

VB:

Dim state As State =
c.Address(0).Country.GetState(someZipCode);

At this point the following paths become activated

c.addresses[0].country.states.addresses[0]
.country.states[N].name

c.addresses[0].country.states[N].city.addresses[0]
.country.states[N].cities[N]

- available but not activated (Activatable type)

 

The following general rules apply:
  1. Arrays of Arrays of non Activatable types: non Activatable behavior
  2. Arrays of Arrays of Activatable types: non Activatable behavior except for leaves
  3. JDK collections: non Activatable behavior
  4. Value types with references to non Activatable reference types and to Activatable reference types: the non Activatable path should be activated fully; Activatable path stops activation.