K - type of primary keypublic abstract class AbstractGeneralBO<K extends Serializable> extends rsbaselib.bean.AbstractBean implements GeneralBO<K>
PROPERTY_CHANGE_DATE, PROPERTY_CREATION_DATE| Constructor and Description |
|---|
AbstractGeneralBO()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
protected void |
firePropertyChange(PropertyChangeEvent evt)
Fires an event if property changed.
|
CID |
getCID()
Returns the cid.
|
GeneralDAO<K,? extends GeneralBO<K>> |
getDao()
Returns the responsible DAO.
|
Class<K> |
getKeyClass()
Returns the keyClass.
|
LockInformation |
getLockInformation()
Get the current lock information.
|
protected org.slf4j.Logger |
getLog()
Returns a logger.
|
int |
hashCode()
Hash code combining class and id.
|
protected void |
init()
Initializes this BO.
|
void |
invalidate()
Invalidates all cached data and orders BO to reload
its data from underlying persistence store.
|
boolean |
isChanged()
Returns whether this object has changed.
|
boolean |
isInvalid()
Returns true when object was invalidated.
|
LockInformation |
lock(int timeout)
Try to lock this object.
|
LockInformation |
release()
Release the lock.
|
void |
setChanged(boolean changed)
Sets the change status of this object.
|
void |
setCID(CID cid)
Sets the cid.
|
void |
setDao(GeneralDAO<K,? extends GeneralBO<K>> dao)
Sets the dao.
|
String |
toString() |
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, removePropertyChangeListener, removePropertyChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetChangeDate, getCreationDate, getId, refresh, setChangeDate, setCreationDateprotected void init()
public GeneralDAO<K,? extends GeneralBO<K>> getDao()
getDao in interface GeneralBO<K extends Serializable>public void setDao(GeneralDAO<K,? extends GeneralBO<K>> dao)
dao - the dao to setpublic CID getCID()
public void setCID(CID cid)
cid - the cid to setprotected org.slf4j.Logger getLog()
public boolean isChanged()
isChanged in interface GeneralBO<K extends Serializable>public void setChanged(boolean changed)
setChanged in interface GeneralBO<K extends Serializable>changed - new statuspublic void invalidate()
invalidate in interface GeneralBO<K extends Serializable>public LockInformation lock(int timeout)
lock in interface GeneralBO<K extends Serializable>timeout - timeout when trying to lock, 0 for no timeoutpublic LockInformation release()
release in interface GeneralBO<K extends Serializable>public LockInformation getLockInformation()
getLockInformation in interface GeneralBO<K extends Serializable>public boolean isInvalid()
isInvalid in interface GeneralBO<K extends Serializable>protected void firePropertyChange(PropertyChangeEvent evt)
firePropertyChange in class rsbaselib.bean.AbstractBeanevt - event to be firedpublic int hashCode()
Copyright © 2013. All Rights Reserved.