Previous Topic

Book Contents

Book Index

Next Topic

Collections

Sometimes, you would like to link various objects together in a flexible way. Here, collections come in useful.

Collection, or to be more specific “Business Object Collection”, is very similar to a container. In fact, it is a virtual container.

Collection is threfore a special, flexible, type of container which can contain objects of all BOTypes. You can freely add or remove them from this set. It is a very important feature of Valuemation API and it is crucial for performing some tasks. The use of collections is wide-ranging. Collections play an important role in Workflows, where we need the flexibility of grouping and linking various objects together using an easy to use “drag and drop” GUI, without needing much programming knowledge.

Collections also give you the flexibility of putting different kinds of objects together and processing them by a script. The example applications of collections are lists and selections of all sorts, which might form a part of a workflow, where you often use collections to implement queues and stacks of objects. From these collections, the workflow takes objects for processing and deletes them afterwards. Imagine you have hundreds of systems, locations or branches in your company from which you made a selection, but you would like to work only with the items where “Karl Zimmermann” is the person responsible. This is easily achievable by using a script that processes a collection of objects representing the selection you have made.

There are two main types of Collections in Valuemation API:

  • Collection (user collection)

Collection is a customizable collection with no limitation. It can contain objects of all BOTypes and you can apply all types of operations and thus make modifications to the selection of objects that the collection holds. This type of collection is essential for the use of deepCopy method, for instance.

  • BOCollection (internal collection)

BOCollection is an object that keeps the key features of Collection but is retrieved exclusively through relations contained in the BOFields. Thanks to its special “system” status, you don’t need to take any steps in order to save changes you make. If you add a person to a department, the changes will be saved automatically in an intelligent way in both “department.persons” and "person.departments” collections.

In This Chapter

N to M Relations

Creating Collections

Time-related Feature

Listing Collections

Adding Objects to Collections

Appending BOCollections to Collections

Merging BOCollections

Removing Objects from a Collection

Sorting Collections

See Also

Containers and Collections

Containers

Combatibility with JAVA Conventions

Read Limit on Catalogues and Collections

Lists

Maps