| ILOG JRules User Guide > Creating Rule Projects > Concepts > Business Object Model (BOM) > Collections |
Collections |
PREVIOUS NEXT |
Collections are members that are semantically linked to a BOM class with a one-to-many relation. Collections are available in business rules in specific BAL constructs like one of <objects>, and the number of <objects> in <objects>.
For example, the following business rule uses collections:
definition set 'company1' to a company; set 'customer1' to a customer in the employees of 'company1'; if the number of books in the items of the shopping cart of 'customer1' is more than 5 ...
Collections are automatically created for members and method arguments that:
A member of type java.util.Collection is not automatically treated as a collection in business rules until you set a collection domain on it.
If the collection domain is not typed, then it is considered as typed to java.lang.Object. For example, in the following BOM class, the attribute employees is considered as a collection of java.lang.Object objects.
public class Company
{
public java.util.Collection employees domain 0,*;
}
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |