Author: nzamosenchuk
Date: 2010-12-09 03:34:10 -0500 (Thu, 09 Dec 2010)
New Revision: 3624
Modified:
kernel/branches/2.3-IMPR/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java
Log:
EXOJCR-1080: Making QName serializable
Modified:
kernel/branches/2.3-IMPR/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java
===================================================================
---
kernel/branches/2.3-IMPR/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java 2010-12-09
07:50:52 UTC (rev 3623)
+++
kernel/branches/2.3-IMPR/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java 2010-12-09
08:34:10 UTC (rev 3624)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.commons.utils;
+import java.io.Serializable;
+
/**
* Created by The eXo Platform SAS . Qualified name
*
@@ -25,17 +27,24 @@
* @version $Id: $
*/
-public class QName
+public class QName implements Serializable
{
- protected final String namespace;
+ protected String namespace;
- protected final String name;
+ protected String name;
- protected final String stringName;
+ protected String stringName;
- protected final int hashCode;
+ protected int hashCode;
+ /**
+ * For serialization
+ */
+ public QName()
+ {
+ }
+
public QName(String namespace, String name)
{
if (namespace == null)
@@ -87,13 +96,19 @@
public boolean equals(Object o)
{
if (o == this)
+ {
return true;
+ }
if (o == null)
+ {
return false;
+ }
if (!(o instanceof QName))
+ {
return false;
+ }
return hashCode == o.hashCode() &&
getAsString().equals(((QName)o).getAsString());
}
Show replies by date