|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbandy.io.SerializableVector
public class SerializableVector
| Field Summary | |
|---|---|
static java.lang.String |
CONTAINED_OBJS_CLASSNAME
|
static java.lang.String |
CONTAINED_OBJS_IDS
|
| Constructor Summary | |
|---|---|
SerializableVector()
|
|
| Method Summary | |
|---|---|
boolean |
add(Serializable serializable)
returns true if the serializable could be added, false if it could not be added because it has a different type than already stored objects |
boolean |
contains(Serializable serializable)
Checks if an object with the same id is in the vector. |
void |
deserialize(Serializer serializer,
SerializationBuffer buffer)
This method must overwrite the attributes denoted in getAttributeNames() with values read from the container provided. |
void |
deserializeSuper(Serializer serializer,
SerializationBuffer buffer)
|
java.util.Enumeration |
elements()
|
Serializable |
firstElement()
|
void |
getAttributeNames(java.util.Vector attributes)
This method must put the name of every attribute that needs to be serialized in the given Vector. |
java.lang.String |
getContainedObjectsClassName()
|
Serializable |
getCopy()
Must return a copy of the object that is equal according to the method isEuqalTo(). |
java.lang.String |
getIdName()
Must return the name of the id (e.g. |
int |
getIdValue()
Must return the value of the id. |
java.lang.String |
getLegibleString()
Must return a human readable String representation of the object. |
Serializable |
getNewInstance()
Must return a new and initialized instance. |
void |
getReferencedIdNames(java.util.Vector referenceNames)
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. |
java.lang.String |
getSerializationName()
|
Serializable |
getSuperCopy()
|
java.util.Vector |
getVector()
|
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 |
prepareStorageDeserialization(StorageValueContainer container)
This method prepares the Vector for deserialization by a StorageSerializer. |
void |
prepareStorageSerialization(Storage storage,
StorageSerializer storageSerializer)
If the vector is serialized to a storage, check if an older version if the vector already exists in the persistent storage. |
boolean |
remove(Serializable serializable)
If the serializable object is contained in this vector, it will be deleted. |
boolean |
removeFirstElement()
|
void |
serialize(Serializer serializer,
SerializationBuffer buffer)
This method must fill the container provided with the serialization- Object with values for every attribute denoted in getAttributeNames(). |
void |
setContainedObjectsClassName(java.lang.String containedObjectsClassName)
|
void |
setIdValue(int idValue)
Set the id to the given value. |
void |
setSerializationName(java.lang.String serializationName)
|
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CONTAINED_OBJS_CLASSNAME
public static final java.lang.String CONTAINED_OBJS_IDS
| Constructor Detail |
|---|
public SerializableVector()
| Method Detail |
|---|
public java.lang.String getSerializationName()
public void setSerializationName(java.lang.String serializationName)
public void setContainedObjectsClassName(java.lang.String containedObjectsClassName)
public java.lang.String getContainedObjectsClassName()
public int size()
public boolean add(Serializable serializable)
serializable -
public Serializable firstElement()
public boolean remove(Serializable serializable)
serializable -
public boolean removeFirstElement()
public java.util.Vector getVector()
public java.util.Enumeration elements()
public boolean contains(Serializable serializable)
serializable - The object to look for.
public void serialize(Serializer serializer,
SerializationBuffer buffer)
Serializable
serialize in interface Serializableserializer - -
the serializer used for call-backsbuffer - -
the serializationBuffer containing the container to write
values to
public void deserialize(Serializer serializer,
SerializationBuffer buffer)
Serializable
deserialize in interface Serializableserializer - -
the serializer used for call-backsbuffer - -
the buffer to read values from
public void deserializeSuper(Serializer serializer,
SerializationBuffer buffer)
public void prepareStorageSerialization(Storage storage,
StorageSerializer storageSerializer)
storage - Storage that shall be used for serializationstorageSerializer - Serializer that will be used for serializationpublic void prepareStorageDeserialization(StorageValueContainer container)
container - The vectors value buffer.container().public java.lang.String getLegibleString()
Serializable
getLegibleString in interface Serializable
public boolean isEqualShallow(Serializable serializableObject)
throws java.lang.ClassCastException
Serializable
isEqualShallow in interface SerializableserializableObject - -
the object to compare
java.lang.ClassCastException
public boolean isEqual(Serializable serializableObject)
throws java.lang.ClassCastException
Serializable
isEqual in interface SerializableserializableObject - -
the object to compare
java.lang.ClassCastExceptionpublic Serializable getNewInstance()
Serializable
getNewInstance in interface Serializablepublic Serializable getCopy()
Serializable
getCopy in interface Serializablepublic java.lang.String getIdName()
Serializable
getIdName in interface Serializablepublic int getIdValue()
Serializable
getIdValue in interface Serializablepublic void setIdValue(int idValue)
Serializable
setIdValue in interface SerializableidValue - -
the new id valuepublic void getAttributeNames(java.util.Vector attributes)
Serializableattributes, there must be a corresponding field in the
database for example.
getAttributeNames in interface Serializableattributes - -
the vector to be filledpublic void getReferences(java.util.Vector references)
Serializable
getReferences in interface Serializablereferences - -
the vector to be filledpublic void getReferencedIdNames(java.util.Vector referenceNames)
Serializable
getReferencedIdNames in interface SerializablereferenceNames - -
the vector to be filledpublic Serializable getSuperCopy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||