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