com.sibvisions.rad.persist.event
Class StorageEvent

java.lang.Object
  extended by com.sibvisions.rad.persist.event.StorageEvent

public class StorageEvent
extends Object

The StorageEvent contains information about changes in an AbstractStorage.


Nested Class Summary
static class StorageEvent.ChangedType
          Specifies the type of change.
 
Constructor Summary
StorageEvent(AbstractStorage pStorage, StorageEvent.ChangedType pType, IBean pOld, IBean pNew)
          Constructs the DataRowEvent.
 
Method Summary
 IBean getNew()
          Gets the new IBean.
<T> T
getNew(Class<T> pClass)
          Gets the new POJO from type .
 IBean getOld()
          Gets the old IBean.
<T> T
getOld(Class<T> pClass)
          Gets the old POJO from type .
 IStorage getStorage()
          Gets the IStorage that is changed.
 StorageEvent.ChangedType getType()
          Gets the type of change.
 boolean isNewModified()
          Gets wheter the new object was modified after creation.
 boolean isOldModified()
          Gets wheter the old object was modified after creation.
 void setNew(Object pNew)
          Sets the new bean properties.
 void setOld(Object pOld)
          Sets the old bean properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorageEvent

public StorageEvent(AbstractStorage pStorage,
                    StorageEvent.ChangedType pType,
                    IBean pOld,
                    IBean pNew)
Constructs the DataRowEvent.

Parameters:
pStorage - the changed storage.
pType - the type of change.
pOld - the old bean or null if old bean is not allowed
pNew - the new bean or null if new bean is not allowed
Method Detail

getStorage

public IStorage getStorage()
Gets the IStorage that is changed.

Returns:
the IStorage that is changed.

getType

public StorageEvent.ChangedType getType()
Gets the type of change.

Returns:
the type of change.

setOld

public void setOld(Object pOld)
Sets the old bean properties.

Parameters:
pOld - the current old bean.

getOld

public IBean getOld()
Gets the old IBean.

Returns:
the old IBean.

getOld

public <T> T getOld(Class<T> pClass)
Gets the old POJO from type .

Type Parameters:
T - the type of the POJO.
Parameters:
pClass - the class of the POJO.
Returns:
the new POJO from type .

getNew

public IBean getNew()
Gets the new IBean.

Returns:
the new IBean.

getNew

public <T> T getNew(Class<T> pClass)
Gets the new POJO from type .

Type Parameters:
T - the type of the POJO.
Parameters:
pClass - the class of the POJO.
Returns:
the new POJO from type .

setNew

public void setNew(Object pNew)
Sets the new bean properties.

Parameters:
pNew - the current new bean.

isNewModified

public boolean isNewModified()
Gets wheter the new object was modified after creation.

Returns:
true if the new objectt was modified, false otherwise

isOldModified

public boolean isOldModified()
Gets wheter the old object was modified after creation.

Returns:
true if the old objectt was modified, false otherwise


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.