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 * CarrierOptionDetail.java 021 */ 022 023package com.echothree.model.data.carrier.server.entity; 024 025import com.echothree.model.data.carrier.common.pk.CarrierOptionDetailPK; 026 027import com.echothree.model.data.carrier.common.pk.CarrierOptionPK; 028import com.echothree.model.data.party.common.pk.PartyPK; 029import com.echothree.model.data.selector.common.pk.SelectorPK; 030 031import com.echothree.model.data.carrier.server.entity.CarrierOption; 032import com.echothree.model.data.party.server.entity.Party; 033import com.echothree.model.data.selector.server.entity.Selector; 034 035import com.echothree.model.data.carrier.server.factory.CarrierOptionFactory; 036import com.echothree.model.data.party.server.factory.PartyFactory; 037import com.echothree.model.data.selector.server.factory.SelectorFactory; 038 039import com.echothree.model.data.carrier.common.pk.CarrierOptionDetailPK; 040 041import com.echothree.model.data.carrier.server.value.CarrierOptionDetailValue; 042 043import com.echothree.model.data.carrier.server.factory.CarrierOptionDetailFactory; 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 CarrierOptionDetail 062 extends BaseEntity 063 implements Serializable { 064 065 private CarrierOptionDetailPK _pk; 066 private CarrierOptionDetailValue _value; 067 068 /** Creates a new instance of CarrierOptionDetail */ 069 public CarrierOptionDetail() 070 throws PersistenceException { 071 super(); 072 } 073 074 /** Creates a new instance of CarrierOptionDetail */ 075 public CarrierOptionDetail(CarrierOptionDetailValue value, EntityPermission entityPermission) { 076 super(entityPermission); 077 078 _value = value; 079 _pk = value.getPrimaryKey(); 080 } 081 082 @Override 083 public CarrierOptionDetailFactory getBaseFactoryInstance() { 084 return CarrierOptionDetailFactory.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 CarrierOptionDetail that) { 108 CarrierOptionDetailValue thatValue = that.getCarrierOptionDetailValue(); 109 return _value.equals(thatValue); 110 } else { 111 return false; 112 } 113 } 114 115 @Override 116 public void store() 117 throws PersistenceDatabaseException { 118 getBaseFactoryInstance().store(this); 119 } 120 121 @Override 122 public void remove() 123 throws PersistenceDatabaseException { 124 getBaseFactoryInstance().remove(this); 125 } 126 127 public CarrierOptionDetailValue getCarrierOptionDetailValue() { 128 return _value; 129 } 130 131 public void setCarrierOptionDetailValue(CarrierOptionDetailValue value) 132 throws PersistenceReadOnlyException { 133 checkReadWrite(); 134 _value = value; 135 } 136 137 @Override 138 public CarrierOptionDetailPK getPrimaryKey() { 139 return _pk; 140 } 141 142 public CarrierOptionPK getCarrierOptionPK() { 143 return _value.getCarrierOptionPK(); 144 } 145 146 public CarrierOption getCarrierOption(EntityPermission entityPermission) { 147 return CarrierOptionFactory.getInstance().getEntityFromPK(entityPermission, getCarrierOptionPK()); 148 } 149 150 public CarrierOption getCarrierOption() { 151 return getCarrierOption(EntityPermission.READ_ONLY); 152 } 153 154 public CarrierOption getCarrierOptionForUpdate() { 155 return getCarrierOption(EntityPermission.READ_WRITE); 156 } 157 158 public void setCarrierOptionPK(CarrierOptionPK carrierOptionPK) 159 throws PersistenceNotNullException, PersistenceReadOnlyException { 160 checkReadWrite(); 161 _value.setCarrierOptionPK(carrierOptionPK); 162 } 163 164 public void setCarrierOption(CarrierOption entity) { 165 setCarrierOptionPK(entity == null? null: entity.getPrimaryKey()); 166 } 167 168 public boolean getCarrierOptionPKHasBeenModified() { 169 return _value.getCarrierOptionPKHasBeenModified(); 170 } 171 172 public PartyPK getCarrierPartyPK() { 173 return _value.getCarrierPartyPK(); 174 } 175 176 public Party getCarrierParty(EntityPermission entityPermission) { 177 return PartyFactory.getInstance().getEntityFromPK(entityPermission, getCarrierPartyPK()); 178 } 179 180 public Party getCarrierParty() { 181 return getCarrierParty(EntityPermission.READ_ONLY); 182 } 183 184 public Party getCarrierPartyForUpdate() { 185 return getCarrierParty(EntityPermission.READ_WRITE); 186 } 187 188 public void setCarrierPartyPK(PartyPK carrierPartyPK) 189 throws PersistenceNotNullException, PersistenceReadOnlyException { 190 checkReadWrite(); 191 _value.setCarrierPartyPK(carrierPartyPK); 192 } 193 194 public void setCarrierParty(Party entity) { 195 setCarrierPartyPK(entity == null? null: entity.getPrimaryKey()); 196 } 197 198 public boolean getCarrierPartyPKHasBeenModified() { 199 return _value.getCarrierPartyPKHasBeenModified(); 200 } 201 202 public String getCarrierOptionName() { 203 return _value.getCarrierOptionName(); 204 } 205 206 public void setCarrierOptionName(String carrierOptionName) 207 throws PersistenceNotNullException, PersistenceReadOnlyException { 208 checkReadWrite(); 209 _value.setCarrierOptionName(carrierOptionName); 210 } 211 212 public boolean getCarrierOptionNameHasBeenModified() { 213 return _value.getCarrierOptionNameHasBeenModified(); 214 } 215 216 public Boolean getIsRecommended() { 217 return _value.getIsRecommended(); 218 } 219 220 public void setIsRecommended(Boolean isRecommended) 221 throws PersistenceNotNullException, PersistenceReadOnlyException { 222 checkReadWrite(); 223 _value.setIsRecommended(isRecommended); 224 } 225 226 public boolean getIsRecommendedHasBeenModified() { 227 return _value.getIsRecommendedHasBeenModified(); 228 } 229 230 public Boolean getIsRequired() { 231 return _value.getIsRequired(); 232 } 233 234 public void setIsRequired(Boolean isRequired) 235 throws PersistenceNotNullException, PersistenceReadOnlyException { 236 checkReadWrite(); 237 _value.setIsRequired(isRequired); 238 } 239 240 public boolean getIsRequiredHasBeenModified() { 241 return _value.getIsRequiredHasBeenModified(); 242 } 243 244 public SelectorPK getRecommendedGeoCodeSelectorPK() { 245 return _value.getRecommendedGeoCodeSelectorPK(); 246 } 247 248 public Selector getRecommendedGeoCodeSelector(EntityPermission entityPermission) { 249 SelectorPK pk = getRecommendedGeoCodeSelectorPK(); 250 Selector entity = pk == null? null: SelectorFactory.getInstance().getEntityFromPK(entityPermission, pk); 251 252 return entity; 253 } 254 255 public Selector getRecommendedGeoCodeSelector() { 256 return getRecommendedGeoCodeSelector(EntityPermission.READ_ONLY); 257 } 258 259 public Selector getRecommendedGeoCodeSelectorForUpdate() { 260 return getRecommendedGeoCodeSelector(EntityPermission.READ_WRITE); 261 } 262 263 public void setRecommendedGeoCodeSelectorPK(SelectorPK recommendedGeoCodeSelectorPK) 264 throws PersistenceNotNullException, PersistenceReadOnlyException { 265 checkReadWrite(); 266 _value.setRecommendedGeoCodeSelectorPK(recommendedGeoCodeSelectorPK); 267 } 268 269 public void setRecommendedGeoCodeSelector(Selector entity) { 270 setRecommendedGeoCodeSelectorPK(entity == null? null: entity.getPrimaryKey()); 271 } 272 273 public boolean getRecommendedGeoCodeSelectorPKHasBeenModified() { 274 return _value.getRecommendedGeoCodeSelectorPKHasBeenModified(); 275 } 276 277 public SelectorPK getRequiredGeoCodeSelectorPK() { 278 return _value.getRequiredGeoCodeSelectorPK(); 279 } 280 281 public Selector getRequiredGeoCodeSelector(EntityPermission entityPermission) { 282 SelectorPK pk = getRequiredGeoCodeSelectorPK(); 283 Selector entity = pk == null? null: SelectorFactory.getInstance().getEntityFromPK(entityPermission, pk); 284 285 return entity; 286 } 287 288 public Selector getRequiredGeoCodeSelector() { 289 return getRequiredGeoCodeSelector(EntityPermission.READ_ONLY); 290 } 291 292 public Selector getRequiredGeoCodeSelectorForUpdate() { 293 return getRequiredGeoCodeSelector(EntityPermission.READ_WRITE); 294 } 295 296 public void setRequiredGeoCodeSelectorPK(SelectorPK requiredGeoCodeSelectorPK) 297 throws PersistenceNotNullException, PersistenceReadOnlyException { 298 checkReadWrite(); 299 _value.setRequiredGeoCodeSelectorPK(requiredGeoCodeSelectorPK); 300 } 301 302 public void setRequiredGeoCodeSelector(Selector entity) { 303 setRequiredGeoCodeSelectorPK(entity == null? null: entity.getPrimaryKey()); 304 } 305 306 public boolean getRequiredGeoCodeSelectorPKHasBeenModified() { 307 return _value.getRequiredGeoCodeSelectorPKHasBeenModified(); 308 } 309 310 public SelectorPK getRecommendedItemSelectorPK() { 311 return _value.getRecommendedItemSelectorPK(); 312 } 313 314 public Selector getRecommendedItemSelector(EntityPermission entityPermission) { 315 SelectorPK pk = getRecommendedItemSelectorPK(); 316 Selector entity = pk == null? null: SelectorFactory.getInstance().getEntityFromPK(entityPermission, pk); 317 318 return entity; 319 } 320 321 public Selector getRecommendedItemSelector() { 322 return getRecommendedItemSelector(EntityPermission.READ_ONLY); 323 } 324 325 public Selector getRecommendedItemSelectorForUpdate() { 326 return getRecommendedItemSelector(EntityPermission.READ_WRITE); 327 } 328 329 public void setRecommendedItemSelectorPK(SelectorPK recommendedItemSelectorPK) 330 throws PersistenceNotNullException, PersistenceReadOnlyException { 331 checkReadWrite(); 332 _value.setRecommendedItemSelectorPK(recommendedItemSelectorPK); 333 } 334 335 public void setRecommendedItemSelector(Selector entity) { 336 setRecommendedItemSelectorPK(entity == null? null: entity.getPrimaryKey()); 337 } 338 339 public boolean getRecommendedItemSelectorPKHasBeenModified() { 340 return _value.getRecommendedItemSelectorPKHasBeenModified(); 341 } 342 343 public SelectorPK getRequiredItemSelectorPK() { 344 return _value.getRequiredItemSelectorPK(); 345 } 346 347 public Selector getRequiredItemSelector(EntityPermission entityPermission) { 348 SelectorPK pk = getRequiredItemSelectorPK(); 349 Selector entity = pk == null? null: SelectorFactory.getInstance().getEntityFromPK(entityPermission, pk); 350 351 return entity; 352 } 353 354 public Selector getRequiredItemSelector() { 355 return getRequiredItemSelector(EntityPermission.READ_ONLY); 356 } 357 358 public Selector getRequiredItemSelectorForUpdate() { 359 return getRequiredItemSelector(EntityPermission.READ_WRITE); 360 } 361 362 public void setRequiredItemSelectorPK(SelectorPK requiredItemSelectorPK) 363 throws PersistenceNotNullException, PersistenceReadOnlyException { 364 checkReadWrite(); 365 _value.setRequiredItemSelectorPK(requiredItemSelectorPK); 366 } 367 368 public void setRequiredItemSelector(Selector entity) { 369 setRequiredItemSelectorPK(entity == null? null: entity.getPrimaryKey()); 370 } 371 372 public boolean getRequiredItemSelectorPKHasBeenModified() { 373 return _value.getRequiredItemSelectorPKHasBeenModified(); 374 } 375 376 public SelectorPK getRecommendedOrderSelectorPK() { 377 return _value.getRecommendedOrderSelectorPK(); 378 } 379 380 public Selector getRecommendedOrderSelector(EntityPermission entityPermission) { 381 SelectorPK pk = getRecommendedOrderSelectorPK(); 382 Selector entity = pk == null? null: SelectorFactory.getInstance().getEntityFromPK(entityPermission, pk); 383 384 return entity; 385 } 386 387 public Selector getRecommendedOrderSelector() { 388 return getRecommendedOrderSelector(EntityPermission.READ_ONLY); 389 } 390 391 public Selector getRecommendedOrderSelectorForUpdate() { 392 return getRecommendedOrderSelector(EntityPermission.READ_WRITE); 393 } 394 395 public void setRecommendedOrderSelectorPK(SelectorPK recommendedOrderSelectorPK) 396 throws PersistenceNotNullException, PersistenceReadOnlyException { 397 checkReadWrite(); 398 _value.setRecommendedOrderSelectorPK(recommendedOrderSelectorPK); 399 } 400 401 public void setRecommendedOrderSelector(Selector entity) { 402 setRecommendedOrderSelectorPK(entity == null? null: entity.getPrimaryKey()); 403 } 404 405 public boolean getRecommendedOrderSelectorPKHasBeenModified() { 406 return _value.getRecommendedOrderSelectorPKHasBeenModified(); 407 } 408 409 public SelectorPK getRequiredOrderSelectorPK() { 410 return _value.getRequiredOrderSelectorPK(); 411 } 412 413 public Selector getRequiredOrderSelector(EntityPermission entityPermission) { 414 SelectorPK pk = getRequiredOrderSelectorPK(); 415 Selector entity = pk == null? null: SelectorFactory.getInstance().getEntityFromPK(entityPermission, pk); 416 417 return entity; 418 } 419 420 public Selector getRequiredOrderSelector() { 421 return getRequiredOrderSelector(EntityPermission.READ_ONLY); 422 } 423 424 public Selector getRequiredOrderSelectorForUpdate() { 425 return getRequiredOrderSelector(EntityPermission.READ_WRITE); 426 } 427 428 public void setRequiredOrderSelectorPK(SelectorPK requiredOrderSelectorPK) 429 throws PersistenceNotNullException, PersistenceReadOnlyException { 430 checkReadWrite(); 431 _value.setRequiredOrderSelectorPK(requiredOrderSelectorPK); 432 } 433 434 public void setRequiredOrderSelector(Selector entity) { 435 setRequiredOrderSelectorPK(entity == null? null: entity.getPrimaryKey()); 436 } 437 438 public boolean getRequiredOrderSelectorPKHasBeenModified() { 439 return _value.getRequiredOrderSelectorPKHasBeenModified(); 440 } 441 442 public SelectorPK getRecommendedShipmentSelectorPK() { 443 return _value.getRecommendedShipmentSelectorPK(); 444 } 445 446 public Selector getRecommendedShipmentSelector(EntityPermission entityPermission) { 447 SelectorPK pk = getRecommendedShipmentSelectorPK(); 448 Selector entity = pk == null? null: SelectorFactory.getInstance().getEntityFromPK(entityPermission, pk); 449 450 return entity; 451 } 452 453 public Selector getRecommendedShipmentSelector() { 454 return getRecommendedShipmentSelector(EntityPermission.READ_ONLY); 455 } 456 457 public Selector getRecommendedShipmentSelectorForUpdate() { 458 return getRecommendedShipmentSelector(EntityPermission.READ_WRITE); 459 } 460 461 public void setRecommendedShipmentSelectorPK(SelectorPK recommendedShipmentSelectorPK) 462 throws PersistenceNotNullException, PersistenceReadOnlyException { 463 checkReadWrite(); 464 _value.setRecommendedShipmentSelectorPK(recommendedShipmentSelectorPK); 465 } 466 467 public void setRecommendedShipmentSelector(Selector entity) { 468 setRecommendedShipmentSelectorPK(entity == null? null: entity.getPrimaryKey()); 469 } 470 471 public boolean getRecommendedShipmentSelectorPKHasBeenModified() { 472 return _value.getRecommendedShipmentSelectorPKHasBeenModified(); 473 } 474 475 public SelectorPK getRequiredShipmentSelectorPK() { 476 return _value.getRequiredShipmentSelectorPK(); 477 } 478 479 public Selector getRequiredShipmentSelector(EntityPermission entityPermission) { 480 SelectorPK pk = getRequiredShipmentSelectorPK(); 481 Selector entity = pk == null? null: SelectorFactory.getInstance().getEntityFromPK(entityPermission, pk); 482 483 return entity; 484 } 485 486 public Selector getRequiredShipmentSelector() { 487 return getRequiredShipmentSelector(EntityPermission.READ_ONLY); 488 } 489 490 public Selector getRequiredShipmentSelectorForUpdate() { 491 return getRequiredShipmentSelector(EntityPermission.READ_WRITE); 492 } 493 494 public void setRequiredShipmentSelectorPK(SelectorPK requiredShipmentSelectorPK) 495 throws PersistenceNotNullException, PersistenceReadOnlyException { 496 checkReadWrite(); 497 _value.setRequiredShipmentSelectorPK(requiredShipmentSelectorPK); 498 } 499 500 public void setRequiredShipmentSelector(Selector entity) { 501 setRequiredShipmentSelectorPK(entity == null? null: entity.getPrimaryKey()); 502 } 503 504 public boolean getRequiredShipmentSelectorPKHasBeenModified() { 505 return _value.getRequiredShipmentSelectorPKHasBeenModified(); 506 } 507 508 public Boolean getIsDefault() { 509 return _value.getIsDefault(); 510 } 511 512 public void setIsDefault(Boolean isDefault) 513 throws PersistenceNotNullException, PersistenceReadOnlyException { 514 checkReadWrite(); 515 _value.setIsDefault(isDefault); 516 } 517 518 public boolean getIsDefaultHasBeenModified() { 519 return _value.getIsDefaultHasBeenModified(); 520 } 521 522 public Integer getSortOrder() { 523 return _value.getSortOrder(); 524 } 525 526 public void setSortOrder(Integer sortOrder) 527 throws PersistenceNotNullException, PersistenceReadOnlyException { 528 checkReadWrite(); 529 _value.setSortOrder(sortOrder); 530 } 531 532 public boolean getSortOrderHasBeenModified() { 533 return _value.getSortOrderHasBeenModified(); 534 } 535 536 public Long getFromTime() { 537 return _value.getFromTime(); 538 } 539 540 public void setFromTime(Long fromTime) 541 throws PersistenceNotNullException, PersistenceReadOnlyException { 542 checkReadWrite(); 543 _value.setFromTime(fromTime); 544 } 545 546 public boolean getFromTimeHasBeenModified() { 547 return _value.getFromTimeHasBeenModified(); 548 } 549 550 public Long getThruTime() { 551 return _value.getThruTime(); 552 } 553 554 public void setThruTime(Long thruTime) 555 throws PersistenceNotNullException, PersistenceReadOnlyException { 556 checkReadWrite(); 557 _value.setThruTime(thruTime); 558 } 559 560 public boolean getThruTimeHasBeenModified() { 561 return _value.getThruTimeHasBeenModified(); 562 } 563 564}