|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.projectdarkstar.tools.dtc.data.AbstractDTO
public abstract class AbstractDTO
Provides basic functionality for a Data Transfer Object in the Darkstar Test Cluster.
| Constructor Summary | |
|---|---|
AbstractDTO()
|
|
| Method Summary | |
|---|---|
protected void |
checkBlank(String key)
Checks if the given attribute is blank or null. |
protected void |
checkNull(String key)
Checks if the given attribute is null. |
Boolean |
getFullyPopulated()
|
abstract Long |
getId()
|
Map<String,Object> |
getUpdatedAttributes()
|
protected void |
updateAttribute(String attribute,
Object value)
Schedules update of the attribute with the name attribute by loading the given value into the updatedAttributes map. |
abstract void |
validate()
Validates that each attribute and pending updated attribute (from the updatedAttributes Map) has a valid value in the context of the particular object. |
protected Object |
valueToValidate(String key)
Returns the value to validate for a particular attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDTO()
| Method Detail |
|---|
public Boolean getFullyPopulated()
public Map<String,Object> getUpdatedAttributes()
protected void updateAttribute(String attribute,
Object value)
throws DTCInvalidDataException
attribute - the name of the attribute to updatevalue - the value to set the attribute to
com.projectdarkstar.tools.dtc.service.DTCInvalidDataException - if there is a problem retrieving the current value of the attribute
DTCInvalidDataException
protected Object valueToValidate(String key)
throws DTCInvalidDataException
updateAttribute(String,Object)
then that value is returned. Otherwise the current value of the attribute
is returned
key - the attribute name to get the value for
DTCInvalidDataException - if the attribute with the specified key cannot be retrieved
protected void checkBlank(String key)
throws DTCInvalidDataException
key - the attribute name to check
DTCInvalidDataException - if the attribute with the given name is a blank string
protected void checkNull(String key)
throws DTCInvalidDataException
key - the attribute name to check
DTCInvalidDataException - if the attribute with the given name is a null
public abstract void validate()
throws DTCInvalidDataException
com.projectdarkstar.tools.dtc.service.DTCInvalidDataException - if validation fails
DTCInvalidDataExceptionpublic abstract Long getId()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||