livespace.services.entities.room_presentation
Class SchematicItem

java.lang.Object
  extended by dsto.dfc.databeans.AbstractDataObject
      extended by dsto.dfc.databeans.SimpleDataObject
          extended by dsto.dfc.databeans.FancyDataObject
              extended by livespace.services.Entity
                  extended by livespace.services.entities.room_presentation.SchematicItem
All Implemented Interfaces:
IDataObject, IDataObjectChildListener, Cloneable

public class SchematicItem
extends Entity

Entity used to visually represent an entity within the livespace

Author:
karu

Field Summary
 String entityId
           
 String entityType
           
 Point location
           
 boolean present
           
static String TYPE
           
 
Fields inherited from class livespace.services.Entity
container, id, lastTouched, name, unconfirmedUpdates
 
Fields inherited from class dsto.dfc.databeans.AbstractDataObject
listeners
 
Fields inherited from interface dsto.dfc.databeans.IDataObject
OVERRIDE, PERSISTENT, PERSISTENT_OVERRIDE, TRANSIENT, TRANSIENT_OVERRIDE
 
Constructor Summary
SchematicItem()
           
SchematicItem(String id)
           
SchematicItem(String id, String name)
           
 
Method Summary
 boolean available()
          Checks to see whether the underlying entity is available
 boolean equals(Object object)
          Schematic item instances are equal if their id's are equal
 String getType()
          The type of the object (eg "room", "light", "volume", etc).
 int hashCode()
          Returns a hashCode based on the id field
 void removeEntity()
          Removes the entity
 void setEntity(Entity entity)
          Sets the entity and updates the promoted entity properties
 void setLocation(Point point)
           
 
Methods inherited from class livespace.services.Entity
create, createId, getElvin, getType, getTypeInfo, mutex, sameEntity, shallowClone, waitForProperty, waitForProperty, waitForProperty, waitForProperty
 
Methods inherited from class dsto.dfc.databeans.FancyDataObject
childPropertyChanged, getValue, isTransient, propertyIterator, setValue
 
Methods inherited from class dsto.dfc.databeans.SimpleDataObject
getFieldNames, setValue
 
Methods inherited from class dsto.dfc.databeans.AbstractDataObject
addFirstPropertyListener, addPropertyListener, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, getBeanValue, getBooleanValue, getBooleanValue, getCharValue, getCharValue, getDoubleValue, getDoubleValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getObjectValue, getPropertyListeners, getShortValue, getStringValue, registerValue, removePropertyListener, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, unregisterValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final String TYPE
See Also:
Constant Field Values

present

public boolean present

entityType

public String entityType

entityId

public String entityId

location

public Point location
Constructor Detail

SchematicItem

public SchematicItem()

SchematicItem

public SchematicItem(String id)

SchematicItem

public SchematicItem(String id,
                     String name)
Method Detail

getType

public String getType()
Description copied from class: Entity
The type of the object (eg "room", "light", "volume", etc). This must be unique to the entity class.

NOTE: it is also a good practice to provide a static field that defines the entity type on the class: eg

 public static final String ENTITY_TYPE = "room";
 

Specified by:
getType in class Entity

setEntity

public void setEntity(Entity entity)
Sets the entity and updates the promoted entity properties

Parameters:
entity -

available

public boolean available()
Checks to see whether the underlying entity is available


removeEntity

public void removeEntity()
Removes the entity


setLocation

public void setLocation(Point point)

hashCode

public int hashCode()
Returns a hashCode based on the id field

Overrides:
hashCode in class Object
Returns:
hashCode of the id value

equals

public boolean equals(Object object)
Schematic item instances are equal if their id's are equal

Overrides:
equals in class Object


Copyright © 2008 Commonwealth of Australia