org.mmbase.core.event
Class RelationEvent
java.lang.Object
org.mmbase.core.event.Event
org.mmbase.core.event.RelationEvent
- All Implemented Interfaces:
- Cloneable, PublicCloneable, Serializable
- public class RelationEvent
- extends Event
- implements Serializable, Cloneable
This class reflects a ,,change relation event. it contains information about the kind of event (new, delete, change),
and it contains a reference to the appropriate typerel node, which allows you to find out on which relation from
which builder to which builder, the event occered. This is usefull for caching optimization.
A relation changed
event is called the twoo nodes that the relation links (or used to).
- Since:
- MMBase-1.8
- Version:
- $Id: RelationEvent.java,v 1.18 2006/06/20 21:23:57 michiel Exp $
- Author:
- Ernst Bunders
- See Also:
- Serialized Form
|
Constructor Summary |
RelationEvent(NodeEvent nodeEvent,
int relationSourceNumber,
int relationDestinationNumber,
String relationSourceType,
String relationDestinationType,
int role)
Constructor for relation event |
RelationEvent
public RelationEvent(NodeEvent nodeEvent,
int relationSourceNumber,
int relationDestinationNumber,
String relationSourceType,
String relationDestinationType,
int role)
- Constructor for relation event
- Parameters:
nodeEvent - relationSourceNumber - the nodenumber of the 'soucre' noderelationDestinationNumber - the nodenumber of the 'destination' noderelationSourceType - the builder name of the 'source' noderelationDestinationType - the builder name of the 'destination' noderole - the nodenumber of the reldef node
getRelationSourceType
public String getRelationSourceType()
- Returns:
- Returns the relationSourceType.
getRelationDestinationType
public String getRelationDestinationType()
- Returns:
- Returns the relationDestinationType.
getRelationSourceNumber
public int getRelationSourceNumber()
- Returns:
- Returns the relationSourceNumber.
getRelationDestinationNumber
public int getRelationDestinationNumber()
- Returns:
- Returns the relationDestinationNumber.
getType
public int getType()
- Description copied from class:
Event
- Most events will come in certain 'types', default contants which are provided are
Event.TYPE_NEW, Event.TYPE_CHANGE and Event.TYPE_DELETE.
- Overrides:
getType in class Event
getRole
public int getRole()
- Returns:
- the role number
hashCode
public int hashCode()
- Deprecated.
- I think this method is not needed.
equals
public boolean equals(Object o)
getNodeEvent
public NodeEvent getNodeEvent()
toString
public String toString()
MMBase build 1.8.1.20060716