WMAAuditEntryIterator.java :  » Workflow-Engines » shark » org » enhydra » shark » api » client » wfmc » audit » Java Open Source

Java Open Source » Workflow Engines » shark 
shark » org » enhydra » shark » api » client » wfmc » audit » WMAAuditEntryIterator.java
/*
 *
 * Copyright (c) 2002 Adrian Price.  All rights reserved.
 */

package org.enhydra.shark.api.client.wfmc.audit;

import java.util.NoSuchElementException;

import org.enhydra.shark.api.client.wfmc.wapi.WMIterator;
import org.enhydra.shark.api.client.wfmc.wapi.WMNoMoreDataException;

/**
 * Iterator for retrieving audit entries.
 * 
 * @author Adrian Price
 */
public class WMAAuditEntryIterator extends WMIterator {
   private WMAAuditEntry[] array;

   /**
    * Retrieves the next audit entry.
    * 
    * @return The audit entry.
    * @throws org.enhydra.shark.api.client.wfmc.wapi.WMNoMoreDataException if no more data are
    *            available.
    */
   WMAAuditEntry tsNext() throws WMNoMoreDataException {
      try {
         return array[cursor++];
      } catch (Throwable _) {
         throw new WMNoMoreDataException();
      }
   }

   public Object next() {
      try {
         return tsNext();
      } catch (WMNoMoreDataException e) {
         throw new NoSuchElementException(e.getMessage());
      }
   }

   public WMAAuditEntry[] getArray() {
      return array;
   }

   public void setArray(WMAAuditEntry[] array) {
      this.array = array;
   }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.