You are here: Basics Operations & Concepts > Transparent Activation/Persistence > Collections > Using TA Collections Directly

Using Transparent Activatable Collections Directly

You can use the transparent activation aware collections directly in your code. Their behavior is the same as the Java-collections. Here are a few tips:

An example:

public class Team  extends AbstractActivatable{ 

    private List<Pilot> pilots = new ActivatableArrayList<Pilot>();

    public boolean add(Pilot pilot) {
        activate(ActivationPurpose.WRITE);
        return pilots.add(pilot);
    }

    public Collection<Pilot> getPilots(){
        activate(ActivationPurpose.READ);
        return pilots;
    }
}
Team.java: Using the activation aware collections

Currently these collections are available: