com.projectdarkstar.tools.dtc.data
Class HardwareResourceFamilyDTO

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

public class HardwareResourceFamilyDTO
extends AbstractDTO

Represents a family of resources. Each resource in the family should have a common set of attributes.

See Also:
Serialized Form

Constructor Summary
HardwareResourceFamilyDTO(Long id, Long versionNumber, String name, String description, String system, String os, String memory)
           
 
Method Summary
 boolean equals(Object o)
           
 String getDescription()
           
 Long getId()
          Returns the id of the entity in persistent storage
 List<HardwareResourceDTO> getMembers()
           
 String getMemory()
           
 String getName()
           
 String getOs()
           
 String getSystem()
           
 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 setMembers(List<HardwareResourceDTO> members)
           
protected  void setMemory(String memory)
           
protected  void setName(String name)
           
protected  void setOs(String os)
           
protected  void setSystem(String system)
           
 void updateDescription(String description)
           
 void updateMembers(List<HardwareResourceDTO> members)
           
 void updateMemory(String memory)
           
 void updateName(String name)
           
 void updateOs(String os)
           
 void updateSystem(String system)
           
 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

HardwareResourceFamilyDTO

public HardwareResourceFamilyDTO(Long id,
                                 Long versionNumber,
                                 String name,
                                 String description,
                                 String system,
                                 String os,
                                 String memory)
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

getName

public String getName()

setName

protected void setName(String name)

updateName

public void updateName(String name)
                throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getDescription

public String getDescription()

setDescription

protected void setDescription(String description)

updateDescription

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

getSystem

public String getSystem()

setSystem

protected void setSystem(String system)

updateSystem

public void updateSystem(String system)
                  throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getMemory

public String getMemory()

setMemory

protected void setMemory(String memory)

updateMemory

public void updateMemory(String memory)
                  throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getOs

public String getOs()

setOs

protected void setOs(String os)

updateOs

public void updateOs(String os)
              throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getMembers

public List<HardwareResourceDTO> getMembers()

setMembers

protected void setMembers(List<HardwareResourceDTO> members)

updateMembers

public void updateMembers(List<HardwareResourceDTO> members)
                   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.