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
064public class PartyPaymentMethodCreditCard
065        extends BaseEntity
066        implements Serializable {
067    
068    private PartyPaymentMethodCreditCardPK _pk;
069    private PartyPaymentMethodCreditCardValue _value;
070    
071    /** Creates a new instance of PartyPaymentMethodCreditCard */
072    public PartyPaymentMethodCreditCard()
073            throws PersistenceException {
074        super();
075    }
076    
077    /** Creates a new instance of PartyPaymentMethodCreditCard */
078    public PartyPaymentMethodCreditCard(PartyPaymentMethodCreditCardValue value, EntityPermission entityPermission) {
079        super(entityPermission);
080        
081        _value = value;
082        _pk = value.getPrimaryKey();
083    }
084    
085    @Override
086    public PartyPaymentMethodCreditCardFactory getBaseFactoryInstance() {
087        return PartyPaymentMethodCreditCardFactory.getInstance();
088    }
089    
090    @Override
091    public boolean hasBeenModified() {
092        return _value.hasBeenModified();
093    }
094    
095    @Override
096    public int hashCode() {
097        return _pk.hashCode();
098    }
099    
100    @Override
101    public String toString() {
102        return _pk.toString();
103    }
104    
105    @Override
106    public boolean equals(Object other) {
107        if(this == other)
108            return true;
109        
110        if(other instanceof PartyPaymentMethodCreditCard that) {
111            PartyPaymentMethodCreditCardValue thatValue = that.getPartyPaymentMethodCreditCardValue();
112            return _value.equals(thatValue);
113        } else {
114            return false;
115        }
116    }
117    
118    @Override
119    public void store()
120            throws PersistenceDatabaseException {
121        getBaseFactoryInstance().store(this);
122    }
123    
124    @Override
125    public void remove()
126            throws PersistenceDatabaseException {
127        getBaseFactoryInstance().remove(this);
128    }
129    
130    public PartyPaymentMethodCreditCardValue getPartyPaymentMethodCreditCardValue() {
131        return _value;
132    }
133    
134    public void setPartyPaymentMethodCreditCardValue(PartyPaymentMethodCreditCardValue value)
135            throws PersistenceReadOnlyException {
136        checkReadWrite();
137        _value = value;
138    }
139    
140    @Override
141    public PartyPaymentMethodCreditCardPK getPrimaryKey() {
142        return _pk;
143    }
144    
145    public PartyPaymentMethodPK getPartyPaymentMethodPK() {
146        return _value.getPartyPaymentMethodPK();
147    }
148    
149    public PartyPaymentMethod getPartyPaymentMethod(EntityPermission entityPermission) {
150        return PartyPaymentMethodFactory.getInstance().getEntityFromPK(entityPermission, getPartyPaymentMethodPK());
151    }
152    
153    public PartyPaymentMethod getPartyPaymentMethod() {
154        return getPartyPaymentMethod(EntityPermission.READ_ONLY);
155    }
156    
157    public PartyPaymentMethod getPartyPaymentMethodForUpdate() {
158        return getPartyPaymentMethod(EntityPermission.READ_WRITE);
159    }
160    
161    public void setPartyPaymentMethodPK(PartyPaymentMethodPK partyPaymentMethodPK)
162            throws PersistenceNotNullException, PersistenceReadOnlyException {
163        checkReadWrite();
164        _value.setPartyPaymentMethodPK(partyPaymentMethodPK);
165    }
166    
167    public void setPartyPaymentMethod(PartyPaymentMethod entity) {
168        setPartyPaymentMethodPK(entity == null? null: entity.getPrimaryKey());
169    }
170    
171    public boolean getPartyPaymentMethodPKHasBeenModified() {
172        return _value.getPartyPaymentMethodPKHasBeenModified();
173    }
174    
175    public String getNumber() {
176        return _value.getNumber();
177    }
178    
179    public void setNumber(String number)
180            throws PersistenceNotNullException, PersistenceReadOnlyException {
181        checkReadWrite();
182        _value.setNumber(number);
183    }
184    
185    public boolean getNumberHasBeenModified() {
186        return _value.getNumberHasBeenModified();
187    }
188    
189    public Integer getExpirationMonth() {
190        return _value.getExpirationMonth();
191    }
192    
193    public void setExpirationMonth(Integer expirationMonth)
194            throws PersistenceNotNullException, PersistenceReadOnlyException {
195        checkReadWrite();
196        _value.setExpirationMonth(expirationMonth);
197    }
198    
199    public boolean getExpirationMonthHasBeenModified() {
200        return _value.getExpirationMonthHasBeenModified();
201    }
202    
203    public Integer getExpirationYear() {
204        return _value.getExpirationYear();
205    }
206    
207    public void setExpirationYear(Integer expirationYear)
208            throws PersistenceNotNullException, PersistenceReadOnlyException {
209        checkReadWrite();
210        _value.setExpirationYear(expirationYear);
211    }
212    
213    public boolean getExpirationYearHasBeenModified() {
214        return _value.getExpirationYearHasBeenModified();
215    }
216    
217    public PersonalTitlePK getPersonalTitlePK() {
218        return _value.getPersonalTitlePK();
219    }
220    
221    public PersonalTitle getPersonalTitle(EntityPermission entityPermission) {
222        PersonalTitlePK pk = getPersonalTitlePK();
223        PersonalTitle entity = pk == null? null: PersonalTitleFactory.getInstance().getEntityFromPK(entityPermission, pk);
224        
225        return entity;
226    }
227    
228    public PersonalTitle getPersonalTitle() {
229        return getPersonalTitle(EntityPermission.READ_ONLY);
230    }
231    
232    public PersonalTitle getPersonalTitleForUpdate() {
233        return getPersonalTitle(EntityPermission.READ_WRITE);
234    }
235    
236    public void setPersonalTitlePK(PersonalTitlePK personalTitlePK)
237            throws PersistenceNotNullException, PersistenceReadOnlyException {
238        checkReadWrite();
239        _value.setPersonalTitlePK(personalTitlePK);
240    }
241    
242    public void setPersonalTitle(PersonalTitle entity) {
243        setPersonalTitlePK(entity == null? null: entity.getPrimaryKey());
244    }
245    
246    public boolean getPersonalTitlePKHasBeenModified() {
247        return _value.getPersonalTitlePKHasBeenModified();
248    }
249    
250    public String getFirstName() {
251        return _value.getFirstName();
252    }
253    
254    public void setFirstName(String firstName)
255            throws PersistenceNotNullException, PersistenceReadOnlyException {
256        checkReadWrite();
257        _value.setFirstName(firstName);
258    }
259    
260    public boolean getFirstNameHasBeenModified() {
261        return _value.getFirstNameHasBeenModified();
262    }
263    
264    public String getFirstNameSdx() {
265        return _value.getFirstNameSdx();
266    }
267    
268    public void setFirstNameSdx(String firstNameSdx)
269            throws PersistenceNotNullException, PersistenceReadOnlyException {
270        checkReadWrite();
271        _value.setFirstNameSdx(firstNameSdx);
272    }
273    
274    public boolean getFirstNameSdxHasBeenModified() {
275        return _value.getFirstNameSdxHasBeenModified();
276    }
277    
278    public String getMiddleName() {
279        return _value.getMiddleName();
280    }
281    
282    public void setMiddleName(String middleName)
283            throws PersistenceNotNullException, PersistenceReadOnlyException {
284        checkReadWrite();
285        _value.setMiddleName(middleName);
286    }
287    
288    public boolean getMiddleNameHasBeenModified() {
289        return _value.getMiddleNameHasBeenModified();
290    }
291    
292    public String getMiddleNameSdx() {
293        return _value.getMiddleNameSdx();
294    }
295    
296    public void setMiddleNameSdx(String middleNameSdx)
297            throws PersistenceNotNullException, PersistenceReadOnlyException {
298        checkReadWrite();
299        _value.setMiddleNameSdx(middleNameSdx);
300    }
301    
302    public boolean getMiddleNameSdxHasBeenModified() {
303        return _value.getMiddleNameSdxHasBeenModified();
304    }
305    
306    public String getLastName() {
307        return _value.getLastName();
308    }
309    
310    public void setLastName(String lastName)
311            throws PersistenceNotNullException, PersistenceReadOnlyException {
312        checkReadWrite();
313        _value.setLastName(lastName);
314    }
315    
316    public boolean getLastNameHasBeenModified() {
317        return _value.getLastNameHasBeenModified();
318    }
319    
320    public String getLastNameSdx() {
321        return _value.getLastNameSdx();
322    }
323    
324    public void setLastNameSdx(String lastNameSdx)
325            throws PersistenceNotNullException, PersistenceReadOnlyException {
326        checkReadWrite();
327        _value.setLastNameSdx(lastNameSdx);
328    }
329    
330    public boolean getLastNameSdxHasBeenModified() {
331        return _value.getLastNameSdxHasBeenModified();
332    }
333    
334    public NameSuffixPK getNameSuffixPK() {
335        return _value.getNameSuffixPK();
336    }
337    
338    public NameSuffix getNameSuffix(EntityPermission entityPermission) {
339        NameSuffixPK pk = getNameSuffixPK();
340        NameSuffix entity = pk == null? null: NameSuffixFactory.getInstance().getEntityFromPK(entityPermission, pk);
341        
342        return entity;
343    }
344    
345    public NameSuffix getNameSuffix() {
346        return getNameSuffix(EntityPermission.READ_ONLY);
347    }
348    
349    public NameSuffix getNameSuffixForUpdate() {
350        return getNameSuffix(EntityPermission.READ_WRITE);
351    }
352    
353    public void setNameSuffixPK(NameSuffixPK nameSuffixPK)
354            throws PersistenceNotNullException, PersistenceReadOnlyException {
355        checkReadWrite();
356        _value.setNameSuffixPK(nameSuffixPK);
357    }
358    
359    public void setNameSuffix(NameSuffix entity) {
360        setNameSuffixPK(entity == null? null: entity.getPrimaryKey());
361    }
362    
363    public boolean getNameSuffixPKHasBeenModified() {
364        return _value.getNameSuffixPKHasBeenModified();
365    }
366    
367    public String getName() {
368        return _value.getName();
369    }
370    
371    public void setName(String name)
372            throws PersistenceNotNullException, PersistenceReadOnlyException {
373        checkReadWrite();
374        _value.setName(name);
375    }
376    
377    public boolean getNameHasBeenModified() {
378        return _value.getNameHasBeenModified();
379    }
380    
381    public PartyContactMechanismPK getBillingPartyContactMechanismPK() {
382        return _value.getBillingPartyContactMechanismPK();
383    }
384    
385    public PartyContactMechanism getBillingPartyContactMechanism(EntityPermission entityPermission) {
386        PartyContactMechanismPK pk = getBillingPartyContactMechanismPK();
387        PartyContactMechanism entity = pk == null? null: PartyContactMechanismFactory.getInstance().getEntityFromPK(entityPermission, pk);
388        
389        return entity;
390    }
391    
392    public PartyContactMechanism getBillingPartyContactMechanism() {
393        return getBillingPartyContactMechanism(EntityPermission.READ_ONLY);
394    }
395    
396    public PartyContactMechanism getBillingPartyContactMechanismForUpdate() {
397        return getBillingPartyContactMechanism(EntityPermission.READ_WRITE);
398    }
399    
400    public void setBillingPartyContactMechanismPK(PartyContactMechanismPK billingPartyContactMechanismPK)
401            throws PersistenceNotNullException, PersistenceReadOnlyException {
402        checkReadWrite();
403        _value.setBillingPartyContactMechanismPK(billingPartyContactMechanismPK);
404    }
405    
406    public void setBillingPartyContactMechanism(PartyContactMechanism entity) {
407        setBillingPartyContactMechanismPK(entity == null? null: entity.getPrimaryKey());
408    }
409    
410    public boolean getBillingPartyContactMechanismPKHasBeenModified() {
411        return _value.getBillingPartyContactMechanismPKHasBeenModified();
412    }
413    
414    public String getIssuerName() {
415        return _value.getIssuerName();
416    }
417    
418    public void setIssuerName(String issuerName)
419            throws PersistenceNotNullException, PersistenceReadOnlyException {
420        checkReadWrite();
421        _value.setIssuerName(issuerName);
422    }
423    
424    public boolean getIssuerNameHasBeenModified() {
425        return _value.getIssuerNameHasBeenModified();
426    }
427    
428    public PartyContactMechanismPK getIssuerPartyContactMechanismPK() {
429        return _value.getIssuerPartyContactMechanismPK();
430    }
431    
432    public PartyContactMechanism getIssuerPartyContactMechanism(EntityPermission entityPermission) {
433        PartyContactMechanismPK pk = getIssuerPartyContactMechanismPK();
434        PartyContactMechanism entity = pk == null? null: PartyContactMechanismFactory.getInstance().getEntityFromPK(entityPermission, pk);
435        
436        return entity;
437    }
438    
439    public PartyContactMechanism getIssuerPartyContactMechanism() {
440        return getIssuerPartyContactMechanism(EntityPermission.READ_ONLY);
441    }
442    
443    public PartyContactMechanism getIssuerPartyContactMechanismForUpdate() {
444        return getIssuerPartyContactMechanism(EntityPermission.READ_WRITE);
445    }
446    
447    public void setIssuerPartyContactMechanismPK(PartyContactMechanismPK issuerPartyContactMechanismPK)
448            throws PersistenceNotNullException, PersistenceReadOnlyException {
449        checkReadWrite();
450        _value.setIssuerPartyContactMechanismPK(issuerPartyContactMechanismPK);
451    }
452    
453    public void setIssuerPartyContactMechanism(PartyContactMechanism entity) {
454        setIssuerPartyContactMechanismPK(entity == null? null: entity.getPrimaryKey());
455    }
456    
457    public boolean getIssuerPartyContactMechanismPKHasBeenModified() {
458        return _value.getIssuerPartyContactMechanismPKHasBeenModified();
459    }
460    
461    public Long getFromTime() {
462        return _value.getFromTime();
463    }
464    
465    public void setFromTime(Long fromTime)
466            throws PersistenceNotNullException, PersistenceReadOnlyException {
467        checkReadWrite();
468        _value.setFromTime(fromTime);
469    }
470    
471    public boolean getFromTimeHasBeenModified() {
472        return _value.getFromTimeHasBeenModified();
473    }
474    
475    public Long getThruTime() {
476        return _value.getThruTime();
477    }
478    
479    public void setThruTime(Long thruTime)
480            throws PersistenceNotNullException, PersistenceReadOnlyException {
481        checkReadWrite();
482        _value.setThruTime(thruTime);
483    }
484    
485    public boolean getThruTimeHasBeenModified() {
486        return _value.getThruTimeHasBeenModified();
487    }
488    
489}