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 * DateTimeFormatDetail.java
021 */
022
023package com.echothree.model.data.party.server.entity;
024
025import com.echothree.model.data.party.common.pk.DateTimeFormatDetailPK;
026
027import com.echothree.model.data.party.common.pk.DateTimeFormatPK;
028
029import com.echothree.model.data.party.server.entity.DateTimeFormat;
030
031import com.echothree.model.data.party.server.factory.DateTimeFormatFactory;
032
033import com.echothree.model.data.party.common.pk.DateTimeFormatDetailPK;
034
035import com.echothree.model.data.party.server.value.DateTimeFormatDetailValue;
036
037import com.echothree.model.data.party.server.factory.DateTimeFormatDetailFactory;
038
039import com.echothree.util.common.exception.PersistenceException;
040import com.echothree.util.common.exception.PersistenceDatabaseException;
041import com.echothree.util.common.exception.PersistenceNotNullException;
042import com.echothree.util.common.exception.PersistenceReadOnlyException;
043
044import com.echothree.util.common.persistence.BasePK;
045
046import com.echothree.util.common.persistence.type.ByteArray;
047
048import com.echothree.util.server.persistence.BaseEntity;
049import com.echothree.util.server.persistence.EntityPermission;
050import com.echothree.util.server.persistence.Session;
051import com.echothree.util.server.persistence.ThreadSession;
052
053import java.io.Serializable;
054
055public class DateTimeFormatDetail
056        extends BaseEntity
057        implements Serializable {
058    
059    private DateTimeFormatDetailPK _pk;
060    private DateTimeFormatDetailValue _value;
061    
062    /** Creates a new instance of DateTimeFormatDetail */
063    public DateTimeFormatDetail()
064            throws PersistenceException {
065        super();
066    }
067    
068    /** Creates a new instance of DateTimeFormatDetail */
069    public DateTimeFormatDetail(DateTimeFormatDetailValue value, EntityPermission entityPermission) {
070        super(entityPermission);
071        
072        _value = value;
073        _pk = value.getPrimaryKey();
074    }
075    
076    @Override
077    public DateTimeFormatDetailFactory getBaseFactoryInstance() {
078        return DateTimeFormatDetailFactory.getInstance();
079    }
080    
081    @Override
082    public boolean hasBeenModified() {
083        return _value.hasBeenModified();
084    }
085    
086    @Override
087    public int hashCode() {
088        return _pk.hashCode();
089    }
090    
091    @Override
092    public String toString() {
093        return _pk.toString();
094    }
095    
096    @Override
097    public boolean equals(Object other) {
098        if(this == other)
099            return true;
100        
101        if(other instanceof DateTimeFormatDetail that) {
102            DateTimeFormatDetailValue thatValue = that.getDateTimeFormatDetailValue();
103            return _value.equals(thatValue);
104        } else {
105            return false;
106        }
107    }
108    
109    @Override
110    public void store(Session session)
111            throws PersistenceDatabaseException {
112        getBaseFactoryInstance().store(session, this);
113    }
114    
115    @Override
116    public void remove(Session session)
117            throws PersistenceDatabaseException {
118        getBaseFactoryInstance().remove(session, this);
119    }
120    
121    @Override
122    public void remove()
123            throws PersistenceDatabaseException {
124        getBaseFactoryInstance().remove(ThreadSession.currentSession(), this);
125    }
126    
127    public DateTimeFormatDetailValue getDateTimeFormatDetailValue() {
128        return _value;
129    }
130    
131    public void setDateTimeFormatDetailValue(DateTimeFormatDetailValue value)
132            throws PersistenceReadOnlyException {
133        checkReadWrite();
134        _value = value;
135    }
136    
137    @Override
138    public DateTimeFormatDetailPK getPrimaryKey() {
139        return _pk;
140    }
141    
142    public DateTimeFormatPK getDateTimeFormatPK() {
143        return _value.getDateTimeFormatPK();
144    }
145    
146    public DateTimeFormat getDateTimeFormat(Session session, EntityPermission entityPermission) {
147        return DateTimeFormatFactory.getInstance().getEntityFromPK(session, entityPermission, getDateTimeFormatPK());
148    }
149    
150    public DateTimeFormat getDateTimeFormat(EntityPermission entityPermission) {
151        return getDateTimeFormat(ThreadSession.currentSession(), entityPermission);
152    }
153    
154    public DateTimeFormat getDateTimeFormat(Session session) {
155        return getDateTimeFormat(session, EntityPermission.READ_ONLY);
156    }
157    
158    public DateTimeFormat getDateTimeFormat() {
159        return getDateTimeFormat(ThreadSession.currentSession(), EntityPermission.READ_ONLY);
160    }
161    
162    public DateTimeFormat getDateTimeFormatForUpdate(Session session) {
163        return getDateTimeFormat(session, EntityPermission.READ_WRITE);
164    }
165    
166    public DateTimeFormat getDateTimeFormatForUpdate() {
167        return getDateTimeFormat(ThreadSession.currentSession(), EntityPermission.READ_WRITE);
168    }
169    
170    public void setDateTimeFormatPK(DateTimeFormatPK dateTimeFormatPK)
171            throws PersistenceNotNullException, PersistenceReadOnlyException {
172        checkReadWrite();
173        _value.setDateTimeFormatPK(dateTimeFormatPK);
174    }
175    
176    public void setDateTimeFormat(DateTimeFormat entity) {
177        setDateTimeFormatPK(entity == null? null: entity.getPrimaryKey());
178    }
179    
180    public boolean getDateTimeFormatPKHasBeenModified() {
181        return _value.getDateTimeFormatPKHasBeenModified();
182    }
183    
184    public String getDateTimeFormatName() {
185        return _value.getDateTimeFormatName();
186    }
187    
188    public void setDateTimeFormatName(String dateTimeFormatName)
189            throws PersistenceNotNullException, PersistenceReadOnlyException {
190        checkReadWrite();
191        _value.setDateTimeFormatName(dateTimeFormatName);
192    }
193    
194    public boolean getDateTimeFormatNameHasBeenModified() {
195        return _value.getDateTimeFormatNameHasBeenModified();
196    }
197    
198    public String getJavaShortDateFormat() {
199        return _value.getJavaShortDateFormat();
200    }
201    
202    public void setJavaShortDateFormat(String javaShortDateFormat)
203            throws PersistenceNotNullException, PersistenceReadOnlyException {
204        checkReadWrite();
205        _value.setJavaShortDateFormat(javaShortDateFormat);
206    }
207    
208    public boolean getJavaShortDateFormatHasBeenModified() {
209        return _value.getJavaShortDateFormatHasBeenModified();
210    }
211    
212    public String getJavaAbbrevDateFormat() {
213        return _value.getJavaAbbrevDateFormat();
214    }
215    
216    public void setJavaAbbrevDateFormat(String javaAbbrevDateFormat)
217            throws PersistenceNotNullException, PersistenceReadOnlyException {
218        checkReadWrite();
219        _value.setJavaAbbrevDateFormat(javaAbbrevDateFormat);
220    }
221    
222    public boolean getJavaAbbrevDateFormatHasBeenModified() {
223        return _value.getJavaAbbrevDateFormatHasBeenModified();
224    }
225    
226    public String getJavaAbbrevDateFormatWeekday() {
227        return _value.getJavaAbbrevDateFormatWeekday();
228    }
229    
230    public void setJavaAbbrevDateFormatWeekday(String javaAbbrevDateFormatWeekday)
231            throws PersistenceNotNullException, PersistenceReadOnlyException {
232        checkReadWrite();
233        _value.setJavaAbbrevDateFormatWeekday(javaAbbrevDateFormatWeekday);
234    }
235    
236    public boolean getJavaAbbrevDateFormatWeekdayHasBeenModified() {
237        return _value.getJavaAbbrevDateFormatWeekdayHasBeenModified();
238    }
239    
240    public String getJavaLongDateFormat() {
241        return _value.getJavaLongDateFormat();
242    }
243    
244    public void setJavaLongDateFormat(String javaLongDateFormat)
245            throws PersistenceNotNullException, PersistenceReadOnlyException {
246        checkReadWrite();
247        _value.setJavaLongDateFormat(javaLongDateFormat);
248    }
249    
250    public boolean getJavaLongDateFormatHasBeenModified() {
251        return _value.getJavaLongDateFormatHasBeenModified();
252    }
253    
254    public String getJavaLongDateFormatWeekday() {
255        return _value.getJavaLongDateFormatWeekday();
256    }
257    
258    public void setJavaLongDateFormatWeekday(String javaLongDateFormatWeekday)
259            throws PersistenceNotNullException, PersistenceReadOnlyException {
260        checkReadWrite();
261        _value.setJavaLongDateFormatWeekday(javaLongDateFormatWeekday);
262    }
263    
264    public boolean getJavaLongDateFormatWeekdayHasBeenModified() {
265        return _value.getJavaLongDateFormatWeekdayHasBeenModified();
266    }
267    
268    public String getJavaTimeFormat() {
269        return _value.getJavaTimeFormat();
270    }
271    
272    public void setJavaTimeFormat(String javaTimeFormat)
273            throws PersistenceNotNullException, PersistenceReadOnlyException {
274        checkReadWrite();
275        _value.setJavaTimeFormat(javaTimeFormat);
276    }
277    
278    public boolean getJavaTimeFormatHasBeenModified() {
279        return _value.getJavaTimeFormatHasBeenModified();
280    }
281    
282    public String getJavaTimeFormatSeconds() {
283        return _value.getJavaTimeFormatSeconds();
284    }
285    
286    public void setJavaTimeFormatSeconds(String javaTimeFormatSeconds)
287            throws PersistenceNotNullException, PersistenceReadOnlyException {
288        checkReadWrite();
289        _value.setJavaTimeFormatSeconds(javaTimeFormatSeconds);
290    }
291    
292    public boolean getJavaTimeFormatSecondsHasBeenModified() {
293        return _value.getJavaTimeFormatSecondsHasBeenModified();
294    }
295    
296    public String getUnixShortDateFormat() {
297        return _value.getUnixShortDateFormat();
298    }
299    
300    public void setUnixShortDateFormat(String unixShortDateFormat)
301            throws PersistenceNotNullException, PersistenceReadOnlyException {
302        checkReadWrite();
303        _value.setUnixShortDateFormat(unixShortDateFormat);
304    }
305    
306    public boolean getUnixShortDateFormatHasBeenModified() {
307        return _value.getUnixShortDateFormatHasBeenModified();
308    }
309    
310    public String getUnixAbbrevDateFormat() {
311        return _value.getUnixAbbrevDateFormat();
312    }
313    
314    public void setUnixAbbrevDateFormat(String unixAbbrevDateFormat)
315            throws PersistenceNotNullException, PersistenceReadOnlyException {
316        checkReadWrite();
317        _value.setUnixAbbrevDateFormat(unixAbbrevDateFormat);
318    }
319    
320    public boolean getUnixAbbrevDateFormatHasBeenModified() {
321        return _value.getUnixAbbrevDateFormatHasBeenModified();
322    }
323    
324    public String getUnixAbbrevDateFormatWeekday() {
325        return _value.getUnixAbbrevDateFormatWeekday();
326    }
327    
328    public void setUnixAbbrevDateFormatWeekday(String unixAbbrevDateFormatWeekday)
329            throws PersistenceNotNullException, PersistenceReadOnlyException {
330        checkReadWrite();
331        _value.setUnixAbbrevDateFormatWeekday(unixAbbrevDateFormatWeekday);
332    }
333    
334    public boolean getUnixAbbrevDateFormatWeekdayHasBeenModified() {
335        return _value.getUnixAbbrevDateFormatWeekdayHasBeenModified();
336    }
337    
338    public String getUnixLongDateFormat() {
339        return _value.getUnixLongDateFormat();
340    }
341    
342    public void setUnixLongDateFormat(String unixLongDateFormat)
343            throws PersistenceNotNullException, PersistenceReadOnlyException {
344        checkReadWrite();
345        _value.setUnixLongDateFormat(unixLongDateFormat);
346    }
347    
348    public boolean getUnixLongDateFormatHasBeenModified() {
349        return _value.getUnixLongDateFormatHasBeenModified();
350    }
351    
352    public String getUnixLongDateFormatWeekday() {
353        return _value.getUnixLongDateFormatWeekday();
354    }
355    
356    public void setUnixLongDateFormatWeekday(String unixLongDateFormatWeekday)
357            throws PersistenceNotNullException, PersistenceReadOnlyException {
358        checkReadWrite();
359        _value.setUnixLongDateFormatWeekday(unixLongDateFormatWeekday);
360    }
361    
362    public boolean getUnixLongDateFormatWeekdayHasBeenModified() {
363        return _value.getUnixLongDateFormatWeekdayHasBeenModified();
364    }
365    
366    public String getUnixTimeFormat() {
367        return _value.getUnixTimeFormat();
368    }
369    
370    public void setUnixTimeFormat(String unixTimeFormat)
371            throws PersistenceNotNullException, PersistenceReadOnlyException {
372        checkReadWrite();
373        _value.setUnixTimeFormat(unixTimeFormat);
374    }
375    
376    public boolean getUnixTimeFormatHasBeenModified() {
377        return _value.getUnixTimeFormatHasBeenModified();
378    }
379    
380    public String getUnixTimeFormatSeconds() {
381        return _value.getUnixTimeFormatSeconds();
382    }
383    
384    public void setUnixTimeFormatSeconds(String unixTimeFormatSeconds)
385            throws PersistenceNotNullException, PersistenceReadOnlyException {
386        checkReadWrite();
387        _value.setUnixTimeFormatSeconds(unixTimeFormatSeconds);
388    }
389    
390    public boolean getUnixTimeFormatSecondsHasBeenModified() {
391        return _value.getUnixTimeFormatSecondsHasBeenModified();
392    }
393    
394    public String getShortDateSeparator() {
395        return _value.getShortDateSeparator();
396    }
397    
398    public void setShortDateSeparator(String shortDateSeparator)
399            throws PersistenceNotNullException, PersistenceReadOnlyException {
400        checkReadWrite();
401        _value.setShortDateSeparator(shortDateSeparator);
402    }
403    
404    public boolean getShortDateSeparatorHasBeenModified() {
405        return _value.getShortDateSeparatorHasBeenModified();
406    }
407    
408    public String getTimeSeparator() {
409        return _value.getTimeSeparator();
410    }
411    
412    public void setTimeSeparator(String timeSeparator)
413            throws PersistenceNotNullException, PersistenceReadOnlyException {
414        checkReadWrite();
415        _value.setTimeSeparator(timeSeparator);
416    }
417    
418    public boolean getTimeSeparatorHasBeenModified() {
419        return _value.getTimeSeparatorHasBeenModified();
420    }
421    
422    public Boolean getIsDefault() {
423        return _value.getIsDefault();
424    }
425    
426    public void setIsDefault(Boolean isDefault)
427            throws PersistenceNotNullException, PersistenceReadOnlyException {
428        checkReadWrite();
429        _value.setIsDefault(isDefault);
430    }
431    
432    public boolean getIsDefaultHasBeenModified() {
433        return _value.getIsDefaultHasBeenModified();
434    }
435    
436    public Integer getSortOrder() {
437        return _value.getSortOrder();
438    }
439    
440    public void setSortOrder(Integer sortOrder)
441            throws PersistenceNotNullException, PersistenceReadOnlyException {
442        checkReadWrite();
443        _value.setSortOrder(sortOrder);
444    }
445    
446    public boolean getSortOrderHasBeenModified() {
447        return _value.getSortOrderHasBeenModified();
448    }
449    
450    public Long getFromTime() {
451        return _value.getFromTime();
452    }
453    
454    public void setFromTime(Long fromTime)
455            throws PersistenceNotNullException, PersistenceReadOnlyException {
456        checkReadWrite();
457        _value.setFromTime(fromTime);
458    }
459    
460    public boolean getFromTimeHasBeenModified() {
461        return _value.getFromTimeHasBeenModified();
462    }
463    
464    public Long getThruTime() {
465        return _value.getThruTime();
466    }
467    
468    public void setThruTime(Long thruTime)
469            throws PersistenceNotNullException, PersistenceReadOnlyException {
470        checkReadWrite();
471        _value.setThruTime(thruTime);
472    }
473    
474    public boolean getThruTimeHasBeenModified() {
475        return _value.getThruTimeHasBeenModified();
476    }
477    
478}