org.openbandy.example.bos
Class EuropeanSportscar

java.lang.Object
  extended by org.openbandy.example.bos.Car
      extended by org.openbandy.example.bos.Sportscar
          extended by org.openbandy.example.bos.EuropeanSportscar
All Implemented Interfaces:
Serializable

public class EuropeanSportscar
extends Sportscar

TODO describe purpose and usage

(c) Copyright Philipp Bolliger 2007, ALL RIGHTS RESERVED.

Version:
0.1
Author:
Philipp Bolliger (philipp@bolliger.name)

Constructor Summary
EuropeanSportscar()
           
 
Method Summary
 void deserialize(Serializer serializer, SerializationBuffer serializationBuffer)
          This method must overwrite the attributes denoted in getAttributeNames() with values read from the container provided.
 void getAttributeNames(java.util.Vector attributes)
          This method must put the name of every attribute that needs to be serialized in the given Vector.
 Serializable getCopy()
          Must return a copy of the object that is equal according to the method isEuqalTo().
 java.lang.String getLegibleString()
          Must return a human readable String representation of the object.
 int getNcap()
           
 Serializable getNewInstance()
          Must return a new and initialized instance.
 void getReferencedIdNames(java.util.Vector referencedIdNames)
          This method must put every id name of referenced objects, i.e.
 void getReferences(java.util.Vector references)
          This method must put every reference to Serializable objects, i.e.
 boolean isEqual(Serializable serializableObject)
          Must return true if the serializableObject is equal to this, except for the id but INCLUDING equality of referenced serializables.
 boolean isEqualShallow(Serializable serializableObject)
          Must return true if the serializableObject is equal to this, except for the id, EXCLUDING equality of referenced serializables.
 void serialize(Serializer serializer, SerializationBuffer serializationBuffer)
          This method must fill the container provided with the serialization- Object with values for every attribute denoted in getAttributeNames().
 void setNcap(int ncap)
           
 
Methods inherited from class org.openbandy.example.bos.Sportscar
getBhp, getSprint, setBhp, setSprint
 
Methods inherited from class org.openbandy.example.bos.Car
addTire, getBrand, getEngine, getIdName, getIdValue, getLength, getTires, setBrand, setEngine, setIdValue, setLength, setTires
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EuropeanSportscar

public EuropeanSportscar()
Method Detail

getNcap

public int getNcap()

setNcap

public void setNcap(int ncap)

serialize

public void serialize(Serializer serializer,
                      SerializationBuffer serializationBuffer)
Description copied from interface: Serializable
This method must fill the container provided with the serialization- Object with values for every attribute denoted in getAttributeNames(). Subsequently it must serialize member objects as denoted in getReferences().

Specified by:
serialize in interface Serializable
Overrides:
serialize in class Sportscar
Parameters:
serializer - - the serializer used for call-backs
serializationBuffer - - the serializationBuffer containing the container to write values to

deserialize

public void deserialize(Serializer serializer,
                        SerializationBuffer serializationBuffer)
Description copied from interface: Serializable
This method must overwrite the attributes denoted in getAttributeNames() with values read from the container provided. Subsequently it must de- serialize member objects as denoted in getReferences().

Specified by:
deserialize in interface Serializable
Overrides:
deserialize in class Sportscar
Parameters:
serializer - - the serializer used for call-backs
serializationBuffer - - the buffer to read values from

getAttributeNames

public void getAttributeNames(java.util.Vector attributes)
Description copied from interface: Serializable
This method must put the name of every attribute that needs to be serialized in the given Vector. For every String value contained in attributes, there must be a corresponding field in the database for example.

Specified by:
getAttributeNames in interface Serializable
Overrides:
getAttributeNames in class Sportscar
Parameters:
attributes - - the vector to be filled

getReferences

public void getReferences(java.util.Vector references)
Description copied from interface: Serializable
This method must put every reference to Serializable objects, i.e. member objects, in the given Vector.

Specified by:
getReferences in interface Serializable
Overrides:
getReferences in class Sportscar
Parameters:
references - - the vector to be filled

getReferencedIdNames

public void getReferencedIdNames(java.util.Vector referencedIdNames)
Description copied from interface: Serializable
This method must put every id name of referenced objects, i.e. member objects that need to be serialized, in the given Vector.

Specified by:
getReferencedIdNames in interface Serializable
Overrides:
getReferencedIdNames in class Sportscar
Parameters:
referencedIdNames - - the vector to be filled

getLegibleString

public java.lang.String getLegibleString()
Description copied from interface: Serializable
Must return a human readable String representation of the object.

Specified by:
getLegibleString in interface Serializable
Overrides:
getLegibleString in class Sportscar
Returns:
human legible string

isEqualShallow

public boolean isEqualShallow(Serializable serializableObject)
                       throws java.lang.ClassCastException
Description copied from interface: Serializable
Must return true if the serializableObject is equal to this, except for the id, EXCLUDING equality of referenced serializables.

Specified by:
isEqualShallow in interface Serializable
Overrides:
isEqualShallow in class Sportscar
Parameters:
serializableObject - - the object to compare
Returns:
true if serializableObject is equal to this
Throws:
java.lang.ClassCastException

isEqual

public boolean isEqual(Serializable serializableObject)
                throws java.lang.ClassCastException
Description copied from interface: Serializable
Must return true if the serializableObject is equal to this, except for the id but INCLUDING equality of referenced serializables.

Specified by:
isEqual in interface Serializable
Overrides:
isEqual in class Sportscar
Parameters:
serializableObject - - the object to compare
Returns:
true if serializableObject is equal to this
Throws:
java.lang.ClassCastException

getCopy

public Serializable getCopy()
Description copied from interface: Serializable
Must return a copy of the object that is equal according to the method isEuqalTo().

Specified by:
getCopy in interface Serializable
Overrides:
getCopy in class Sportscar
Returns:
copy of this

getNewInstance

public Serializable getNewInstance()
Description copied from interface: Serializable
Must return a new and initialized instance.

Specified by:
getNewInstance in interface Serializable
Overrides:
getNewInstance in class Sportscar
Returns:
New instance of concrete class.