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 * ContactListDetail.java
021 */
022
023package com.echothree.model.data.contactlist.server.entity;
024
025import com.echothree.model.data.contactlist.common.pk.ContactListDetailPK;
026
027import com.echothree.model.data.contactlist.common.pk.ContactListPK;
028import com.echothree.model.data.contactlist.common.pk.ContactListGroupPK;
029import com.echothree.model.data.contactlist.common.pk.ContactListTypePK;
030import com.echothree.model.data.contactlist.common.pk.ContactListFrequencyPK;
031import com.echothree.model.data.workflow.common.pk.WorkflowEntrancePK;
032
033import com.echothree.model.data.contactlist.server.entity.ContactList;
034import com.echothree.model.data.contactlist.server.entity.ContactListGroup;
035import com.echothree.model.data.contactlist.server.entity.ContactListType;
036import com.echothree.model.data.contactlist.server.entity.ContactListFrequency;
037import com.echothree.model.data.workflow.server.entity.WorkflowEntrance;
038
039import com.echothree.model.data.contactlist.server.factory.ContactListFactory;
040import com.echothree.model.data.contactlist.server.factory.ContactListGroupFactory;
041import com.echothree.model.data.contactlist.server.factory.ContactListTypeFactory;
042import com.echothree.model.data.contactlist.server.factory.ContactListFrequencyFactory;
043import com.echothree.model.data.workflow.server.factory.WorkflowEntranceFactory;
044
045import com.echothree.model.data.contactlist.common.pk.ContactListDetailPK;
046
047import com.echothree.model.data.contactlist.server.value.ContactListDetailValue;
048
049import com.echothree.model.data.contactlist.server.factory.ContactListDetailFactory;
050
051import com.echothree.util.common.exception.PersistenceException;
052import com.echothree.util.common.exception.PersistenceDatabaseException;
053import com.echothree.util.common.exception.PersistenceNotNullException;
054import com.echothree.util.common.exception.PersistenceReadOnlyException;
055
056import com.echothree.util.common.persistence.BasePK;
057
058import com.echothree.util.common.persistence.type.ByteArray;
059
060import com.echothree.util.server.persistence.BaseEntity;
061import com.echothree.util.server.persistence.EntityPermission;
062import com.echothree.util.server.persistence.Session;
063import com.echothree.util.server.persistence.ThreadSession;
064
065import java.io.Serializable;
066
067public class ContactListDetail
068        extends BaseEntity
069        implements Serializable {
070    
071    private ContactListDetailPK _pk;
072    private ContactListDetailValue _value;
073    
074    /** Creates a new instance of ContactListDetail */
075    public ContactListDetail()
076            throws PersistenceException {
077        super();
078    }
079    
080    /** Creates a new instance of ContactListDetail */
081    public ContactListDetail(ContactListDetailValue value, EntityPermission entityPermission) {
082        super(entityPermission);
083        
084        _value = value;
085        _pk = value.getPrimaryKey();
086    }
087    
088    @Override
089    public ContactListDetailFactory getBaseFactoryInstance() {
090        return ContactListDetailFactory.getInstance();
091    }
092    
093    @Override
094    public boolean hasBeenModified() {
095        return _value.hasBeenModified();
096    }
097    
098    @Override
099    public int hashCode() {
100        return _pk.hashCode();
101    }
102    
103    @Override
104    public String toString() {
105        return _pk.toString();
106    }
107    
108    @Override
109    public boolean equals(Object other) {
110        if(this == other)
111            return true;
112        
113        if(other instanceof ContactListDetail that) {
114            ContactListDetailValue thatValue = that.getContactListDetailValue();
115            return _value.equals(thatValue);
116        } else {
117            return false;
118        }
119    }
120    
121    @Override
122    public void store(Session session)
123            throws PersistenceDatabaseException {
124        getBaseFactoryInstance().store(session, this);
125    }
126    
127    @Override
128    public void remove(Session session)
129            throws PersistenceDatabaseException {
130        getBaseFactoryInstance().remove(session, this);
131    }
132    
133    @Override
134    public void remove()
135            throws PersistenceDatabaseException {
136        getBaseFactoryInstance().remove(ThreadSession.currentSession(), this);
137    }
138    
139    public ContactListDetailValue getContactListDetailValue() {
140        return _value;
141    }
142    
143    public void setContactListDetailValue(ContactListDetailValue value)
144            throws PersistenceReadOnlyException {
145        checkReadWrite();
146        _value = value;
147    }
148    
149    @Override
150    public ContactListDetailPK getPrimaryKey() {
151        return _pk;
152    }
153    
154    public ContactListPK getContactListPK() {
155        return _value.getContactListPK();
156    }
157    
158    public ContactList getContactList(Session session, EntityPermission entityPermission) {
159        return ContactListFactory.getInstance().getEntityFromPK(session, entityPermission, getContactListPK());
160    }
161    
162    public ContactList getContactList(EntityPermission entityPermission) {
163        return getContactList(ThreadSession.currentSession(), entityPermission);
164    }
165    
166    public ContactList getContactList(Session session) {
167        return getContactList(session, EntityPermission.READ_ONLY);
168    }
169    
170    public ContactList getContactList() {
171        return getContactList(ThreadSession.currentSession(), EntityPermission.READ_ONLY);
172    }
173    
174    public ContactList getContactListForUpdate(Session session) {
175        return getContactList(session, EntityPermission.READ_WRITE);
176    }
177    
178    public ContactList getContactListForUpdate() {
179        return getContactList(ThreadSession.currentSession(), EntityPermission.READ_WRITE);
180    }
181    
182    public void setContactListPK(ContactListPK contactListPK)
183            throws PersistenceNotNullException, PersistenceReadOnlyException {
184        checkReadWrite();
185        _value.setContactListPK(contactListPK);
186    }
187    
188    public void setContactList(ContactList entity) {
189        setContactListPK(entity == null? null: entity.getPrimaryKey());
190    }
191    
192    public boolean getContactListPKHasBeenModified() {
193        return _value.getContactListPKHasBeenModified();
194    }
195    
196    public String getContactListName() {
197        return _value.getContactListName();
198    }
199    
200    public void setContactListName(String contactListName)
201            throws PersistenceNotNullException, PersistenceReadOnlyException {
202        checkReadWrite();
203        _value.setContactListName(contactListName);
204    }
205    
206    public boolean getContactListNameHasBeenModified() {
207        return _value.getContactListNameHasBeenModified();
208    }
209    
210    public ContactListGroupPK getContactListGroupPK() {
211        return _value.getContactListGroupPK();
212    }
213    
214    public ContactListGroup getContactListGroup(Session session, EntityPermission entityPermission) {
215        return ContactListGroupFactory.getInstance().getEntityFromPK(session, entityPermission, getContactListGroupPK());
216    }
217    
218    public ContactListGroup getContactListGroup(EntityPermission entityPermission) {
219        return getContactListGroup(ThreadSession.currentSession(), entityPermission);
220    }
221    
222    public ContactListGroup getContactListGroup(Session session) {
223        return getContactListGroup(session, EntityPermission.READ_ONLY);
224    }
225    
226    public ContactListGroup getContactListGroup() {
227        return getContactListGroup(ThreadSession.currentSession(), EntityPermission.READ_ONLY);
228    }
229    
230    public ContactListGroup getContactListGroupForUpdate(Session session) {
231        return getContactListGroup(session, EntityPermission.READ_WRITE);
232    }
233    
234    public ContactListGroup getContactListGroupForUpdate() {
235        return getContactListGroup(ThreadSession.currentSession(), EntityPermission.READ_WRITE);
236    }
237    
238    public void setContactListGroupPK(ContactListGroupPK contactListGroupPK)
239            throws PersistenceNotNullException, PersistenceReadOnlyException {
240        checkReadWrite();
241        _value.setContactListGroupPK(contactListGroupPK);
242    }
243    
244    public void setContactListGroup(ContactListGroup entity) {
245        setContactListGroupPK(entity == null? null: entity.getPrimaryKey());
246    }
247    
248    public boolean getContactListGroupPKHasBeenModified() {
249        return _value.getContactListGroupPKHasBeenModified();
250    }
251    
252    public ContactListTypePK getContactListTypePK() {
253        return _value.getContactListTypePK();
254    }
255    
256    public ContactListType getContactListType(Session session, EntityPermission entityPermission) {
257        return ContactListTypeFactory.getInstance().getEntityFromPK(session, entityPermission, getContactListTypePK());
258    }
259    
260    public ContactListType getContactListType(EntityPermission entityPermission) {
261        return getContactListType(ThreadSession.currentSession(), entityPermission);
262    }
263    
264    public ContactListType getContactListType(Session session) {
265        return getContactListType(session, EntityPermission.READ_ONLY);
266    }
267    
268    public ContactListType getContactListType() {
269        return getContactListType(ThreadSession.currentSession(), EntityPermission.READ_ONLY);
270    }
271    
272    public ContactListType getContactListTypeForUpdate(Session session) {
273        return getContactListType(session, EntityPermission.READ_WRITE);
274    }
275    
276    public ContactListType getContactListTypeForUpdate() {
277        return getContactListType(ThreadSession.currentSession(), EntityPermission.READ_WRITE);
278    }
279    
280    public void setContactListTypePK(ContactListTypePK contactListTypePK)
281            throws PersistenceNotNullException, PersistenceReadOnlyException {
282        checkReadWrite();
283        _value.setContactListTypePK(contactListTypePK);
284    }
285    
286    public void setContactListType(ContactListType entity) {
287        setContactListTypePK(entity == null? null: entity.getPrimaryKey());
288    }
289    
290    public boolean getContactListTypePKHasBeenModified() {
291        return _value.getContactListTypePKHasBeenModified();
292    }
293    
294    public ContactListFrequencyPK getContactListFrequencyPK() {
295        return _value.getContactListFrequencyPK();
296    }
297    
298    public ContactListFrequency getContactListFrequency(Session session, EntityPermission entityPermission) {
299        ContactListFrequencyPK pk = getContactListFrequencyPK();
300        ContactListFrequency entity = pk == null? null: ContactListFrequencyFactory.getInstance().getEntityFromPK(session, entityPermission, pk);
301        
302        return entity;
303    }
304    
305    public ContactListFrequency getContactListFrequency(EntityPermission entityPermission) {
306        return getContactListFrequency(ThreadSession.currentSession(), entityPermission);
307    }
308    
309    public ContactListFrequency getContactListFrequency(Session session) {
310        return getContactListFrequency(session, EntityPermission.READ_ONLY);
311    }
312    
313    public ContactListFrequency getContactListFrequency() {
314        return getContactListFrequency(ThreadSession.currentSession(), EntityPermission.READ_ONLY);
315    }
316    
317    public ContactListFrequency getContactListFrequencyForUpdate(Session session) {
318        return getContactListFrequency(session, EntityPermission.READ_WRITE);
319    }
320    
321    public ContactListFrequency getContactListFrequencyForUpdate() {
322        return getContactListFrequency(ThreadSession.currentSession(), EntityPermission.READ_WRITE);
323    }
324    
325    public void setContactListFrequencyPK(ContactListFrequencyPK contactListFrequencyPK)
326            throws PersistenceNotNullException, PersistenceReadOnlyException {
327        checkReadWrite();
328        _value.setContactListFrequencyPK(contactListFrequencyPK);
329    }
330    
331    public void setContactListFrequency(ContactListFrequency entity) {
332        setContactListFrequencyPK(entity == null? null: entity.getPrimaryKey());
333    }
334    
335    public boolean getContactListFrequencyPKHasBeenModified() {
336        return _value.getContactListFrequencyPKHasBeenModified();
337    }
338    
339    public WorkflowEntrancePK getDefaultPartyContactListStatusPK() {
340        return _value.getDefaultPartyContactListStatusPK();
341    }
342    
343    public WorkflowEntrance getDefaultPartyContactListStatus(Session session, EntityPermission entityPermission) {
344        return WorkflowEntranceFactory.getInstance().getEntityFromPK(session, entityPermission, getDefaultPartyContactListStatusPK());
345    }
346    
347    public WorkflowEntrance getDefaultPartyContactListStatus(EntityPermission entityPermission) {
348        return getDefaultPartyContactListStatus(ThreadSession.currentSession(), entityPermission);
349    }
350    
351    public WorkflowEntrance getDefaultPartyContactListStatus(Session session) {
352        return getDefaultPartyContactListStatus(session, EntityPermission.READ_ONLY);
353    }
354    
355    public WorkflowEntrance getDefaultPartyContactListStatus() {
356        return getDefaultPartyContactListStatus(ThreadSession.currentSession(), EntityPermission.READ_ONLY);
357    }
358    
359    public WorkflowEntrance getDefaultPartyContactListStatusForUpdate(Session session) {
360        return getDefaultPartyContactListStatus(session, EntityPermission.READ_WRITE);
361    }
362    
363    public WorkflowEntrance getDefaultPartyContactListStatusForUpdate() {
364        return getDefaultPartyContactListStatus(ThreadSession.currentSession(), EntityPermission.READ_WRITE);
365    }
366    
367    public void setDefaultPartyContactListStatusPK(WorkflowEntrancePK defaultPartyContactListStatusPK)
368            throws PersistenceNotNullException, PersistenceReadOnlyException {
369        checkReadWrite();
370        _value.setDefaultPartyContactListStatusPK(defaultPartyContactListStatusPK);
371    }
372    
373    public void setDefaultPartyContactListStatus(WorkflowEntrance entity) {
374        setDefaultPartyContactListStatusPK(entity == null? null: entity.getPrimaryKey());
375    }
376    
377    public boolean getDefaultPartyContactListStatusPKHasBeenModified() {
378        return _value.getDefaultPartyContactListStatusPKHasBeenModified();
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}