Package io.ebean.event.changelog
Class ChangeSet
- java.lang.Object
-
- io.ebean.event.changelog.ChangeSet
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBeanChange(BeanChange beanChange)Add a bean change to the change set.List<BeanChange>getChanges()Return the bean changes.StringgetSource()Return a code that identifies the source of the change (like the name of the application).longgetTxnBatch()Returns the batch id.StringgetTxnId()Return the txnId.TxnStategetTxnState()Return the transaction state.Map<String,String>getUserContext()Return a user context value - anything you set yourself in ChangeLogListener prepare().StringgetUserId()Return the application user Id.StringgetUserIpAddress()Return the application users ip address.voidsetChanges(List<BeanChange> changes)Set the bean changes (used by JSON tools).voidsetSource(String source)Set the source of the change (like the name of the application).voidsetTxnBatch(long txnBatch)Sets the batch id (used by JSON tools).voidsetTxnId(String txnId)Set the txnId (used by JSON tools).voidsetTxnState(TxnState txnState)Set the state (used by JSON tools).voidsetUserContext(Map<String,String> userContext)Set a user context value (anything you like).voidsetUserId(String userId)Set the application user Id.voidsetUserIpAddress(String userIpAddress)Set the application users ip address.intsize()Return the number of changes in the change set.StringtoString()
-
-
-
Method Detail
-
size
public int size()
Return the number of changes in the change set.
-
addBeanChange
public void addBeanChange(BeanChange beanChange)
Add a bean change to the change set.
-
getTxnBatch
public long getTxnBatch()
Returns the batch id.
-
setTxnBatch
public void setTxnBatch(long txnBatch)
Sets the batch id (used by JSON tools).
-
getTxnState
public TxnState getTxnState()
Return the transaction state. This will be IN_PROGRESS for many changeSets in large transactions as the changeSets are sent in batches before the transaction has completed.
-
setTxnState
public void setTxnState(TxnState txnState)
Set the state (used by JSON tools).
-
getSource
public String getSource()
Return a code that identifies the source of the change (like the name of the application).
-
setSource
public void setSource(String source)
Set the source of the change (like the name of the application).
-
setUserId
public void setUserId(String userId)
Set the application user Id.This can be set by the ChangeLogListener in the prepare() method which is called in the foreground thread.
-
getUserIpAddress
public String getUserIpAddress()
Return the application users ip address.
-
setUserIpAddress
public void setUserIpAddress(String userIpAddress)
Set the application users ip address.This can be set by the ChangeLogListener in the prepare() method which is called in the foreground thread.
-
getUserContext
public Map<String,String> getUserContext()
Return a user context value - anything you set yourself in ChangeLogListener prepare().
-
setUserContext
public void setUserContext(Map<String,String> userContext)
Set a user context value (anything you like).This can be set by the ChangeLogListener in the prepare() method which is called in the foreground thread.
-
getChanges
public List<BeanChange> getChanges()
Return the bean changes.
-
setChanges
public void setChanges(List<BeanChange> changes)
Set the bean changes (used by JSON tools).
-
-