|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectfr.ocelet.runtime.AbstractEntity
public abstract class AbstractEntity
Contains the common behavior for all kinds of entities. Maintains the list of properties and their transaction mechanism.
| Field Summary | |
|---|---|
protected java.util.HashMap<java.lang.String,Hproperty<?>> |
propmap
|
protected boolean |
transaction
|
| Constructor Summary | |
|---|---|
protected |
AbstractEntity()
|
| Method Summary | ||
|---|---|---|
protected void |
defProperty(java.lang.String pname,
Hproperty<?> hp)
Defines and adds a new property to this entity. |
|
|
getProperty(java.lang.String pname)
Property getter. |
|
|
getProperty(java.lang.String pname,
int hindex)
Property getter. |
|
|
setProperty(java.lang.String pname,
AffectOperator<T> ao,
T val)
The behavior of this property setter is different if the transaction is true or false. |
|
|
setProperty(java.lang.String pname,
T val)
The behavior of this property setter is different if the transaction is true or false. |
|
void |
tabort()
Ends a transaction aborting any property change. |
|
void |
tbegin()
Begins a transaction for this entity. |
|
void |
tcommit()
Ends a transaction for this entity. |
|
java.lang.String |
toString()
Overrides the Object.toString() |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean transaction
protected java.util.HashMap<java.lang.String,Hproperty<?>> propmap
| Constructor Detail |
|---|
protected AbstractEntity()
| Method Detail |
|---|
protected void defProperty(java.lang.String pname,
Hproperty<?> hp)
pname - Name of the property to add to this entityhp - The property itself
public <T> void setProperty(java.lang.String pname,
T val)
setProperty in interface Rolepname - Name of the propertyval - Candidate new value for the property.
public <T> void setProperty(java.lang.String pname,
AffectOperator<T> ao,
T val)
setProperty in interface Rolepname - Name of the propertyao - The affectation operator Class to be applied when the
transaction will end.val - Candidate new value for the property.public <T> T getProperty(java.lang.String pname)
getProperty in interface Rolepname - Name of the property to get.
public <T> T getProperty(java.lang.String pname,
int hindex)
pname - Name of the property to get.hindex - Null or negative index to indicate at what point of the history the value must be read
public void tbegin()
tbegin in interface Rolepublic void tcommit()
tcommit in interface Rolepublic void tabort()
tabort in interface Rolepublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||