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 * 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()
123            throws PersistenceDatabaseException {
124        getBaseFactoryInstance().store(this);
125    }
126    
127    @Override
128    public void remove()
129            throws PersistenceDatabaseException {
130        getBaseFactoryInstance().remove(this);
131    }
132    
133    public ContactListDetailValue getContactListDetailValue() {
134        return _value;
135    }
136    
137    public void setContactListDetailValue(ContactListDetailValue value)
138            throws PersistenceReadOnlyException {
139        checkReadWrite();
140        _value = value;
141    }
142    
143    @Override
144    public ContactListDetailPK getPrimaryKey() {
145        return _pk;
146    }
147    
148    public ContactListPK getContactListPK() {
149        return _value.getContactListPK();
150    }
151    
152    public ContactList getContactList(EntityPermission entityPermission) {
153        return ContactListFactory.getInstance().getEntityFromPK(entityPermission, getContactListPK());
154    }
155    
156    public ContactList getContactList() {
157        return getContactList(EntityPermission.READ_ONLY);
158    }
159    
160    public ContactList getContactListForUpdate() {
161        return getContactList(EntityPermission.READ_WRITE);
162    }
163    
164    public void setContactListPK(ContactListPK contactListPK)
165            throws PersistenceNotNullException, PersistenceReadOnlyException {
166        checkReadWrite();
167        _value.setContactListPK(contactListPK);
168    }
169    
170    public void setContactList(ContactList entity) {
171        setContactListPK(entity == null? null: entity.getPrimaryKey());
172    }
173    
174    public boolean getContactListPKHasBeenModified() {
175        return _value.getContactListPKHasBeenModified();
176    }
177    
178    public String getContactListName() {
179        return _value.getContactListName();
180    }
181    
182    public void setContactListName(String contactListName)
183            throws PersistenceNotNullException, PersistenceReadOnlyException {
184        checkReadWrite();
185        _value.setContactListName(contactListName);
186    }
187    
188    public boolean getContactListNameHasBeenModified() {
189        return _value.getContactListNameHasBeenModified();
190    }
191    
192    public ContactListGroupPK getContactListGroupPK() {
193        return _value.getContactListGroupPK();
194    }
195    
196    public ContactListGroup getContactListGroup(EntityPermission entityPermission) {
197        return ContactListGroupFactory.getInstance().getEntityFromPK(entityPermission, getContactListGroupPK());
198    }
199    
200    public ContactListGroup getContactListGroup() {
201        return getContactListGroup(EntityPermission.READ_ONLY);
202    }
203    
204    public ContactListGroup getContactListGroupForUpdate() {
205        return getContactListGroup(EntityPermission.READ_WRITE);
206    }
207    
208    public void setContactListGroupPK(ContactListGroupPK contactListGroupPK)
209            throws PersistenceNotNullException, PersistenceReadOnlyException {
210        checkReadWrite();
211        _value.setContactListGroupPK(contactListGroupPK);
212    }
213    
214    public void setContactListGroup(ContactListGroup entity) {
215        setContactListGroupPK(entity == null? null: entity.getPrimaryKey());
216    }
217    
218    public boolean getContactListGroupPKHasBeenModified() {
219        return _value.getContactListGroupPKHasBeenModified();
220    }
221    
222    public ContactListTypePK getContactListTypePK() {
223        return _value.getContactListTypePK();
224    }
225    
226    public ContactListType getContactListType(EntityPermission entityPermission) {
227        return ContactListTypeFactory.getInstance().getEntityFromPK(entityPermission, getContactListTypePK());
228    }
229    
230    public ContactListType getContactListType() {
231        return getContactListType(EntityPermission.READ_ONLY);
232    }
233    
234    public ContactListType getContactListTypeForUpdate() {
235        return getContactListType(EntityPermission.READ_WRITE);
236    }
237    
238    public void setContactListTypePK(ContactListTypePK contactListTypePK)
239            throws PersistenceNotNullException, PersistenceReadOnlyException {
240        checkReadWrite();
241        _value.setContactListTypePK(contactListTypePK);
242    }
243    
244    public void setContactListType(ContactListType entity) {
245        setContactListTypePK(entity == null? null: entity.getPrimaryKey());
246    }
247    
248    public boolean getContactListTypePKHasBeenModified() {
249        return _value.getContactListTypePKHasBeenModified();
250    }
251    
252    public ContactListFrequencyPK getContactListFrequencyPK() {
253        return _value.getContactListFrequencyPK();
254    }
255    
256    public ContactListFrequency getContactListFrequency(EntityPermission entityPermission) {
257        ContactListFrequencyPK pk = getContactListFrequencyPK();
258        ContactListFrequency entity = pk == null? null: ContactListFrequencyFactory.getInstance().getEntityFromPK(entityPermission, pk);
259        
260        return entity;
261    }
262    
263    public ContactListFrequency getContactListFrequency() {
264        return getContactListFrequency(EntityPermission.READ_ONLY);
265    }
266    
267    public ContactListFrequency getContactListFrequencyForUpdate() {
268        return getContactListFrequency(EntityPermission.READ_WRITE);
269    }
270    
271    public void setContactListFrequencyPK(ContactListFrequencyPK contactListFrequencyPK)
272            throws PersistenceNotNullException, PersistenceReadOnlyException {
273        checkReadWrite();
274        _value.setContactListFrequencyPK(contactListFrequencyPK);
275    }
276    
277    public void setContactListFrequency(ContactListFrequency entity) {
278        setContactListFrequencyPK(entity == null? null: entity.getPrimaryKey());
279    }
280    
281    public boolean getContactListFrequencyPKHasBeenModified() {
282        return _value.getContactListFrequencyPKHasBeenModified();
283    }
284    
285    public WorkflowEntrancePK getDefaultPartyContactListStatusPK() {
286        return _value.getDefaultPartyContactListStatusPK();
287    }
288    
289    public WorkflowEntrance getDefaultPartyContactListStatus(EntityPermission entityPermission) {
290        return WorkflowEntranceFactory.getInstance().getEntityFromPK(entityPermission, getDefaultPartyContactListStatusPK());
291    }
292    
293    public WorkflowEntrance getDefaultPartyContactListStatus() {
294        return getDefaultPartyContactListStatus(EntityPermission.READ_ONLY);
295    }
296    
297    public WorkflowEntrance getDefaultPartyContactListStatusForUpdate() {
298        return getDefaultPartyContactListStatus(EntityPermission.READ_WRITE);
299    }
300    
301    public void setDefaultPartyContactListStatusPK(WorkflowEntrancePK defaultPartyContactListStatusPK)
302            throws PersistenceNotNullException, PersistenceReadOnlyException {
303        checkReadWrite();
304        _value.setDefaultPartyContactListStatusPK(defaultPartyContactListStatusPK);
305    }
306    
307    public void setDefaultPartyContactListStatus(WorkflowEntrance entity) {
308        setDefaultPartyContactListStatusPK(entity == null? null: entity.getPrimaryKey());
309    }
310    
311    public boolean getDefaultPartyContactListStatusPKHasBeenModified() {
312        return _value.getDefaultPartyContactListStatusPKHasBeenModified();
313    }
314    
315    public Boolean getIsDefault() {
316        return _value.getIsDefault();
317    }
318    
319    public void setIsDefault(Boolean isDefault)
320            throws PersistenceNotNullException, PersistenceReadOnlyException {
321        checkReadWrite();
322        _value.setIsDefault(isDefault);
323    }
324    
325    public boolean getIsDefaultHasBeenModified() {
326        return _value.getIsDefaultHasBeenModified();
327    }
328    
329    public Integer getSortOrder() {
330        return _value.getSortOrder();
331    }
332    
333    public void setSortOrder(Integer sortOrder)
334            throws PersistenceNotNullException, PersistenceReadOnlyException {
335        checkReadWrite();
336        _value.setSortOrder(sortOrder);
337    }
338    
339    public boolean getSortOrderHasBeenModified() {
340        return _value.getSortOrderHasBeenModified();
341    }
342    
343    public Long getFromTime() {
344        return _value.getFromTime();
345    }
346    
347    public void setFromTime(Long fromTime)
348            throws PersistenceNotNullException, PersistenceReadOnlyException {
349        checkReadWrite();
350        _value.setFromTime(fromTime);
351    }
352    
353    public boolean getFromTimeHasBeenModified() {
354        return _value.getFromTimeHasBeenModified();
355    }
356    
357    public Long getThruTime() {
358        return _value.getThruTime();
359    }
360    
361    public void setThruTime(Long thruTime)
362            throws PersistenceNotNullException, PersistenceReadOnlyException {
363        checkReadWrite();
364        _value.setThruTime(thruTime);
365    }
366    
367    public boolean getThruTimeHasBeenModified() {
368        return _value.getThruTimeHasBeenModified();
369    }
370    
371}