From b086f57f56bf0eb9dab9cf321a0f69aaaae84347 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 30 May 2012 08:37:45 +0200 Subject: Initial Maven Conversion --- .../c2kernel/persistency/outcome/Viewpoint.java | 180 --------------------- 1 file changed, 180 deletions(-) delete mode 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 deleted file mode 100644 index a3fe283..0000000 --- a/source/com/c2kernel/persistency/outcome/Viewpoint.java +++ /dev/null @@ -1,180 +0,0 @@ -package com.c2kernel.persistency.outcome; - -import com.c2kernel.common.InvalidDataException; -import com.c2kernel.common.ObjectNotFoundException; -import com.c2kernel.entity.C2KLocalObject; -import com.c2kernel.events.Event; -import com.c2kernel.lookup.Path; -import com.c2kernel.persistency.ClusterStorage; -import com.c2kernel.persistency.ClusterStorageException; -import com.c2kernel.process.Gateway; - -/** - * @author Andrew Branson - * - * $Revision: 1.10 $ - * $Date: 2005/10/05 07:39:36 $ - * - * Copyright (C) 2003 CERN - European Organization for Nuclear Research - * 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 - int sysKey; - String schemaName; - String name; - int schemaVersion; - int eventId; - public static final int NONE = -1; - - public Viewpoint() { - eventId = NONE; - sysKey = Path.INVALID; - schemaVersion = NONE; - schemaName = null; - name = null; - } - - public Viewpoint(int sysKey, String schemaName, String name, int schemaVersion, int eventId) { - this.sysKey = sysKey; - this.schemaName = schemaName; - this.name = name; - this.schemaVersion = schemaVersion; - this.eventId = eventId; - } - - public Outcome getOutcome() throws ObjectNotFoundException, ClusterStorageException { - if (eventId == NONE) throw new ObjectNotFoundException("No last eventId defined", ""); - Outcome retVal = (Outcome)Gateway.getStorage().get(sysKey, ClusterStorage.OUTCOME+"/"+schemaName+"/"+schemaVersion+"/"+eventId, null); - return retVal; - } - - @Override - public String getClusterType() { - return ClusterStorage.VIEWPOINT; - } - - - /** - * Returns the eventId. - * @return int - */ - public int getEventId() { - return eventId; - } - - /** - * Returns the iD. - * @return int - */ - public int getID() { - return ID; - } - - /** - * Returns the name. - * @return String - */ - @Override - public String getName() { - return name; - } - - /** - * Returns the schemaName. - * @return String - */ - public String getSchemaName() { - return schemaName; - } - - /** - * Returns the schemaVersion. - * @return int - */ - public int getSchemaVersion() { - return schemaVersion; - } - - /** - * Returns the sysKey. - * @return int - */ - public int getSysKey() { - return sysKey; - } - - /** - * Sets the eventId. - * @param eventId The eventId to set - */ - public void setEventId(int eventId) { - this.eventId = eventId; - } - - /** - * Sets the iD. - * @param iD The iD to set - */ - public void setID(int iD) { - ID = iD; - } - - /** - * Sets the name. - * @param name The name to set - */ - @Override - public void setName(String name) { - this.name = name; - } - - /** - * Sets the schemaName. - * @param schemaName The schemaName to set - */ - public void setSchemaName(String schemaName) { - this.schemaName = schemaName; - } - - /** - * Sets the schemaVersion. - * @param schemaVersion The schemaVersion to set - */ - public void setSchemaVersion(int schemaVersion) { - this.schemaVersion = schemaVersion; - } - - /** - * Sets the sysKey. - * @param sysKey The sysKey to set - */ - public void setSysKey(int sysKey) { - this.sysKey = sysKey; - } - - /** - * Method getEvent. - * @return GDataRecord - */ - public Event getEvent() - throws InvalidDataException, ClusterStorageException, ObjectNotFoundException - { - if (eventId == NONE) - throw new InvalidDataException("No last eventId defined", ""); - - return (Event)Gateway.getStorage().get(sysKey, ClusterStorage.HISTORY+"/"+eventId, null); - } - - @Override - public String toString() { - return name; - } - -} -- cgit v1.2.3