|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.util14.Enum14.BasicValue org.eigenbase.util14.Enum14.SerializableValue
public abstract static class Enum14.SerializableValue
SerializableValue
extends BasicValue
to provide
better support for serializable subclasses. Instances of
SerializableValue
will deserialize into members of the original
enumeration so that deserializedBasicValue == origBasicValue
will be true.
Field Summary | |
---|---|
protected int |
_ordinal
Ordinal value which, when deserialized, can be used by readResolve() to locate a matching instance in the original
enumeration. |
private static long |
serialVersionUID
SerialVersionUID created with JDK 1.5 serialver tool. |
Constructor Summary | |
---|---|
Enum14.SerializableValue(String name,
int ordinal,
String description)
Creates a new SerializableValue. |
Method Summary | |
---|---|
private void |
readObject(ObjectInputStream in)
Deserialization method reads the _ordinal value. |
protected abstract Object |
readResolve()
Subclass must implement this method to retrieve a matching instance based on the _ordinal deserialized by readObject(java.io.ObjectInputStream) . |
private void |
writeObject(ObjectOutputStream out)
Serialization method writes just the ordinal value. |
Methods inherited from class org.eigenbase.util14.Enum14.BasicValue |
---|
compareTo, equals, equals, getDescription, getName, getOrdinal, hashCode, toString, unexpected |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
protected int _ordinal
readResolve()
to locate a matching instance in the original
enumeration.
Constructor Detail |
---|
public Enum14.SerializableValue(String name, int ordinal, String description)
Method Detail |
---|
protected abstract Object readResolve() throws ObjectStreamException
_ordinal
deserialized by readObject(java.io.ObjectInputStream)
. This would typically be an instance from the original
enumeration. Current instance is the candidate object deserialized
from the ObjectInputStream. It is incomplete, cannot be used as-is,
and this method must return a valid replacement. For example,return SqlTypeName.get(_ordinal);
_ordinal
ObjectStreamException
private void readObject(ObjectInputStream in) throws IOException
_ordinal
value.
IOException
private void writeObject(ObjectOutputStream out) throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |