com.projectdarkstar.tools.dtc.data
Class PropertyDTO

java.lang.Object
  extended by com.projectdarkstar.tools.dtc.data.AbstractDTO
      extended by com.projectdarkstar.tools.dtc.data.PropertyDTO
All Implemented Interfaces:
Serializable

public class PropertyDTO
extends AbstractDTO

Represents a property by mapping a property name to a value.

See Also:
Serialized Form

Constructor Summary
PropertyDTO(Long id, Long versionNumber, String description, String property, String value)
           
 
Method Summary
 boolean equals(Object o)
           
 String getDescription()
           
 Long getId()
          Returns the id of the entity in persistent storage
 String getProperty()
           
 String getValue()
           
 Long getVersionNumber()
          Returns the version number in the data store that this entity represents.
 int hashCode()
           
protected  void setDescription(String description)
           
 void setId(Long id)
           
protected  void setProperty(String property)
           
protected  void setValue(String value)
           
 void updateDescription(String description)
           
 void updateProperty(String property)
           
 void updateValue(String value)
           
 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.
 
Methods inherited from class com.projectdarkstar.tools.dtc.data.AbstractDTO
checkBlank, checkNull, getFullyPopulated, getUpdatedAttributes, updateAttribute, valueToValidate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyDTO

public PropertyDTO(Long id,
                   Long versionNumber,
                   String description,
                   String property,
                   String value)
Method Detail

getId

public Long getId()
Returns the id of the entity in persistent storage

Specified by:
getId in class AbstractDTO
Returns:
id of the entity

setId

public void setId(Long id)

getVersionNumber

public Long getVersionNumber()
Returns the version number in the data store that this entity represents. Whenever an update to an object is pushed to the persistent data store, the version number is incremented.

Returns:
version number of the entity

getDescription

public String getDescription()

setDescription

protected void setDescription(String description)

updateDescription

public void updateDescription(String description)
                       throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getProperty

public String getProperty()

setProperty

protected void setProperty(String property)

updateProperty

public void updateProperty(String property)
                    throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getValue

public String getValue()

setValue

protected void setValue(String value)

updateValue

public void updateValue(String value)
                 throws DTCInvalidDataException
Throws:
DTCInvalidDataException

validate

public void validate()
              throws DTCInvalidDataException
Description copied from class: AbstractDTO
Validates that each attribute and pending updated attribute (from the updatedAttributes Map) has a valid value in the context of the particular object.

Specified by:
validate in class AbstractDTO
Throws:
DTCInvalidDataException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013. All Rights Reserved.