Example: Results.java file

//  5639-D57, 5630-A36, 5630-A37, 5724-D18
// (C) COPYRIGHT International Business Machines Corp. 1997, 2002
//  All Rights Reserved * Licensed Materials - Property of IBM
//
//  DESCRIPTION:
//
//    This module is used by User Registries in WebSphere when calling the
//    getUsers and getGroups method. The user registries should use this
//    to set the list of users/groups and to indicate if there are more 
//    users/groups in the registry than requested
//
package com.ibm.websphere.security;

import java.util.List;

/**
    This module is used by User Registries in WebSphere when calling the
    getUsers and getGroups method. The user registries should use this
    to set the list of users/groups and to indicate if there are more
    users/groups in the registry than requested
 */

public class Result implements java.io.Serializable {
    /**
      Default constructor
    */
    public Result() {
    }

    /**
       Returns the list of users/groups
       @return the list of users/groups
    */
    public List getList() {
      return list;
    }

    /**
       indicates if there are more users/groups in the registry
    */
    public boolean hasMore() {
      return more;
    }
    /**
       Set the flag to indicate that there are more users/groups
       in the registry to true
    */
    public void setHasMore() {
      more = true;
    }

    /*
      Set the list of user/groups
      @param list   list of users/groups
    */
    public void setList(List list) {
      this.list = list;
    }

    private boolean more = false;
    private List list;
}