From 0ec8481c10cd8277d84c7c1a785483a0a739e5a0 Mon Sep 17 00:00:00 2001 From: abranson Date: Thu, 4 Aug 2011 00:42:34 +0200 Subject: More code cleanup: Refactored Entity Proxy Subscription to handle generics better Rewrote RemoteMap to use TreeMap instead of the internal array for order. It now sorts its keys by number if they parse, else as strings. Removed a no-longer-in-progress outcome form class --- source/com/c2kernel/persistency/outcome/Viewpoint.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) mode change 100755 => 100644 source/com/c2kernel/persistency/outcome/Viewpoint.java (limited to 'source/com/c2kernel/persistency/outcome/Viewpoint.java') diff --git a/source/com/c2kernel/persistency/outcome/Viewpoint.java b/source/com/c2kernel/persistency/outcome/Viewpoint.java old mode 100755 new mode 100644 index 7fc2aa5..a3fe283 --- a/source/com/c2kernel/persistency/outcome/Viewpoint.java +++ b/source/com/c2kernel/persistency/outcome/Viewpoint.java @@ -16,13 +16,13 @@ import com.c2kernel.process.Gateway; * $Date: 2005/10/05 07:39:36 $ * * Copyright (C) 2003 CERN - European Organization for Nuclear Research - * All rights reserved. + * All rights reserved. */ // public static final String codeRevision = // "$Revision: 1.10 $ $Date: 2005/10/05 07:39:36 $ $Author: abranson $"; public class Viewpoint implements C2KLocalObject { - + int ID = -1; // not really used in this // db fields @@ -30,9 +30,9 @@ public class Viewpoint implements C2KLocalObject { String schemaName; String name; int schemaVersion; - int eventId; + int eventId; public static final int NONE = -1; - + public Viewpoint() { eventId = NONE; sysKey = Path.INVALID; @@ -40,7 +40,7 @@ public class Viewpoint implements C2KLocalObject { schemaName = null; name = null; } - + public Viewpoint(int sysKey, String schemaName, String name, int schemaVersion, int eventId) { this.sysKey = sysKey; this.schemaName = schemaName; @@ -55,6 +55,7 @@ public class Viewpoint implements C2KLocalObject { return retVal; } + @Override public String getClusterType() { return ClusterStorage.VIEWPOINT; } @@ -80,6 +81,7 @@ public class Viewpoint implements C2KLocalObject { * Returns the name. * @return String */ + @Override public String getName() { return name; } @@ -128,6 +130,7 @@ public class Viewpoint implements C2KLocalObject { * Sets the name. * @param name The name to set */ + @Override public void setName(String name) { this.name = name; } @@ -168,8 +171,9 @@ public class Viewpoint implements C2KLocalObject { return (Event)Gateway.getStorage().get(sysKey, ClusterStorage.HISTORY+"/"+eventId, null); } - - public String toString() { + + @Override + public String toString() { return name; } -- cgit v1.2.3