com.projectdarkstar.tools.dtc.domain
Class HardwareResource

java.lang.Object
  extended by com.projectdarkstar.tools.dtc.domain.HardwareResource
All Implemented Interfaces:
Serializable

public class HardwareResource
extends Object
implements Serializable

Represents a physical hardware resource that can be used during a DTC test.

See Also:
Serialized Form

Constructor Summary
HardwareResource()
           
HardwareResource(String hostname, String lockedBy, Date lockedAt, Boolean enabled)
           
 
Method Summary
 boolean equals(Object o)
           
 Boolean getEnabled()
          Returns true if this resource is available for use during tests.
 List<HardwareResourceFamily> getFamilies()
          Returns a list of HardwareResourceFamily objects that represents the set of families that this resource is a member of.
 String getHostname()
          Returns the hostname of the resource
 Long getId()
          Returns the id of the entity in persistent storage
 Date getLockedAt()
          Returns a Date object representing the time that this resource was locked.
 String getLockedBy()
          Returns the identifier of the entity which currently has a lock on this resource.
 Long getVersionNumber()
          Returns the version number in the data store that this entity represents.
 int hashCode()
           
 void setEnabled(Boolean enabled)
           
 void setFamilies(List<HardwareResourceFamily> families)
           
 void setHostname(String hostname)
           
 void setId(Long id)
           
 void setLockedAt(Date lockedAt)
           
 void setLockedBy(String lockedBy)
           
 void setVersionNumber(Long versionNumber)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HardwareResource

public HardwareResource()

HardwareResource

public HardwareResource(String hostname,
                        String lockedBy,
                        Date lockedAt,
                        Boolean enabled)
Method Detail

getId

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

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

setVersionNumber

public void setVersionNumber(Long versionNumber)

getHostname

public String getHostname()
Returns the hostname of the resource

Returns:
hostname of the resource

setHostname

public void setHostname(String hostname)

getLockedBy

public String getLockedBy()
Returns the identifier of the entity which currently has a lock on this resource. If the resource is not locked, returns null.

Returns:
the identifier of the locking entity

setLockedBy

public void setLockedBy(String lockedBy)

getLockedAt

public Date getLockedAt()
Returns a Date object representing the time that this resource was locked. If the resource is not locked, returns null.

Returns:
the time that this resource was locked

setLockedAt

public void setLockedAt(Date lockedAt)

getEnabled

public Boolean getEnabled()
Returns true if this resource is available for use during tests. If it is not enabled, no tests may acquire a lock on it.

Returns:
whether or not this resource is enabled for testing

setEnabled

public void setEnabled(Boolean enabled)

getFamilies

public List<HardwareResourceFamily> getFamilies()
Returns a list of HardwareResourceFamily objects that represents the set of families that this resource is a member of.

Returns:
list of families for this resource

setFamilies

public void setFamilies(List<HardwareResourceFamily> families)

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.