Package com.sas.metadata.remote

# Class MdFactoryEvent

java.lang.Object
java.util.EventObject
com.sas.metadata.remote.MdFactoryEvent

All Implemented Interfaces:
  `Serializable`, `Cloneable`

public class MdFactoryEvent extends EventObject implements Cloneable
This is the event class used for signalling when objects are created, modified, and deleted on the server. This class does not involve object stores. Instead, only when changes are persisted to the server is when these methods will be fired.

One event will be fired for each request to the server. Instead of multiple events fired for each individual object, a single event will be fired for all objects.

If the client has registered their MdFactoryListener to be notified when events are fired for specific object types (see `MdFactory.addMdFactoryListener(MdFactoryListener, String[])`, the object map will only contain objects of those specified interested types.

Since:
  9.2
See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Map<String,String>`
  `_objectMap`

  ### Fields inherited from class java.util.EventObject

  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MdFactoryEvent(MdFactory factory, String[] objectIDs)`
  Deprecated.
  use `MdFactoryEvent(MdFactory, Map)` instead
  `MdFactoryEvent(MdFactory factory, Map<String,String> objectMap)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `clone()`
  Returns a clone of this event.
  `MdFactory`
  `getFactory()`
  Returns the factory for this event
  `int`
  `getObjectCount()`
  Returns the number of objects included in this event
  `String[]`
  `getObjectIDs()`
  Returns the object ids associated with this event.
  `Map<String,String>`
  `getObjectMap()`
  Returns the object map (where the keys are the object ids and the values are the object types) associated with this event.
  `protected void`
  `setObjectMap(Map<String,String> map)`

  ### Methods inherited from class java.util.EventObject

  `getSource, toString`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### _objectMap

    protected Map<String,String> _objectMap

- ## Constructor Details

  - ### MdFactoryEvent

    public MdFactoryEvent(MdFactory factory, String[] objectIDs)
    Deprecated.
    use `MdFactoryEvent(MdFactory, Map)` instead
    Parameters:
      `factory` -
      `objectIDs` -

  - ### MdFactoryEvent

    public MdFactoryEvent(MdFactory factory, Map<String,String> objectMap)

- ## Method Details

  - ### getFactory

    public MdFactory getFactory()
    Returns the factory for this event
    Returns:
      MdFactory

  - ### getObjectMap

    public Map<String,String> getObjectMap()
    Returns the object map (where the keys are the object ids and the values are the object types) associated with this event. If the object's type is not known, the value of the map entry may be null.

    In certain cases with delete events, it may not be possible to know the object types. This is because by the time the event has been fired, the object(s) have been deleted from the server. Because of this, if the object's type is not known, the value of the map entry will be null. However, all null types will always exist in the map, even if the client specified which object types they are interested in.

    Returns:
      map of objects included in this event

  - ### getObjectIDs

    public String[] getObjectIDs()
    Returns the object ids associated with this event. This returns
    Returns:
      the array of object ids

  - ### getObjectCount

    public int getObjectCount()
    Returns the number of objects included in this event
    Returns:
      number of objects

  - ### setObjectMap

    protected void setObjectMap(Map<String,String> map)

  - ### clone

    public Object clone()
    Returns a clone of this event. The copy will contain a reference to a clone of the internal data array, not a reference to the original internal data array of this `MdFactoryEvent` object.
    Overrides:
      `clone` in class `Object`
    Returns:
      a clone of this event.