com.projectdarkstar.tools.dtc.data
Class PkgLibraryDTO

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

public class PkgLibraryDTO
extends AbstractDTO

Represents a binary package library which is required for either a ClientAppDTO, ServerAppDTO, or SystemProbeDTO to execute.

See Also:
Serialized Form

Constructor Summary
PkgLibraryDTO(Long id, Long versionNumber, String name, byte[] file)
           
 
Method Summary
 boolean equals(Object o)
           
 byte[] getFile()
          Returns the contents of the actual package library file as an array of bytes.
 Long getId()
          Returns the id of the entity in persistent storage
 String getName()
           
 List<PkgLibraryTagDTO> getTags()
          Returns a list of PkgLibraryTagDTO objects that are used to categorize libraries into groups.
 Long getVersionNumber()
          Returns the version number in the data store that this entity represents.
 int hashCode()
           
protected  void setFile(byte[] file)
           
 void setId(Long id)
           
protected  void setName(String name)
           
protected  void setTags(List<PkgLibraryTagDTO> tags)
           
 void updateFile(byte[] file)
           
 void updateName(String name)
           
 void updateTags(List<PkgLibraryTagDTO> tags)
           
 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

PkgLibraryDTO

public PkgLibraryDTO(Long id,
                     Long versionNumber,
                     String name,
                     byte[] file)
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

getFile

public byte[] getFile()
Returns the contents of the actual package library file as an array of bytes.

Returns:
the package library file

setFile

protected void setFile(byte[] file)

updateFile

public void updateFile(byte[] file)
                throws DTCInvalidDataException
Throws:
DTCInvalidDataException

getTags

public List<PkgLibraryTagDTO> getTags()
Returns a list of PkgLibraryTagDTO objects that are used to categorize libraries into groups.

Returns:
list of tags

setTags

protected void setTags(List<PkgLibraryTagDTO> tags)

updateTags

public void updateTags(List<PkgLibraryTagDTO> tags)
                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.