org.exolab.jms.persistence
Class PersistentString

java.lang.Object
  |
  +--org.exolab.core.foundation.PersistentObject
        |
        +--org.exolab.jms.persistence.PersistentString
All Implemented Interfaces:
java.lang.Cloneable, java.io.Externalizable, org.exolab.core.foundation.PersistentCapableIfc, java.io.Serializable

public class PersistentString
extends org.exolab.core.foundation.PersistentObject
implements java.io.Externalizable

A simple helper class to wrap strings, and make object referenses easier.

Version:
$Revision: 1.7 $ $Date: 2003/08/17 01:32:25 $
Author:
Jim Mourikis
See Also:
Serialized Form

Constructor Summary
PersistentString()
          The default constructor initialises an empty String
PersistentString(java.lang.String id)
          Initialise to the given String value
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 int length()
          Return the length of the internal String
 void readExternal(java.io.ObjectInput stream)
           
 java.lang.String toString()
          Return the internal String
 void update(java.lang.String id)
          Assign the given String value
 void writeExternal(java.io.ObjectOutput stream)
           
 
Methods inherited from class org.exolab.core.foundation.PersistentObject
clone, getId, getMinimumObjectSize, getObjectId, getObjectVersion, getVersion, setId, setMinimumObjectSize, setObjectId, setObjectVersion, setVersion
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersistentString

public PersistentString()
The default constructor initialises an empty String

PersistentString

public PersistentString(java.lang.String id)
Initialise to the given String value
Parameters:
id - The string to assign
Method Detail

update

public void update(java.lang.String id)
Assign the given String value
Parameters:
id - The string to assign

toString

public java.lang.String toString()
Return the internal String
Overrides:
toString in class java.lang.Object
Returns:
String The internal String

length

public int length()
Return the length of the internal String
Returns:
int The internal String length

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class org.exolab.core.foundation.PersistentObject

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

writeExternal

public void writeExternal(java.io.ObjectOutput stream)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class org.exolab.core.foundation.PersistentObject

readExternal

public void readExternal(java.io.ObjectInput stream)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class org.exolab.core.foundation.PersistentObject


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.