Previous Topic

Book Contents

Book Index

Next Topic

Types of Catalogs

Basically, there are two different types of catalogs – the default catalogs (that act as a template) and the user- customized catalogs that are placed in the folders you can see in the Sidebar in the Valuemation GUI.

Consequently, you also have two possible ways of getting the CATALOGS container  - you can get the default catalogs using Application.getCatalogs or get a particular user customized catalog from a folder using Folder.getCatalogs, each of which has its own specifics as it differs in how (or rather in which scope) the subsequent operations will affect it. Through API, the only operation having a permanent effect on the catalog is setting its search criteria, the other changes you might carry out do not appear in the database and therefore are not made permanent.

  • Getting the container of default catalogs

If you use Application.getCatalogs to get the CATALOGS container, you work with and possibly change the template of the catalog. This means that your modifications will not only apply to the existing default catalog but also to all existing and new user-customized catalogs that are and will be based on it and thus the changes will affect all users.

  • Getting the container of user-customized catalogs in a folder

If you access the user catalog using Folder.getCatalogs, your modifications will affect solely this particular instance of catalog and the changes you make will only affect the currently logged in user.

To get the parent default catalog of a user-catalog:

ApiCatalog.getSuperCatalog()

Returns the parent default catalog of a given user-customized catalog reached from a folder. If you call this method on a default catalog, it returns itself.

  • Catalog’s BOType

On creation of a catalog, which you must carry out through Valuemation GUI you select its BOType. In other words, you determine the type of BO it will hold. Consequently, your catalog only displays object of that certain type, which can be further specified using an additional search criteria that you can but don’t need to set. If you don’t set the criteria, the catalog will display all business objects of the type.

To find out the catalog’s BOType:

ApiCatalog.getBOType()

Returns the BOType of this Catalog.

  • Example

To understand properly how a catalog works, see the following figure with three catalogs, “PC", "PC high end" and "PC budget". PC is a filter of all business objects of BOType PC.

Help Image

In the upper part of the picture, you can see various business objects. In the lower part, there are three Catalogs. Catalog PC is a filter with no criteria that displays all business objects of BOType System (in our case, they are PCs). That is PC1, NB1, PC2 and PC3.  “PC high end” is a filter that displays all BObjects of type System where it’s BOField attribute “cost” is higher than or equal to 3000, in our case it means PC1 and NB1.  “PC budget” is a filter that displays all BObjects of BOType System with cost lower than 1500, the only business object matching this criteria is PC2. Business object COMP1 belongs to a different BO Type than the catalogs’ default and therefore won’t be included in any of the catalogs.

See Also

Catalogs

Reading BOs Through Catalogs

Reading Catalog Columns vs. All Fields

Setting Search Criteria