001// -------------------------------------------------------------------------------- 002// Copyright 2002-2026 Echo Three, LLC 003// 004// Licensed under the Apache License, Version 2.0 (the "License"); 005// you may not use this file except in compliance with the License. 006// You may obtain a copy of the License at 007// 008// http://www.apache.org/licenses/LICENSE-2.0 009// 010// Unless required by applicable law or agreed to in writing, software 011// distributed under the License is distributed on an "AS IS" BASIS, 012// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013// See the License for the specific language governing permissions and 014// limitations under the License. 015// -------------------------------------------------------------------------------- 016// Generated File -- DO NOT EDIT BY HAND 017// -------------------------------------------------------------------------------- 018 019/** 020 * PartyTrainingClassSessionStatus.java 021 */ 022 023package com.echothree.model.data.training.server.entity; 024 025import com.echothree.model.data.training.common.pk.PartyTrainingClassSessionStatusPK; 026 027import com.echothree.model.data.training.common.pk.PartyTrainingClassSessionPK; 028import com.echothree.model.data.training.common.pk.PartyTrainingClassSessionSectionPK; 029import com.echothree.model.data.training.common.pk.PartyTrainingClassSessionPagePK; 030import com.echothree.model.data.training.common.pk.PartyTrainingClassSessionQuestionPK; 031 032import com.echothree.model.data.training.server.entity.PartyTrainingClassSession; 033import com.echothree.model.data.training.server.entity.PartyTrainingClassSessionSection; 034import com.echothree.model.data.training.server.entity.PartyTrainingClassSessionPage; 035import com.echothree.model.data.training.server.entity.PartyTrainingClassSessionQuestion; 036 037import com.echothree.model.data.training.server.factory.PartyTrainingClassSessionFactory; 038import com.echothree.model.data.training.server.factory.PartyTrainingClassSessionSectionFactory; 039import com.echothree.model.data.training.server.factory.PartyTrainingClassSessionPageFactory; 040import com.echothree.model.data.training.server.factory.PartyTrainingClassSessionQuestionFactory; 041 042import com.echothree.model.data.training.common.pk.PartyTrainingClassSessionStatusPK; 043 044import com.echothree.model.data.training.server.value.PartyTrainingClassSessionStatusValue; 045 046import com.echothree.model.data.training.server.factory.PartyTrainingClassSessionStatusFactory; 047 048import com.echothree.util.common.exception.PersistenceException; 049import com.echothree.util.common.exception.PersistenceDatabaseException; 050import com.echothree.util.common.exception.PersistenceNotNullException; 051import com.echothree.util.common.exception.PersistenceReadOnlyException; 052 053import com.echothree.util.common.persistence.BasePK; 054 055import com.echothree.util.common.persistence.type.ByteArray; 056 057import com.echothree.util.server.persistence.BaseEntity; 058import com.echothree.util.server.persistence.EntityPermission; 059import com.echothree.util.server.persistence.Session; 060import com.echothree.util.server.persistence.ThreadSession; 061 062import java.io.Serializable; 063 064import javax.annotation.Nonnull; 065import javax.annotation.Nullable; 066 067public class PartyTrainingClassSessionStatus 068 extends BaseEntity 069 implements Serializable { 070 071 private PartyTrainingClassSessionStatusPK _pk; 072 private PartyTrainingClassSessionStatusValue _value; 073 074 /** Creates a new instance of PartyTrainingClassSessionStatus */ 075 public PartyTrainingClassSessionStatus() 076 throws PersistenceException { 077 super(); 078 } 079 080 /** Creates a new instance of PartyTrainingClassSessionStatus */ 081 public PartyTrainingClassSessionStatus(PartyTrainingClassSessionStatusValue value, EntityPermission entityPermission) { 082 super(entityPermission); 083 084 _value = value; 085 _pk = value.getPrimaryKey(); 086 } 087 088 @Override 089 @Nonnull 090 public PartyTrainingClassSessionStatusFactory getBaseFactoryInstance() { 091 return PartyTrainingClassSessionStatusFactory.getInstance(); 092 } 093 094 @Override 095 public boolean hasBeenModified() { 096 return _value.hasBeenModified(); 097 } 098 099 @Override 100 public int hashCode() { 101 return _pk.hashCode(); 102 } 103 104 @Override 105 @Nonnull 106 public String toString() { 107 return _pk.toString(); 108 } 109 110 @Override 111 public boolean equals(Object other) { 112 if(this == other) 113 return true; 114 115 if(other instanceof PartyTrainingClassSessionStatus that) { 116 PartyTrainingClassSessionStatusValue thatValue = that.getPartyTrainingClassSessionStatusValue(); 117 return _value.equals(thatValue); 118 } else { 119 return false; 120 } 121 } 122 123 @Override 124 public void store() 125 throws PersistenceDatabaseException { 126 getBaseFactoryInstance().store(this); 127 } 128 129 @Override 130 public void remove() 131 throws PersistenceDatabaseException { 132 getBaseFactoryInstance().remove(this); 133 } 134 135 @Nonnull 136 public PartyTrainingClassSessionStatusValue getPartyTrainingClassSessionStatusValue() { 137 return _value; 138 } 139 140 public void setPartyTrainingClassSessionStatusValue(@Nonnull PartyTrainingClassSessionStatusValue value) 141 throws PersistenceReadOnlyException { 142 checkReadWrite(); 143 _value = value; 144 } 145 146 @Override 147 @Nonnull 148 public PartyTrainingClassSessionStatusPK getPrimaryKey() { 149 return _pk; 150 } 151 152 @Nonnull 153 public PartyTrainingClassSessionPK getPartyTrainingClassSessionPK() { 154 return _value.getPartyTrainingClassSessionPK(); 155 } 156 157 @Nonnull 158 public PartyTrainingClassSession getPartyTrainingClassSession(EntityPermission entityPermission) { 159 return PartyTrainingClassSessionFactory.getInstance().getEntityFromPK(entityPermission, getPartyTrainingClassSessionPK()); 160 } 161 162 @Nonnull 163 public PartyTrainingClassSession getPartyTrainingClassSession() { 164 return getPartyTrainingClassSession(EntityPermission.READ_ONLY); 165 } 166 167 @Nonnull 168 public PartyTrainingClassSession getPartyTrainingClassSessionForUpdate() { 169 return getPartyTrainingClassSession(EntityPermission.READ_WRITE); 170 } 171 172 public void setPartyTrainingClassSessionPK(@Nonnull PartyTrainingClassSessionPK partyTrainingClassSessionPK) 173 throws PersistenceNotNullException, PersistenceReadOnlyException { 174 checkReadWrite(); 175 _value.setPartyTrainingClassSessionPK(partyTrainingClassSessionPK); 176 } 177 178 public void setPartyTrainingClassSession(@Nonnull PartyTrainingClassSession entity) { 179 setPartyTrainingClassSessionPK(entity == null ? null : entity.getPrimaryKey()); 180 } 181 182 public boolean getPartyTrainingClassSessionPKHasBeenModified() { 183 return _value.getPartyTrainingClassSessionPKHasBeenModified(); 184 } 185 186 @Nonnull 187 public Integer getPartyTrainingClassSessionSectionSequence() { 188 return _value.getPartyTrainingClassSessionSectionSequence(); 189 } 190 191 public void setPartyTrainingClassSessionSectionSequence(@Nonnull Integer partyTrainingClassSessionSectionSequence) 192 throws PersistenceNotNullException, PersistenceReadOnlyException { 193 checkReadWrite(); 194 _value.setPartyTrainingClassSessionSectionSequence(partyTrainingClassSessionSectionSequence); 195 } 196 197 public boolean getPartyTrainingClassSessionSectionSequenceHasBeenModified() { 198 return _value.getPartyTrainingClassSessionSectionSequenceHasBeenModified(); 199 } 200 201 @Nonnull 202 public Integer getPartyTrainingClassSessionPageSequence() { 203 return _value.getPartyTrainingClassSessionPageSequence(); 204 } 205 206 public void setPartyTrainingClassSessionPageSequence(@Nonnull Integer partyTrainingClassSessionPageSequence) 207 throws PersistenceNotNullException, PersistenceReadOnlyException { 208 checkReadWrite(); 209 _value.setPartyTrainingClassSessionPageSequence(partyTrainingClassSessionPageSequence); 210 } 211 212 public boolean getPartyTrainingClassSessionPageSequenceHasBeenModified() { 213 return _value.getPartyTrainingClassSessionPageSequenceHasBeenModified(); 214 } 215 216 @Nullable 217 public PartyTrainingClassSessionSectionPK getLastPartyTrainingClassSessionSectionPK() { 218 return _value.getLastPartyTrainingClassSessionSectionPK(); 219 } 220 221 @Nullable 222 public PartyTrainingClassSessionSection getLastPartyTrainingClassSessionSection(EntityPermission entityPermission) { 223 PartyTrainingClassSessionSectionPK pk = getLastPartyTrainingClassSessionSectionPK(); 224 PartyTrainingClassSessionSection entity = pk == null? null: PartyTrainingClassSessionSectionFactory.getInstance().getEntityFromPK(entityPermission, pk); 225 226 return entity; 227 } 228 229 @Nullable 230 public PartyTrainingClassSessionSection getLastPartyTrainingClassSessionSection() { 231 return getLastPartyTrainingClassSessionSection(EntityPermission.READ_ONLY); 232 } 233 234 @Nullable 235 public PartyTrainingClassSessionSection getLastPartyTrainingClassSessionSectionForUpdate() { 236 return getLastPartyTrainingClassSessionSection(EntityPermission.READ_WRITE); 237 } 238 239 public void setLastPartyTrainingClassSessionSectionPK(@Nullable PartyTrainingClassSessionSectionPK lastPartyTrainingClassSessionSectionPK) 240 throws PersistenceNotNullException, PersistenceReadOnlyException { 241 checkReadWrite(); 242 _value.setLastPartyTrainingClassSessionSectionPK(lastPartyTrainingClassSessionSectionPK); 243 } 244 245 public void setLastPartyTrainingClassSessionSection(@Nullable PartyTrainingClassSessionSection entity) { 246 setLastPartyTrainingClassSessionSectionPK(entity == null ? null : entity.getPrimaryKey()); 247 } 248 249 public boolean getLastPartyTrainingClassSessionSectionPKHasBeenModified() { 250 return _value.getLastPartyTrainingClassSessionSectionPKHasBeenModified(); 251 } 252 253 @Nullable 254 public PartyTrainingClassSessionPagePK getLastPartyTrainingClassSessionPagePK() { 255 return _value.getLastPartyTrainingClassSessionPagePK(); 256 } 257 258 @Nullable 259 public PartyTrainingClassSessionPage getLastPartyTrainingClassSessionPage(EntityPermission entityPermission) { 260 PartyTrainingClassSessionPagePK pk = getLastPartyTrainingClassSessionPagePK(); 261 PartyTrainingClassSessionPage entity = pk == null? null: PartyTrainingClassSessionPageFactory.getInstance().getEntityFromPK(entityPermission, pk); 262 263 return entity; 264 } 265 266 @Nullable 267 public PartyTrainingClassSessionPage getLastPartyTrainingClassSessionPage() { 268 return getLastPartyTrainingClassSessionPage(EntityPermission.READ_ONLY); 269 } 270 271 @Nullable 272 public PartyTrainingClassSessionPage getLastPartyTrainingClassSessionPageForUpdate() { 273 return getLastPartyTrainingClassSessionPage(EntityPermission.READ_WRITE); 274 } 275 276 public void setLastPartyTrainingClassSessionPagePK(@Nullable PartyTrainingClassSessionPagePK lastPartyTrainingClassSessionPagePK) 277 throws PersistenceNotNullException, PersistenceReadOnlyException { 278 checkReadWrite(); 279 _value.setLastPartyTrainingClassSessionPagePK(lastPartyTrainingClassSessionPagePK); 280 } 281 282 public void setLastPartyTrainingClassSessionPage(@Nullable PartyTrainingClassSessionPage entity) { 283 setLastPartyTrainingClassSessionPagePK(entity == null ? null : entity.getPrimaryKey()); 284 } 285 286 public boolean getLastPartyTrainingClassSessionPagePKHasBeenModified() { 287 return _value.getLastPartyTrainingClassSessionPagePKHasBeenModified(); 288 } 289 290 @Nullable 291 public PartyTrainingClassSessionQuestionPK getLastPartyTrainingClassSessionQuestionPK() { 292 return _value.getLastPartyTrainingClassSessionQuestionPK(); 293 } 294 295 @Nullable 296 public PartyTrainingClassSessionQuestion getLastPartyTrainingClassSessionQuestion(EntityPermission entityPermission) { 297 PartyTrainingClassSessionQuestionPK pk = getLastPartyTrainingClassSessionQuestionPK(); 298 PartyTrainingClassSessionQuestion entity = pk == null? null: PartyTrainingClassSessionQuestionFactory.getInstance().getEntityFromPK(entityPermission, pk); 299 300 return entity; 301 } 302 303 @Nullable 304 public PartyTrainingClassSessionQuestion getLastPartyTrainingClassSessionQuestion() { 305 return getLastPartyTrainingClassSessionQuestion(EntityPermission.READ_ONLY); 306 } 307 308 @Nullable 309 public PartyTrainingClassSessionQuestion getLastPartyTrainingClassSessionQuestionForUpdate() { 310 return getLastPartyTrainingClassSessionQuestion(EntityPermission.READ_WRITE); 311 } 312 313 public void setLastPartyTrainingClassSessionQuestionPK(@Nullable PartyTrainingClassSessionQuestionPK lastPartyTrainingClassSessionQuestionPK) 314 throws PersistenceNotNullException, PersistenceReadOnlyException { 315 checkReadWrite(); 316 _value.setLastPartyTrainingClassSessionQuestionPK(lastPartyTrainingClassSessionQuestionPK); 317 } 318 319 public void setLastPartyTrainingClassSessionQuestion(@Nullable PartyTrainingClassSessionQuestion entity) { 320 setLastPartyTrainingClassSessionQuestionPK(entity == null ? null : entity.getPrimaryKey()); 321 } 322 323 public boolean getLastPartyTrainingClassSessionQuestionPKHasBeenModified() { 324 return _value.getLastPartyTrainingClassSessionQuestionPKHasBeenModified(); 325 } 326 327}