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 * PartyPaymentMethodCreditCard.java 021 */ 022 023package com.echothree.model.data.payment.server.entity; 024 025import com.echothree.model.data.payment.common.pk.PartyPaymentMethodCreditCardPK; 026 027import com.echothree.model.data.payment.common.pk.PartyPaymentMethodPK; 028import com.echothree.model.data.party.common.pk.PersonalTitlePK; 029import com.echothree.model.data.party.common.pk.NameSuffixPK; 030import com.echothree.model.data.contact.common.pk.PartyContactMechanismPK; 031 032import com.echothree.model.data.payment.server.entity.PartyPaymentMethod; 033import com.echothree.model.data.party.server.entity.PersonalTitle; 034import com.echothree.model.data.party.server.entity.NameSuffix; 035import com.echothree.model.data.contact.server.entity.PartyContactMechanism; 036 037import com.echothree.model.data.payment.server.factory.PartyPaymentMethodFactory; 038import com.echothree.model.data.party.server.factory.PersonalTitleFactory; 039import com.echothree.model.data.party.server.factory.NameSuffixFactory; 040import com.echothree.model.data.contact.server.factory.PartyContactMechanismFactory; 041 042import com.echothree.model.data.payment.common.pk.PartyPaymentMethodCreditCardPK; 043 044import com.echothree.model.data.payment.server.value.PartyPaymentMethodCreditCardValue; 045 046import com.echothree.model.data.payment.server.factory.PartyPaymentMethodCreditCardFactory; 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 PartyPaymentMethodCreditCard 068 extends BaseEntity 069 implements Serializable { 070 071 private PartyPaymentMethodCreditCardPK _pk; 072 private PartyPaymentMethodCreditCardValue _value; 073 074 /** Creates a new instance of PartyPaymentMethodCreditCard */ 075 public PartyPaymentMethodCreditCard() 076 throws PersistenceException { 077 super(); 078 } 079 080 /** Creates a new instance of PartyPaymentMethodCreditCard */ 081 public PartyPaymentMethodCreditCard(PartyPaymentMethodCreditCardValue value, EntityPermission entityPermission) { 082 super(entityPermission); 083 084 _value = value; 085 _pk = value.getPrimaryKey(); 086 } 087 088 @Override 089 @Nonnull 090 public PartyPaymentMethodCreditCardFactory getBaseFactoryInstance() { 091 return PartyPaymentMethodCreditCardFactory.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 PartyPaymentMethodCreditCard that) { 116 PartyPaymentMethodCreditCardValue thatValue = that.getPartyPaymentMethodCreditCardValue(); 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 PartyPaymentMethodCreditCardValue getPartyPaymentMethodCreditCardValue() { 137 return _value; 138 } 139 140 public void setPartyPaymentMethodCreditCardValue(@Nonnull PartyPaymentMethodCreditCardValue value) 141 throws PersistenceReadOnlyException { 142 checkReadWrite(); 143 _value = value; 144 } 145 146 @Override 147 @Nonnull 148 public PartyPaymentMethodCreditCardPK getPrimaryKey() { 149 return _pk; 150 } 151 152 @Nonnull 153 public PartyPaymentMethodPK getPartyPaymentMethodPK() { 154 return _value.getPartyPaymentMethodPK(); 155 } 156 157 @Nonnull 158 public PartyPaymentMethod getPartyPaymentMethod(EntityPermission entityPermission) { 159 return PartyPaymentMethodFactory.getInstance().getEntityFromPK(entityPermission, getPartyPaymentMethodPK()); 160 } 161 162 @Nonnull 163 public PartyPaymentMethod getPartyPaymentMethod() { 164 return getPartyPaymentMethod(EntityPermission.READ_ONLY); 165 } 166 167 @Nonnull 168 public PartyPaymentMethod getPartyPaymentMethodForUpdate() { 169 return getPartyPaymentMethod(EntityPermission.READ_WRITE); 170 } 171 172 public void setPartyPaymentMethodPK(@Nonnull PartyPaymentMethodPK partyPaymentMethodPK) 173 throws PersistenceNotNullException, PersistenceReadOnlyException { 174 checkReadWrite(); 175 _value.setPartyPaymentMethodPK(partyPaymentMethodPK); 176 } 177 178 public void setPartyPaymentMethod(@Nonnull PartyPaymentMethod entity) { 179 setPartyPaymentMethodPK(entity == null ? null : entity.getPrimaryKey()); 180 } 181 182 public boolean getPartyPaymentMethodPKHasBeenModified() { 183 return _value.getPartyPaymentMethodPKHasBeenModified(); 184 } 185 186 @Nullable 187 public String getNumber() { 188 return _value.getNumber(); 189 } 190 191 public void setNumber(@Nullable String number) 192 throws PersistenceNotNullException, PersistenceReadOnlyException { 193 checkReadWrite(); 194 _value.setNumber(number); 195 } 196 197 public boolean getNumberHasBeenModified() { 198 return _value.getNumberHasBeenModified(); 199 } 200 201 @Nullable 202 public String getNumberHash() { 203 return _value.getNumberHash(); 204 } 205 206 public void setNumberHash(@Nullable String numberHash) 207 throws PersistenceNotNullException, PersistenceReadOnlyException { 208 checkReadWrite(); 209 _value.setNumberHash(numberHash); 210 } 211 212 public boolean getNumberHashHasBeenModified() { 213 return _value.getNumberHashHasBeenModified(); 214 } 215 216 @Nullable 217 public Integer getExpirationMonth() { 218 return _value.getExpirationMonth(); 219 } 220 221 public void setExpirationMonth(@Nullable Integer expirationMonth) 222 throws PersistenceNotNullException, PersistenceReadOnlyException { 223 checkReadWrite(); 224 _value.setExpirationMonth(expirationMonth); 225 } 226 227 public boolean getExpirationMonthHasBeenModified() { 228 return _value.getExpirationMonthHasBeenModified(); 229 } 230 231 @Nullable 232 public Integer getExpirationYear() { 233 return _value.getExpirationYear(); 234 } 235 236 public void setExpirationYear(@Nullable Integer expirationYear) 237 throws PersistenceNotNullException, PersistenceReadOnlyException { 238 checkReadWrite(); 239 _value.setExpirationYear(expirationYear); 240 } 241 242 public boolean getExpirationYearHasBeenModified() { 243 return _value.getExpirationYearHasBeenModified(); 244 } 245 246 @Nullable 247 public PersonalTitlePK getPersonalTitlePK() { 248 return _value.getPersonalTitlePK(); 249 } 250 251 @Nullable 252 public PersonalTitle getPersonalTitle(EntityPermission entityPermission) { 253 PersonalTitlePK pk = getPersonalTitlePK(); 254 PersonalTitle entity = pk == null? null: PersonalTitleFactory.getInstance().getEntityFromPK(entityPermission, pk); 255 256 return entity; 257 } 258 259 @Nullable 260 public PersonalTitle getPersonalTitle() { 261 return getPersonalTitle(EntityPermission.READ_ONLY); 262 } 263 264 @Nullable 265 public PersonalTitle getPersonalTitleForUpdate() { 266 return getPersonalTitle(EntityPermission.READ_WRITE); 267 } 268 269 public void setPersonalTitlePK(@Nullable PersonalTitlePK personalTitlePK) 270 throws PersistenceNotNullException, PersistenceReadOnlyException { 271 checkReadWrite(); 272 _value.setPersonalTitlePK(personalTitlePK); 273 } 274 275 public void setPersonalTitle(@Nullable PersonalTitle entity) { 276 setPersonalTitlePK(entity == null ? null : entity.getPrimaryKey()); 277 } 278 279 public boolean getPersonalTitlePKHasBeenModified() { 280 return _value.getPersonalTitlePKHasBeenModified(); 281 } 282 283 @Nullable 284 public String getFirstName() { 285 return _value.getFirstName(); 286 } 287 288 public void setFirstName(@Nullable String firstName) 289 throws PersistenceNotNullException, PersistenceReadOnlyException { 290 checkReadWrite(); 291 _value.setFirstName(firstName); 292 } 293 294 public boolean getFirstNameHasBeenModified() { 295 return _value.getFirstNameHasBeenModified(); 296 } 297 298 @Nullable 299 public String getFirstNameSdx() { 300 return _value.getFirstNameSdx(); 301 } 302 303 public void setFirstNameSdx(@Nullable String firstNameSdx) 304 throws PersistenceNotNullException, PersistenceReadOnlyException { 305 checkReadWrite(); 306 _value.setFirstNameSdx(firstNameSdx); 307 } 308 309 public boolean getFirstNameSdxHasBeenModified() { 310 return _value.getFirstNameSdxHasBeenModified(); 311 } 312 313 @Nullable 314 public String getMiddleName() { 315 return _value.getMiddleName(); 316 } 317 318 public void setMiddleName(@Nullable String middleName) 319 throws PersistenceNotNullException, PersistenceReadOnlyException { 320 checkReadWrite(); 321 _value.setMiddleName(middleName); 322 } 323 324 public boolean getMiddleNameHasBeenModified() { 325 return _value.getMiddleNameHasBeenModified(); 326 } 327 328 @Nullable 329 public String getMiddleNameSdx() { 330 return _value.getMiddleNameSdx(); 331 } 332 333 public void setMiddleNameSdx(@Nullable String middleNameSdx) 334 throws PersistenceNotNullException, PersistenceReadOnlyException { 335 checkReadWrite(); 336 _value.setMiddleNameSdx(middleNameSdx); 337 } 338 339 public boolean getMiddleNameSdxHasBeenModified() { 340 return _value.getMiddleNameSdxHasBeenModified(); 341 } 342 343 @Nullable 344 public String getLastName() { 345 return _value.getLastName(); 346 } 347 348 public void setLastName(@Nullable String lastName) 349 throws PersistenceNotNullException, PersistenceReadOnlyException { 350 checkReadWrite(); 351 _value.setLastName(lastName); 352 } 353 354 public boolean getLastNameHasBeenModified() { 355 return _value.getLastNameHasBeenModified(); 356 } 357 358 @Nullable 359 public String getLastNameSdx() { 360 return _value.getLastNameSdx(); 361 } 362 363 public void setLastNameSdx(@Nullable String lastNameSdx) 364 throws PersistenceNotNullException, PersistenceReadOnlyException { 365 checkReadWrite(); 366 _value.setLastNameSdx(lastNameSdx); 367 } 368 369 public boolean getLastNameSdxHasBeenModified() { 370 return _value.getLastNameSdxHasBeenModified(); 371 } 372 373 @Nullable 374 public NameSuffixPK getNameSuffixPK() { 375 return _value.getNameSuffixPK(); 376 } 377 378 @Nullable 379 public NameSuffix getNameSuffix(EntityPermission entityPermission) { 380 NameSuffixPK pk = getNameSuffixPK(); 381 NameSuffix entity = pk == null? null: NameSuffixFactory.getInstance().getEntityFromPK(entityPermission, pk); 382 383 return entity; 384 } 385 386 @Nullable 387 public NameSuffix getNameSuffix() { 388 return getNameSuffix(EntityPermission.READ_ONLY); 389 } 390 391 @Nullable 392 public NameSuffix getNameSuffixForUpdate() { 393 return getNameSuffix(EntityPermission.READ_WRITE); 394 } 395 396 public void setNameSuffixPK(@Nullable NameSuffixPK nameSuffixPK) 397 throws PersistenceNotNullException, PersistenceReadOnlyException { 398 checkReadWrite(); 399 _value.setNameSuffixPK(nameSuffixPK); 400 } 401 402 public void setNameSuffix(@Nullable NameSuffix entity) { 403 setNameSuffixPK(entity == null ? null : entity.getPrimaryKey()); 404 } 405 406 public boolean getNameSuffixPKHasBeenModified() { 407 return _value.getNameSuffixPKHasBeenModified(); 408 } 409 410 @Nullable 411 public String getName() { 412 return _value.getName(); 413 } 414 415 public void setName(@Nullable String name) 416 throws PersistenceNotNullException, PersistenceReadOnlyException { 417 checkReadWrite(); 418 _value.setName(name); 419 } 420 421 public boolean getNameHasBeenModified() { 422 return _value.getNameHasBeenModified(); 423 } 424 425 @Nullable 426 public PartyContactMechanismPK getBillingPartyContactMechanismPK() { 427 return _value.getBillingPartyContactMechanismPK(); 428 } 429 430 @Nullable 431 public PartyContactMechanism getBillingPartyContactMechanism(EntityPermission entityPermission) { 432 PartyContactMechanismPK pk = getBillingPartyContactMechanismPK(); 433 PartyContactMechanism entity = pk == null? null: PartyContactMechanismFactory.getInstance().getEntityFromPK(entityPermission, pk); 434 435 return entity; 436 } 437 438 @Nullable 439 public PartyContactMechanism getBillingPartyContactMechanism() { 440 return getBillingPartyContactMechanism(EntityPermission.READ_ONLY); 441 } 442 443 @Nullable 444 public PartyContactMechanism getBillingPartyContactMechanismForUpdate() { 445 return getBillingPartyContactMechanism(EntityPermission.READ_WRITE); 446 } 447 448 public void setBillingPartyContactMechanismPK(@Nullable PartyContactMechanismPK billingPartyContactMechanismPK) 449 throws PersistenceNotNullException, PersistenceReadOnlyException { 450 checkReadWrite(); 451 _value.setBillingPartyContactMechanismPK(billingPartyContactMechanismPK); 452 } 453 454 public void setBillingPartyContactMechanism(@Nullable PartyContactMechanism entity) { 455 setBillingPartyContactMechanismPK(entity == null ? null : entity.getPrimaryKey()); 456 } 457 458 public boolean getBillingPartyContactMechanismPKHasBeenModified() { 459 return _value.getBillingPartyContactMechanismPKHasBeenModified(); 460 } 461 462 @Nullable 463 public String getIssuerName() { 464 return _value.getIssuerName(); 465 } 466 467 public void setIssuerName(@Nullable String issuerName) 468 throws PersistenceNotNullException, PersistenceReadOnlyException { 469 checkReadWrite(); 470 _value.setIssuerName(issuerName); 471 } 472 473 public boolean getIssuerNameHasBeenModified() { 474 return _value.getIssuerNameHasBeenModified(); 475 } 476 477 @Nullable 478 public PartyContactMechanismPK getIssuerPartyContactMechanismPK() { 479 return _value.getIssuerPartyContactMechanismPK(); 480 } 481 482 @Nullable 483 public PartyContactMechanism getIssuerPartyContactMechanism(EntityPermission entityPermission) { 484 PartyContactMechanismPK pk = getIssuerPartyContactMechanismPK(); 485 PartyContactMechanism entity = pk == null? null: PartyContactMechanismFactory.getInstance().getEntityFromPK(entityPermission, pk); 486 487 return entity; 488 } 489 490 @Nullable 491 public PartyContactMechanism getIssuerPartyContactMechanism() { 492 return getIssuerPartyContactMechanism(EntityPermission.READ_ONLY); 493 } 494 495 @Nullable 496 public PartyContactMechanism getIssuerPartyContactMechanismForUpdate() { 497 return getIssuerPartyContactMechanism(EntityPermission.READ_WRITE); 498 } 499 500 public void setIssuerPartyContactMechanismPK(@Nullable PartyContactMechanismPK issuerPartyContactMechanismPK) 501 throws PersistenceNotNullException, PersistenceReadOnlyException { 502 checkReadWrite(); 503 _value.setIssuerPartyContactMechanismPK(issuerPartyContactMechanismPK); 504 } 505 506 public void setIssuerPartyContactMechanism(@Nullable PartyContactMechanism entity) { 507 setIssuerPartyContactMechanismPK(entity == null ? null : entity.getPrimaryKey()); 508 } 509 510 public boolean getIssuerPartyContactMechanismPKHasBeenModified() { 511 return _value.getIssuerPartyContactMechanismPKHasBeenModified(); 512 } 513 514 @Nonnull 515 public String getInitializationVector() { 516 return _value.getInitializationVector(); 517 } 518 519 public void setInitializationVector(@Nonnull String initializationVector) 520 throws PersistenceNotNullException, PersistenceReadOnlyException { 521 checkReadWrite(); 522 _value.setInitializationVector(initializationVector); 523 } 524 525 public boolean getInitializationVectorHasBeenModified() { 526 return _value.getInitializationVectorHasBeenModified(); 527 } 528 529 @Nonnull 530 public Long getFromTime() { 531 return _value.getFromTime(); 532 } 533 534 public void setFromTime(@Nonnull Long fromTime) 535 throws PersistenceNotNullException, PersistenceReadOnlyException { 536 checkReadWrite(); 537 _value.setFromTime(fromTime); 538 } 539 540 public boolean getFromTimeHasBeenModified() { 541 return _value.getFromTimeHasBeenModified(); 542 } 543 544 @Nonnull 545 public Long getThruTime() { 546 return _value.getThruTime(); 547 } 548 549 public void setThruTime(@Nonnull Long thruTime) 550 throws PersistenceNotNullException, PersistenceReadOnlyException { 551 checkReadWrite(); 552 _value.setThruTime(thruTime); 553 } 554 555 public boolean getThruTimeHasBeenModified() { 556 return _value.getThruTimeHasBeenModified(); 557 } 558 559}