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 * 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() 114 throws PersistenceDatabaseException { 115 getBaseFactoryInstance().store(this); 116 } 117 118 @Override 119 public void remove() 120 throws PersistenceDatabaseException { 121 getBaseFactoryInstance().remove(this); 122 } 123 124 public ItemAccountingCategoryDetailValue getItemAccountingCategoryDetailValue() { 125 return _value; 126 } 127 128 public void setItemAccountingCategoryDetailValue(ItemAccountingCategoryDetailValue value) 129 throws PersistenceReadOnlyException { 130 checkReadWrite(); 131 _value = value; 132 } 133 134 @Override 135 public ItemAccountingCategoryDetailPK getPrimaryKey() { 136 return _pk; 137 } 138 139 public ItemAccountingCategoryPK getItemAccountingCategoryPK() { 140 return _value.getItemAccountingCategoryPK(); 141 } 142 143 public ItemAccountingCategory getItemAccountingCategory(EntityPermission entityPermission) { 144 return ItemAccountingCategoryFactory.getInstance().getEntityFromPK(entityPermission, getItemAccountingCategoryPK()); 145 } 146 147 public ItemAccountingCategory getItemAccountingCategory() { 148 return getItemAccountingCategory(EntityPermission.READ_ONLY); 149 } 150 151 public ItemAccountingCategory getItemAccountingCategoryForUpdate() { 152 return getItemAccountingCategory(EntityPermission.READ_WRITE); 153 } 154 155 public void setItemAccountingCategoryPK(ItemAccountingCategoryPK itemAccountingCategoryPK) 156 throws PersistenceNotNullException, PersistenceReadOnlyException { 157 checkReadWrite(); 158 _value.setItemAccountingCategoryPK(itemAccountingCategoryPK); 159 } 160 161 public void setItemAccountingCategory(ItemAccountingCategory entity) { 162 setItemAccountingCategoryPK(entity == null? null: entity.getPrimaryKey()); 163 } 164 165 public boolean getItemAccountingCategoryPKHasBeenModified() { 166 return _value.getItemAccountingCategoryPKHasBeenModified(); 167 } 168 169 public String getItemAccountingCategoryName() { 170 return _value.getItemAccountingCategoryName(); 171 } 172 173 public void setItemAccountingCategoryName(String itemAccountingCategoryName) 174 throws PersistenceNotNullException, PersistenceReadOnlyException { 175 checkReadWrite(); 176 _value.setItemAccountingCategoryName(itemAccountingCategoryName); 177 } 178 179 public boolean getItemAccountingCategoryNameHasBeenModified() { 180 return _value.getItemAccountingCategoryNameHasBeenModified(); 181 } 182 183 public ItemAccountingCategoryPK getParentItemAccountingCategoryPK() { 184 return _value.getParentItemAccountingCategoryPK(); 185 } 186 187 public ItemAccountingCategory getParentItemAccountingCategory(EntityPermission entityPermission) { 188 ItemAccountingCategoryPK pk = getParentItemAccountingCategoryPK(); 189 ItemAccountingCategory entity = pk == null? null: ItemAccountingCategoryFactory.getInstance().getEntityFromPK(entityPermission, pk); 190 191 return entity; 192 } 193 194 public ItemAccountingCategory getParentItemAccountingCategory() { 195 return getParentItemAccountingCategory(EntityPermission.READ_ONLY); 196 } 197 198 public ItemAccountingCategory getParentItemAccountingCategoryForUpdate() { 199 return getParentItemAccountingCategory(EntityPermission.READ_WRITE); 200 } 201 202 public void setParentItemAccountingCategoryPK(ItemAccountingCategoryPK parentItemAccountingCategoryPK) 203 throws PersistenceNotNullException, PersistenceReadOnlyException { 204 checkReadWrite(); 205 _value.setParentItemAccountingCategoryPK(parentItemAccountingCategoryPK); 206 } 207 208 public void setParentItemAccountingCategory(ItemAccountingCategory entity) { 209 setParentItemAccountingCategoryPK(entity == null? null: entity.getPrimaryKey()); 210 } 211 212 public boolean getParentItemAccountingCategoryPKHasBeenModified() { 213 return _value.getParentItemAccountingCategoryPKHasBeenModified(); 214 } 215 216 public GlAccountPK getInventoryGlAccountPK() { 217 return _value.getInventoryGlAccountPK(); 218 } 219 220 public GlAccount getInventoryGlAccount(EntityPermission entityPermission) { 221 GlAccountPK pk = getInventoryGlAccountPK(); 222 GlAccount entity = pk == null? null: GlAccountFactory.getInstance().getEntityFromPK(entityPermission, pk); 223 224 return entity; 225 } 226 227 public GlAccount getInventoryGlAccount() { 228 return getInventoryGlAccount(EntityPermission.READ_ONLY); 229 } 230 231 public GlAccount getInventoryGlAccountForUpdate() { 232 return getInventoryGlAccount(EntityPermission.READ_WRITE); 233 } 234 235 public void setInventoryGlAccountPK(GlAccountPK inventoryGlAccountPK) 236 throws PersistenceNotNullException, PersistenceReadOnlyException { 237 checkReadWrite(); 238 _value.setInventoryGlAccountPK(inventoryGlAccountPK); 239 } 240 241 public void setInventoryGlAccount(GlAccount entity) { 242 setInventoryGlAccountPK(entity == null? null: entity.getPrimaryKey()); 243 } 244 245 public boolean getInventoryGlAccountPKHasBeenModified() { 246 return _value.getInventoryGlAccountPKHasBeenModified(); 247 } 248 249 public GlAccountPK getSalesGlAccountPK() { 250 return _value.getSalesGlAccountPK(); 251 } 252 253 public GlAccount getSalesGlAccount(EntityPermission entityPermission) { 254 GlAccountPK pk = getSalesGlAccountPK(); 255 GlAccount entity = pk == null? null: GlAccountFactory.getInstance().getEntityFromPK(entityPermission, pk); 256 257 return entity; 258 } 259 260 public GlAccount getSalesGlAccount() { 261 return getSalesGlAccount(EntityPermission.READ_ONLY); 262 } 263 264 public GlAccount getSalesGlAccountForUpdate() { 265 return getSalesGlAccount(EntityPermission.READ_WRITE); 266 } 267 268 public void setSalesGlAccountPK(GlAccountPK salesGlAccountPK) 269 throws PersistenceNotNullException, PersistenceReadOnlyException { 270 checkReadWrite(); 271 _value.setSalesGlAccountPK(salesGlAccountPK); 272 } 273 274 public void setSalesGlAccount(GlAccount entity) { 275 setSalesGlAccountPK(entity == null? null: entity.getPrimaryKey()); 276 } 277 278 public boolean getSalesGlAccountPKHasBeenModified() { 279 return _value.getSalesGlAccountPKHasBeenModified(); 280 } 281 282 public GlAccountPK getReturnsGlAccountPK() { 283 return _value.getReturnsGlAccountPK(); 284 } 285 286 public GlAccount getReturnsGlAccount(EntityPermission entityPermission) { 287 GlAccountPK pk = getReturnsGlAccountPK(); 288 GlAccount entity = pk == null? null: GlAccountFactory.getInstance().getEntityFromPK(entityPermission, pk); 289 290 return entity; 291 } 292 293 public GlAccount getReturnsGlAccount() { 294 return getReturnsGlAccount(EntityPermission.READ_ONLY); 295 } 296 297 public GlAccount getReturnsGlAccountForUpdate() { 298 return getReturnsGlAccount(EntityPermission.READ_WRITE); 299 } 300 301 public void setReturnsGlAccountPK(GlAccountPK returnsGlAccountPK) 302 throws PersistenceNotNullException, PersistenceReadOnlyException { 303 checkReadWrite(); 304 _value.setReturnsGlAccountPK(returnsGlAccountPK); 305 } 306 307 public void setReturnsGlAccount(GlAccount entity) { 308 setReturnsGlAccountPK(entity == null? null: entity.getPrimaryKey()); 309 } 310 311 public boolean getReturnsGlAccountPKHasBeenModified() { 312 return _value.getReturnsGlAccountPKHasBeenModified(); 313 } 314 315 public GlAccountPK getCogsGlAccountPK() { 316 return _value.getCogsGlAccountPK(); 317 } 318 319 public GlAccount getCogsGlAccount(EntityPermission entityPermission) { 320 GlAccountPK pk = getCogsGlAccountPK(); 321 GlAccount entity = pk == null? null: GlAccountFactory.getInstance().getEntityFromPK(entityPermission, pk); 322 323 return entity; 324 } 325 326 public GlAccount getCogsGlAccount() { 327 return getCogsGlAccount(EntityPermission.READ_ONLY); 328 } 329 330 public GlAccount getCogsGlAccountForUpdate() { 331 return getCogsGlAccount(EntityPermission.READ_WRITE); 332 } 333 334 public void setCogsGlAccountPK(GlAccountPK cogsGlAccountPK) 335 throws PersistenceNotNullException, PersistenceReadOnlyException { 336 checkReadWrite(); 337 _value.setCogsGlAccountPK(cogsGlAccountPK); 338 } 339 340 public void setCogsGlAccount(GlAccount entity) { 341 setCogsGlAccountPK(entity == null? null: entity.getPrimaryKey()); 342 } 343 344 public boolean getCogsGlAccountPKHasBeenModified() { 345 return _value.getCogsGlAccountPKHasBeenModified(); 346 } 347 348 public GlAccountPK getReturnsCogsGlAccountPK() { 349 return _value.getReturnsCogsGlAccountPK(); 350 } 351 352 public GlAccount getReturnsCogsGlAccount(EntityPermission entityPermission) { 353 GlAccountPK pk = getReturnsCogsGlAccountPK(); 354 GlAccount entity = pk == null? null: GlAccountFactory.getInstance().getEntityFromPK(entityPermission, pk); 355 356 return entity; 357 } 358 359 public GlAccount getReturnsCogsGlAccount() { 360 return getReturnsCogsGlAccount(EntityPermission.READ_ONLY); 361 } 362 363 public GlAccount getReturnsCogsGlAccountForUpdate() { 364 return getReturnsCogsGlAccount(EntityPermission.READ_WRITE); 365 } 366 367 public void setReturnsCogsGlAccountPK(GlAccountPK returnsCogsGlAccountPK) 368 throws PersistenceNotNullException, PersistenceReadOnlyException { 369 checkReadWrite(); 370 _value.setReturnsCogsGlAccountPK(returnsCogsGlAccountPK); 371 } 372 373 public void setReturnsCogsGlAccount(GlAccount entity) { 374 setReturnsCogsGlAccountPK(entity == null? null: entity.getPrimaryKey()); 375 } 376 377 public boolean getReturnsCogsGlAccountPKHasBeenModified() { 378 return _value.getReturnsCogsGlAccountPKHasBeenModified(); 379 } 380 381 public Boolean getIsDefault() { 382 return _value.getIsDefault(); 383 } 384 385 public void setIsDefault(Boolean isDefault) 386 throws PersistenceNotNullException, PersistenceReadOnlyException { 387 checkReadWrite(); 388 _value.setIsDefault(isDefault); 389 } 390 391 public boolean getIsDefaultHasBeenModified() { 392 return _value.getIsDefaultHasBeenModified(); 393 } 394 395 public Integer getSortOrder() { 396 return _value.getSortOrder(); 397 } 398 399 public void setSortOrder(Integer sortOrder) 400 throws PersistenceNotNullException, PersistenceReadOnlyException { 401 checkReadWrite(); 402 _value.setSortOrder(sortOrder); 403 } 404 405 public boolean getSortOrderHasBeenModified() { 406 return _value.getSortOrderHasBeenModified(); 407 } 408 409 public Long getFromTime() { 410 return _value.getFromTime(); 411 } 412 413 public void setFromTime(Long fromTime) 414 throws PersistenceNotNullException, PersistenceReadOnlyException { 415 checkReadWrite(); 416 _value.setFromTime(fromTime); 417 } 418 419 public boolean getFromTimeHasBeenModified() { 420 return _value.getFromTimeHasBeenModified(); 421 } 422 423 public Long getThruTime() { 424 return _value.getThruTime(); 425 } 426 427 public void setThruTime(Long thruTime) 428 throws PersistenceNotNullException, PersistenceReadOnlyException { 429 checkReadWrite(); 430 _value.setThruTime(thruTime); 431 } 432 433 public boolean getThruTimeHasBeenModified() { 434 return _value.getThruTimeHasBeenModified(); 435 } 436 437}