Subversion Repository Public Repository

litesoft

Diff Revisions 898 vs 912 for /trunk/Java/core/Anywhere/src/org/litesoft/core/simpletypes/temporal/CalendarYMD.java

Diff revisions: vs.
  @@ -12,41 +12,19 @@
12 12 * Note: This class supports Gregorian dates only and has no concept of time or TimeZones. As such when working with
13 13 * Java Util Date(s) (or it's descendants) the local (or "Wall") date is all that is considered!
14 14 */
15 - @SuppressWarnings("UnusedDeclaration")
16 15 public final class CalendarYMD extends AbstractCalendarYMD<CalendarYMD, AbstractCalendarYMD.Mutable> implements SQLdateable
17 16 {
18 17 private static final long serialVersionUID = 1L;
19 18
20 - private int mYear, mMonth, mDay;
21 -
22 - @Override
23 - public int getYear()
24 - {
25 - return mYear;
26 - }
27 -
28 - @Override
29 - public int getMonth()
30 - {
31 - return mMonth;
32 - }
33 -
34 - @Override
35 - public int getDay()
19 + @SuppressWarnings({"deprecation", "UnusedDeclaration"}) @Deprecated /** for Serialization */
20 + protected CalendarYMD()
36 21 {
37 - return mDay;
22 + this( 0, 1, 1 );
38 23 }
39 24
40 25 public CalendarYMD( int pYear, int pMonth, int pDay )
41 26 {
42 - mMonth = validateMonth( mYear = pYear, pMonth );
43 - mDay = validateDay( mYear, mMonth, pDay );
44 - }
45 -
46 - @SuppressWarnings({"deprecation", "UnusedDeclaration"}) @Deprecated /** for Serialization */
47 - protected CalendarYMD()
48 - {
49 - this( 0, 0, 0 );
27 + super( pYear, pMonth, pDay );
50 28 }
51 29
52 30 public CalendarYMD( CalendarAccessorYMD pAccessor )
  @@ -115,7 +93,7 @@
115 93 @Override
116 94 public UtilDateAdaptor toUtilDateAdaptor()
117 95 {
118 - return UtilDateAdaptor.wall( getYear(), getMonth(), getDay() );
96 + return UtilDateAdaptor.currentWall( getYear(), getMonth(), getDay() );
119 97 }
120 98
121 99 // vvvvvvvvvvvvvvvvvv Non-common Public methods vvvvvvvvvvvvvvvvv
  @@ -193,6 +171,12 @@
193 171 }
194 172
195 173 @Override
174 + protected Mutable createMutable( int pNewYear )
175 + {
176 + return new Mutable( pNewYear, getMonth(), getDay(), true );
177 + }
178 +
179 + @Override
196 180 protected Mutable createMutable( int pYear, int pNewMonth )
197 181 {
198 182 return new Mutable( pYear, pNewMonth, getDay(), true );