All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.com.ibm.as400.access.AS400FileRecordDescriptionEvent Maven / Gradle / Ivy

There is a newer version: 11.1
Show newest version
///////////////////////////////////////////////////////////////////////////////
//                                                                             
// JTOpen (AS/400 Toolbox for Java - OSS version)                              
//                                                                             
// Filename: AS400FileRecordDescriptionEvent.java
//                                                                             
// The source code contained herein is licensed under the IBM Public License   
// Version 1.0, which has been approved by the Open Source Initiative.         
// Copyright (C) 1997-2000 International Business Machines Corporation and     
// others. All rights reserved.                                                
//                                                                             
///////////////////////////////////////////////////////////////////////////////

package com.ibm.as400.access;

/**
 *The AS400FileRecordDescriptionEvent class represents a RecordDescriptionEvent.  This class is used to
 *fire events from the record description classes,
 *RecordFormat and
 *Record.
**/
public class AS400FileRecordDescriptionEvent extends java.util.EventObject
{
  private static final String copyright = "Copyright (C) 1997-2000 International Business Machines Corporation and others.";



    static final long serialVersionUID = 4L;



  /**
   *Event ID indicating that the record formats for a file
   *have been retrieved.
   *@see com.ibm.as400.access.AS400FileRecordDescription#retrieveRecordFormat
  **/
  public static final int RECORD_FORMAT_RETRIEVED = 1;
  /**
   *Event ID indicating that source files containing the RecordFormat
   *classes for a file have been created.
   *@see com.ibm.as400.access.AS400FileRecordDescription#createRecordFormatSource
  **/
  public static final int RECORD_FORMAT_SOURCE_CREATED = 2;

  // Event identifier
  private int id_;

  /**
   *Constructs a AS400FileRecordDescriptionEvent object. It uses the specified
   *source and ID.
   *@param source The object where the event originated.
   *@param id The event identifier.  The id must
   *be a valid event id for this class.
  **/
  public AS400FileRecordDescriptionEvent(Object source, int id)
  {
    super(source);
    if (id < RECORD_FORMAT_RETRIEVED || id > RECORD_FORMAT_SOURCE_CREATED)
    {
      throw new ExtendedIllegalArgumentException("id",
                ExtendedIllegalArgumentException.RANGE_NOT_VALID);
    }
    id_ = id;
  }


  /**
   *Returns the identifier for this event.
   *@return The identifier for this event.
  **/
  public int getID()
  {
    return id_;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy