001// 002// NAME 003// Version.java 004// 005// COPYRIGHT 006// Confidential Property of Kabira Technologies, Inc. 007// Copyright 2007, 2009 by Kabira Technologies, Inc. 008// All rights reserved. 009// 010// DESCRIPTION 011// 012// HISTORY 013// $Revision: 1.1.2.83 $ $Date: 2012/04/03 00:11:05 $ 014// 015// WARNINGS 016// THIS FILE IS GENERATED, DO NOT EDIT 017// 018 019package com.kabira.platform.switchconfig; 020 021import java.util.*; 022import com.kabira.platform.annotation.*; 023 024 025/** 026<p> 027 A single configuration version. 028<p> 029 Each version belongs to a named configuration. 030 Each configuration can have multiple versions 031 in memory simultaneously, but only one version 032 can be active at a time. 033 034 035*/ 036 037@Managed 038@KeyList(keys = { 039 @Key(name = "ByVersionGroupKindId", ordered = false, unique = true, fields = {"versionId", "groupId", "groupKindId"}) 040 , @Key(name = "ByGroupState", ordered = false, unique = false, fields = {"groupKindId", "groupId", "state"}) 041}) 042public class Version 043{ 044 private static final String _RuntimeType = "switchconfig::Version"; 045 /** 046 <p> 047 State of version 048<p> 049 Current status of version 050 051 */ 052 public enum State 053 { 054 /** 055 Active version 056 */ 057 Active, 058 /** 059 Inactive version 060 */ 061 Inactive; 062 063 private static State from_ordinal(int ordinal) 064 { 065 return State.class.getEnumConstants()[ordinal]; 066 } 067 } 068 069/** 070Create a new Version 071 072*/ 073 protected Version() 074 { 075 super(); 076 this.versionId = null; 077 this.groupId = null; 078 this.groupKindId = null; 079 this.loadDateTime = null; 080 this.initialActiveDateTime = null; 081 this.loadCommand = null; 082 this.stateChangeDateTime = null; 083 this.principal = null; 084 this.state = null; 085 } 086 087 /** 088 <p> 089Version identifier 090 091 092 */ 093 094 public final String versionId; 095 096 097 /** 098 <p> 099Group identifier 100 101 102 */ 103 104 public final String groupId; 105 106 107 /** 108 <p> 109Group kind identifier 110 111 112 */ 113 114 public final String groupKindId; 115 116 117 /** 118 <p> 119Date and time this version loaded 120 121 122 */ 123 124 public final java.util.Date loadDateTime; 125 126 127 /** 128 <p> 129The initial activation time for this version. 130Once set this value never changes. Deactivating 131and reactivating the version does not update 132this value. 133 134 135 */ 136 137 public final java.util.Date initialActiveDateTime; 138 139 140 /** 141 <p> 142Loaded with this command 143 144 145 */ 146 147 public final String loadCommand; 148 149 150 /** 151 <p> 152Date and time version state changed 153 154 155 */ 156 157 public final java.util.Date stateChangeDateTime; 158 159 160 /** 161 <p> 162The principal who applied the state change 163 164 165 */ 166 167 public final String principal; 168 169 170 /** 171 <p> 172Version state 173 174 175 */ 176 177 public final com.kabira.platform.switchconfig.Version.State state; 178 179 180 /** 181 <p> 182 Obtains all related Config instances 183<p> 184 Builds a sequence of Config instances that 185 are related to this version 186 187@return Array of related config instances 188 189 */ 190 191 public final native com.kabira.platform.switchconfig.Config[] getConfigs(); 192 193 194 /** 195 <p> 196 Returns the named configuration to which 197 this version belongs. 198 199@return The named configuration to which this version 200 belongs. 201 202 203 */ 204 205 public final native com.kabira.platform.switchconfig.Group getName(); 206 207 208 /** 209 <p> 210 Returns true if this is the active version 211 for this configuration. 212 213@return true if active, false if inactive 214 215 */ 216 217 public final native boolean isActive(); 218 219}