code: public void writeExternal(ObjectOutput out) throws IOException
     {
        byte[] buf = id.getBytes(Constants.DEFAULT_ENCODING);
        out.writeInt(buf.length);
        out.write(buf);
        
        if (parentId == null)
        {
           out.writeInt(-1);
        }
        else
        {
           buf = parentId.getBytes(Constants.DEFAULT_ENCODING);
           out.writeInt(buf.length);
           out.write(buf);
        }
        if (name == null)
        {
           out.writeInt(-1);
        }
        else
        {
           buf = name.getAsString(true).getBytes(Constants.DEFAULT_ENCODING);
           out.writeInt(buf.length);
           out.write(buf);
        }
        if (path == null)
        {
           out.writeInt(-1);
        }
        else
        {
           buf = path.getAsString().getBytes(Constants.DEFAULT_ENCODING);
           out.writeInt(buf.length);
           out.write(buf);
        }
     }
docs: {@inheritDoc}
  
  We need to make it serializable mostly for distributed cache in case we
  don't allow local caching