dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #02586
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 869: Had to make the IdentifiableObject implement Serializable so that classes extending it are accept...
------------------------------------------------------------
revno: 869
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Thu 2009-10-15 19:28:51 +0200
message:
Had to make the IdentifiableObject implement Serializable so that classes extending it are accepted as Serializables by Hibernate. Also made it abstract as we don't want concrete instantiations of it.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/source/Source.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObject.java 2009-10-06 08:49:23 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObject.java 2009-10-15 17:28:51 +0000
@@ -1,5 +1,8 @@
package org.hisp.dhis.common;
+import java.io.Serializable;
+
+
/*
* Copyright (c) 2004-2007, University of Oslo
* All rights reserved.
@@ -31,9 +34,9 @@
* @author Bob Jolliffe
* @version $Id$
*/
-public class IdentifiableObject
+public abstract class IdentifiableObject
+ implements Serializable
{
-
/**
* The database internal identifier for this Object.
*/
@@ -142,5 +145,4 @@
{
this.description = description;
}
-
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2009-10-15 16:33:53 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2009-10-15 17:28:51 +0000
@@ -29,7 +29,6 @@
// import java.io.Serializable;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@@ -55,7 +54,6 @@
*/
public class DataElement
extends IdentifiableObject
- implements Serializable
{
public static final String TYPE_STRING = "string";
public static final String TYPE_INT = "int";
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java 2009-10-13 20:08:57 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java 2009-10-15 17:28:51 +0000
@@ -27,7 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -45,7 +44,6 @@
*/
public class DataElementCategory
extends IdentifiableObject
- implements Serializable
{
public static final String DEFAULT_NAME = "default";
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java 2009-10-15 15:59:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java 2009-10-15 17:28:51 +0000
@@ -27,7 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
@@ -43,7 +42,6 @@
*/
public class DataElementCategoryOptionCombo
extends IdentifiableObject
- implements Serializable
{
public static final String DEFAULT_NAME = "default";
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2009-10-05 16:07:55 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2009-10-15 17:28:51 +0000
@@ -27,7 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
@@ -47,9 +46,7 @@
*/
public class DataSet
extends IdentifiableObject
- implements Serializable
{
-
/**
* The PeriodType indicating the frequency that this DataSet should be used
*/
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2009-10-05 16:07:55 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/Indicator.java 2009-10-15 17:28:51 +0000
@@ -27,8 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.io.Serializable;
-
import org.hisp.dhis.common.IdentifiableObject;
import org.hisp.dhis.datadictionary.ExtendedDataElement;
@@ -38,7 +36,6 @@
*/
public class Indicator
extends IdentifiableObject
- implements Serializable
{
private Boolean annualized;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2009-10-05 16:07:55 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2009-10-15 17:28:51 +0000
@@ -27,7 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
@@ -40,9 +39,7 @@
*/
public class OrganisationUnit
extends Source
- implements Serializable
{
-
private Set<OrganisationUnit> children = new HashSet<OrganisationUnit>();
private OrganisationUnit parent;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/source/Source.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/source/Source.java 2009-10-05 16:07:55 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/source/Source.java 2009-10-15 17:28:51 +0000
@@ -27,12 +27,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
+import org.hisp.dhis.common.IdentifiableObject;
import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.common.IdentifiableObject;
/**
* @author Torgeir Lorange Ostby
@@ -40,7 +39,6 @@
*/
public abstract class Source
extends IdentifiableObject
- implements Serializable
{
protected Set<DataSet> dataSets = new HashSet<DataSet>();