org.spicefactory.pimento.intercept
Class EntityUpdate

java.lang.Object
  extended by org.spicefactory.pimento.intercept.EntityUpdate

public class EntityUpdate
extends Object

Represents a set of property values that will be applied to a persistent entity. This class may be used as an optional second parameter for interceptor methods that are annoted with @Merge to inspect the properties changed by the client.

Author:
Jens Halm

Constructor Summary
EntityUpdate(Map<String,Object> properties)
          Creates a new instance.
 
Method Summary
 boolean containsProperty(String name)
          Checks whether the property with the specified name is part of this update.
 Object getProperty(String name)
          Returns the value for the property with the specified name or null if it is not part of this update.
 String[] getPropertyNames()
          Returns the names of all properties that are part of this update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityUpdate

public EntityUpdate(Map<String,Object> properties)
Creates a new instance.

Parameters:
properties - maps property names to property values for all properties contained in this update.
Method Detail

getProperty

public Object getProperty(String name)
Returns the value for the property with the specified name or null if it is not part of this update.

Parameters:
name - the name of the property
Returns:
the value for the property with the specified name or null if it is not part of this update

containsProperty

public boolean containsProperty(String name)
Checks whether the property with the specified name is part of this update.

Parameters:
name - the name of the property
Returns:
true if the property with the specified name is part of this update

getPropertyNames

public String[] getPropertyNames()
Returns the names of all properties that are part of this update.

Returns:
the names of all properties that are part of this update