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