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