001// -------------------------------------------------------------------------------- 002// Copyright 2002-2025 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 * InventoryConditionGlAccount.java 021 */ 022 023package com.echothree.model.data.inventory.server.entity; 024 025import com.echothree.model.data.inventory.common.pk.InventoryConditionGlAccountPK; 026 027import com.echothree.model.data.inventory.common.pk.InventoryConditionPK; 028import com.echothree.model.data.accounting.common.pk.ItemAccountingCategoryPK; 029import com.echothree.model.data.accounting.common.pk.GlAccountPK; 030 031import com.echothree.model.data.inventory.server.entity.InventoryCondition; 032import com.echothree.model.data.accounting.server.entity.ItemAccountingCategory; 033import com.echothree.model.data.accounting.server.entity.GlAccount; 034 035import com.echothree.model.data.inventory.server.factory.InventoryConditionFactory; 036import com.echothree.model.data.accounting.server.factory.ItemAccountingCategoryFactory; 037import com.echothree.model.data.accounting.server.factory.GlAccountFactory; 038 039import com.echothree.model.data.inventory.common.pk.InventoryConditionGlAccountPK; 040 041import com.echothree.model.data.inventory.server.value.InventoryConditionGlAccountValue; 042 043import com.echothree.model.data.inventory.server.factory.InventoryConditionGlAccountFactory; 044 045import com.echothree.util.common.exception.PersistenceException; 046import com.echothree.util.common.exception.PersistenceDatabaseException; 047import com.echothree.util.common.exception.PersistenceNotNullException; 048import com.echothree.util.common.exception.PersistenceReadOnlyException; 049 050import com.echothree.util.common.persistence.BasePK; 051 052import com.echothree.util.common.persistence.type.ByteArray; 053 054import com.echothree.util.server.persistence.BaseEntity; 055import com.echothree.util.server.persistence.EntityPermission; 056import com.echothree.util.server.persistence.Session; 057import com.echothree.util.server.persistence.ThreadSession; 058 059import java.io.Serializable; 060 061public class InventoryConditionGlAccount 062 extends BaseEntity 063 implements Serializable { 064 065 private InventoryConditionGlAccountPK _pk; 066 private InventoryConditionGlAccountValue _value; 067 068 /** Creates a new instance of InventoryConditionGlAccount */ 069 public InventoryConditionGlAccount() 070 throws PersistenceException { 071 super(); 072 } 073 074 /** Creates a new instance of InventoryConditionGlAccount */ 075 public InventoryConditionGlAccount(InventoryConditionGlAccountValue value, EntityPermission entityPermission) { 076 super(entityPermission); 077 078 _value = value; 079 _pk = value.getPrimaryKey(); 080 } 081 082 @Override 083 public InventoryConditionGlAccountFactory getBaseFactoryInstance() { 084 return InventoryConditionGlAccountFactory.getInstance(); 085 } 086 087 @Override 088 public boolean hasBeenModified() { 089 return _value.hasBeenModified(); 090 } 091 092 @Override 093 public int hashCode() { 094 return _pk.hashCode(); 095 } 096 097 @Override 098 public String toString() { 099 return _pk.toString(); 100 } 101 102 @Override 103 public boolean equals(Object other) { 104 if(this == other) 105 return true; 106 107 if(other instanceof InventoryConditionGlAccount that) { 108 InventoryConditionGlAccountValue thatValue = that.getInventoryConditionGlAccountValue(); 109 return _value.equals(thatValue); 110 } else { 111 return false; 112 } 113 } 114 115 @Override 116 public void store(Session session) 117 throws PersistenceDatabaseException { 118 getBaseFactoryInstance().store(session, this); 119 } 120 121 @Override 122 public void remove(Session session) 123 throws PersistenceDatabaseException { 124 getBaseFactoryInstance().remove(session, this); 125 } 126 127 @Override 128 public void remove() 129 throws PersistenceDatabaseException { 130 getBaseFactoryInstance().remove(ThreadSession.currentSession(), this); 131 } 132 133 public InventoryConditionGlAccountValue getInventoryConditionGlAccountValue() { 134 return _value; 135 } 136 137 public void setInventoryConditionGlAccountValue(InventoryConditionGlAccountValue value) 138 throws PersistenceReadOnlyException { 139 checkReadWrite(); 140 _value = value; 141 } 142 143 @Override 144 public InventoryConditionGlAccountPK getPrimaryKey() { 145 return _pk; 146 } 147 148 public InventoryConditionPK getInventoryConditionPK() { 149 return _value.getInventoryConditionPK(); 150 } 151 152 public InventoryCondition getInventoryCondition(Session session, EntityPermission entityPermission) { 153 return InventoryConditionFactory.getInstance().getEntityFromPK(session, entityPermission, getInventoryConditionPK()); 154 } 155 156 public InventoryCondition getInventoryCondition(EntityPermission entityPermission) { 157 return getInventoryCondition(ThreadSession.currentSession(), entityPermission); 158 } 159 160 public InventoryCondition getInventoryCondition(Session session) { 161 return getInventoryCondition(session, EntityPermission.READ_ONLY); 162 } 163 164 public InventoryCondition getInventoryCondition() { 165 return getInventoryCondition(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 166 } 167 168 public InventoryCondition getInventoryConditionForUpdate(Session session) { 169 return getInventoryCondition(session, EntityPermission.READ_WRITE); 170 } 171 172 public InventoryCondition getInventoryConditionForUpdate() { 173 return getInventoryCondition(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 174 } 175 176 public void setInventoryConditionPK(InventoryConditionPK inventoryConditionPK) 177 throws PersistenceNotNullException, PersistenceReadOnlyException { 178 checkReadWrite(); 179 _value.setInventoryConditionPK(inventoryConditionPK); 180 } 181 182 public void setInventoryCondition(InventoryCondition entity) { 183 setInventoryConditionPK(entity == null? null: entity.getPrimaryKey()); 184 } 185 186 public boolean getInventoryConditionPKHasBeenModified() { 187 return _value.getInventoryConditionPKHasBeenModified(); 188 } 189 190 public ItemAccountingCategoryPK getItemAccountingCategoryPK() { 191 return _value.getItemAccountingCategoryPK(); 192 } 193 194 public ItemAccountingCategory getItemAccountingCategory(Session session, EntityPermission entityPermission) { 195 return ItemAccountingCategoryFactory.getInstance().getEntityFromPK(session, entityPermission, getItemAccountingCategoryPK()); 196 } 197 198 public ItemAccountingCategory getItemAccountingCategory(EntityPermission entityPermission) { 199 return getItemAccountingCategory(ThreadSession.currentSession(), entityPermission); 200 } 201 202 public ItemAccountingCategory getItemAccountingCategory(Session session) { 203 return getItemAccountingCategory(session, EntityPermission.READ_ONLY); 204 } 205 206 public ItemAccountingCategory getItemAccountingCategory() { 207 return getItemAccountingCategory(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 208 } 209 210 public ItemAccountingCategory getItemAccountingCategoryForUpdate(Session session) { 211 return getItemAccountingCategory(session, EntityPermission.READ_WRITE); 212 } 213 214 public ItemAccountingCategory getItemAccountingCategoryForUpdate() { 215 return getItemAccountingCategory(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 216 } 217 218 public void setItemAccountingCategoryPK(ItemAccountingCategoryPK itemAccountingCategoryPK) 219 throws PersistenceNotNullException, PersistenceReadOnlyException { 220 checkReadWrite(); 221 _value.setItemAccountingCategoryPK(itemAccountingCategoryPK); 222 } 223 224 public void setItemAccountingCategory(ItemAccountingCategory entity) { 225 setItemAccountingCategoryPK(entity == null? null: entity.getPrimaryKey()); 226 } 227 228 public boolean getItemAccountingCategoryPKHasBeenModified() { 229 return _value.getItemAccountingCategoryPKHasBeenModified(); 230 } 231 232 public GlAccountPK getInventoryGlAccountPK() { 233 return _value.getInventoryGlAccountPK(); 234 } 235 236 public GlAccount getInventoryGlAccount(Session session, EntityPermission entityPermission) { 237 GlAccountPK pk = getInventoryGlAccountPK(); 238 GlAccount entity = pk == null? null: GlAccountFactory.getInstance().getEntityFromPK(session, entityPermission, pk); 239 240 return entity; 241 } 242 243 public GlAccount getInventoryGlAccount(EntityPermission entityPermission) { 244 return getInventoryGlAccount(ThreadSession.currentSession(), entityPermission); 245 } 246 247 public GlAccount getInventoryGlAccount(Session session) { 248 return getInventoryGlAccount(session, EntityPermission.READ_ONLY); 249 } 250 251 public GlAccount getInventoryGlAccount() { 252 return getInventoryGlAccount(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 253 } 254 255 public GlAccount getInventoryGlAccountForUpdate(Session session) { 256 return getInventoryGlAccount(session, EntityPermission.READ_WRITE); 257 } 258 259 public GlAccount getInventoryGlAccountForUpdate() { 260 return getInventoryGlAccount(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 261 } 262 263 public void setInventoryGlAccountPK(GlAccountPK inventoryGlAccountPK) 264 throws PersistenceNotNullException, PersistenceReadOnlyException { 265 checkReadWrite(); 266 _value.setInventoryGlAccountPK(inventoryGlAccountPK); 267 } 268 269 public void setInventoryGlAccount(GlAccount entity) { 270 setInventoryGlAccountPK(entity == null? null: entity.getPrimaryKey()); 271 } 272 273 public boolean getInventoryGlAccountPKHasBeenModified() { 274 return _value.getInventoryGlAccountPKHasBeenModified(); 275 } 276 277 public GlAccountPK getSalesGlAccountPK() { 278 return _value.getSalesGlAccountPK(); 279 } 280 281 public GlAccount getSalesGlAccount(Session session, EntityPermission entityPermission) { 282 GlAccountPK pk = getSalesGlAccountPK(); 283 GlAccount entity = pk == null? null: GlAccountFactory.getInstance().getEntityFromPK(session, entityPermission, pk); 284 285 return entity; 286 } 287 288 public GlAccount getSalesGlAccount(EntityPermission entityPermission) { 289 return getSalesGlAccount(ThreadSession.currentSession(), entityPermission); 290 } 291 292 public GlAccount getSalesGlAccount(Session session) { 293 return getSalesGlAccount(session, EntityPermission.READ_ONLY); 294 } 295 296 public GlAccount getSalesGlAccount() { 297 return getSalesGlAccount(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 298 } 299 300 public GlAccount getSalesGlAccountForUpdate(Session session) { 301 return getSalesGlAccount(session, EntityPermission.READ_WRITE); 302 } 303 304 public GlAccount getSalesGlAccountForUpdate() { 305 return getSalesGlAccount(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 306 } 307 308 public void setSalesGlAccountPK(GlAccountPK salesGlAccountPK) 309 throws PersistenceNotNullException, PersistenceReadOnlyException { 310 checkReadWrite(); 311 _value.setSalesGlAccountPK(salesGlAccountPK); 312 } 313 314 public void setSalesGlAccount(GlAccount entity) { 315 setSalesGlAccountPK(entity == null? null: entity.getPrimaryKey()); 316 } 317 318 public boolean getSalesGlAccountPKHasBeenModified() { 319 return _value.getSalesGlAccountPKHasBeenModified(); 320 } 321 322 public GlAccountPK getReturnsGlAccountPK() { 323 return _value.getReturnsGlAccountPK(); 324 } 325 326 public GlAccount getReturnsGlAccount(Session session, EntityPermission entityPermission) { 327 GlAccountPK pk = getReturnsGlAccountPK(); 328 GlAccount entity = pk == null? null: GlAccountFactory.getInstance().getEntityFromPK(session, entityPermission, pk); 329 330 return entity; 331 } 332 333 public GlAccount getReturnsGlAccount(EntityPermission entityPermission) { 334 return getReturnsGlAccount(ThreadSession.currentSession(), entityPermission); 335 } 336 337 public GlAccount getReturnsGlAccount(Session session) { 338 return getReturnsGlAccount(session, EntityPermission.READ_ONLY); 339 } 340 341 public GlAccount getReturnsGlAccount() { 342 return getReturnsGlAccount(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 343 } 344 345 public GlAccount getReturnsGlAccountForUpdate(Session session) { 346 return getReturnsGlAccount(session, EntityPermission.READ_WRITE); 347 } 348 349 public GlAccount getReturnsGlAccountForUpdate() { 350 return getReturnsGlAccount(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 351 } 352 353 public void setReturnsGlAccountPK(GlAccountPK returnsGlAccountPK) 354 throws PersistenceNotNullException, PersistenceReadOnlyException { 355 checkReadWrite(); 356 _value.setReturnsGlAccountPK(returnsGlAccountPK); 357 } 358 359 public void setReturnsGlAccount(GlAccount entity) { 360 setReturnsGlAccountPK(entity == null? null: entity.getPrimaryKey()); 361 } 362 363 public boolean getReturnsGlAccountPKHasBeenModified() { 364 return _value.getReturnsGlAccountPKHasBeenModified(); 365 } 366 367 public GlAccountPK getCogsGlAccountPK() { 368 return _value.getCogsGlAccountPK(); 369 } 370 371 public GlAccount getCogsGlAccount(Session session, EntityPermission entityPermission) { 372 GlAccountPK pk = getCogsGlAccountPK(); 373 GlAccount entity = pk == null? null: GlAccountFactory.getInstance().getEntityFromPK(session, entityPermission, pk); 374 375 return entity; 376 } 377 378 public GlAccount getCogsGlAccount(EntityPermission entityPermission) { 379 return getCogsGlAccount(ThreadSession.currentSession(), entityPermission); 380 } 381 382 public GlAccount getCogsGlAccount(Session session) { 383 return getCogsGlAccount(session, EntityPermission.READ_ONLY); 384 } 385 386 public GlAccount getCogsGlAccount() { 387 return getCogsGlAccount(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 388 } 389 390 public GlAccount getCogsGlAccountForUpdate(Session session) { 391 return getCogsGlAccount(session, EntityPermission.READ_WRITE); 392 } 393 394 public GlAccount getCogsGlAccountForUpdate() { 395 return getCogsGlAccount(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 396 } 397 398 public void setCogsGlAccountPK(GlAccountPK cogsGlAccountPK) 399 throws PersistenceNotNullException, PersistenceReadOnlyException { 400 checkReadWrite(); 401 _value.setCogsGlAccountPK(cogsGlAccountPK); 402 } 403 404 public void setCogsGlAccount(GlAccount entity) { 405 setCogsGlAccountPK(entity == null? null: entity.getPrimaryKey()); 406 } 407 408 public boolean getCogsGlAccountPKHasBeenModified() { 409 return _value.getCogsGlAccountPKHasBeenModified(); 410 } 411 412 public GlAccountPK getReturnsCogsGlAccountPK() { 413 return _value.getReturnsCogsGlAccountPK(); 414 } 415 416 public GlAccount getReturnsCogsGlAccount(Session session, EntityPermission entityPermission) { 417 GlAccountPK pk = getReturnsCogsGlAccountPK(); 418 GlAccount entity = pk == null? null: GlAccountFactory.getInstance().getEntityFromPK(session, entityPermission, pk); 419 420 return entity; 421 } 422 423 public GlAccount getReturnsCogsGlAccount(EntityPermission entityPermission) { 424 return getReturnsCogsGlAccount(ThreadSession.currentSession(), entityPermission); 425 } 426 427 public GlAccount getReturnsCogsGlAccount(Session session) { 428 return getReturnsCogsGlAccount(session, EntityPermission.READ_ONLY); 429 } 430 431 public GlAccount getReturnsCogsGlAccount() { 432 return getReturnsCogsGlAccount(ThreadSession.currentSession(), EntityPermission.READ_ONLY); 433 } 434 435 public GlAccount getReturnsCogsGlAccountForUpdate(Session session) { 436 return getReturnsCogsGlAccount(session, EntityPermission.READ_WRITE); 437 } 438 439 public GlAccount getReturnsCogsGlAccountForUpdate() { 440 return getReturnsCogsGlAccount(ThreadSession.currentSession(), EntityPermission.READ_WRITE); 441 } 442 443 public void setReturnsCogsGlAccountPK(GlAccountPK returnsCogsGlAccountPK) 444 throws PersistenceNotNullException, PersistenceReadOnlyException { 445 checkReadWrite(); 446 _value.setReturnsCogsGlAccountPK(returnsCogsGlAccountPK); 447 } 448 449 public void setReturnsCogsGlAccount(GlAccount entity) { 450 setReturnsCogsGlAccountPK(entity == null? null: entity.getPrimaryKey()); 451 } 452 453 public boolean getReturnsCogsGlAccountPKHasBeenModified() { 454 return _value.getReturnsCogsGlAccountPKHasBeenModified(); 455 } 456 457 public Long getFromTime() { 458 return _value.getFromTime(); 459 } 460 461 public void setFromTime(Long fromTime) 462 throws PersistenceNotNullException, PersistenceReadOnlyException { 463 checkReadWrite(); 464 _value.setFromTime(fromTime); 465 } 466 467 public boolean getFromTimeHasBeenModified() { 468 return _value.getFromTimeHasBeenModified(); 469 } 470 471 public Long getThruTime() { 472 return _value.getThruTime(); 473 } 474 475 public void setThruTime(Long thruTime) 476 throws PersistenceNotNullException, PersistenceReadOnlyException { 477 checkReadWrite(); 478 _value.setThruTime(thruTime); 479 } 480 481 public boolean getThruTimeHasBeenModified() { 482 return _value.getThruTimeHasBeenModified(); 483 } 484 485}