This is an old revision of the document!


Bank Advisers Sample

Live example

UML Model

Business Logic Code

//FetchPersonsOnly.java
public void execute() 
    // -------------<SOL id="1a6091eb-09c4-4579-8d13-14cd0d54d44c:___throw__" />
    // -------------<LOS id="1a6091eb-09c4-4579-8d13-14cd0d54d44c:___throw__" />
    {
        // ---------<SOL id="1a6091eb-09c4-4579-8d13-14cd0d54d44c:___body___" />
        List<Person> allPersons = QueryUtils.getAllInstances(Person.CLASSIFIER);
        List<Person> justPersons = new ArrayList<Person>();
        for (Person person : allPersons)
        {
			if (person instanceof BankAdviser)
			{
				continue;
			}
			justPersons.add(person);
		}
        fetchedPersons.set(justPersons);
        // ---------<LOS id="1a6091eb-09c4-4579-8d13-14cd0d54d44c:___body___" />
    }

GUI Code

package rs.sol.sampleapps;
Print/export