Coverage Report - net.wotonomy.foundation.NSTimestamp
 
Classes in this File Line Coverage Branch Coverage Complexity
NSTimestamp
0% 
N/A 
1.84
 
 1  
 /*
 2  
 Wotonomy: OpenStep design patterns for pure Java applications.
 3  
 Copyright (C) 2002 Israfil consulting Services Corporation
 4  
 
 5  
 This library is free software; you can redistribute it and/or
 6  
 modify it under the terms of the GNU Lesser General Public
 7  
 License as published by the Free Software Foundation; either
 8  
 version 2.1 of the License, or (at your option) any later version.
 9  
 
 10  
 This library is distributed in the hope that it will be useful,
 11  
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 13  
 Lesser General Public License for more details.
 14  
 
 15  
 You should have received a copy of the GNU Lesser General Public
 16  
 License along with this library; if not, see http://www.gnu.org
 17  
 
 18  
 $Id: NSTimestamp.java 892 2006-02-16 12:47:16 +0000 (Thu, 16 Feb 2006) cgruber $
 19  
 
 20  
 */
 21  
 
 22  
 package net.wotonomy.foundation;
 23  
 
 24  
 import java.sql.Timestamp;
 25  
 import java.util.Date;
 26  
 import java.util.TimeZone;
 27  
 
 28  
 /**
 29  
 * A channel to the database, representing a communication
 30  
 * stream within a context of an adaptor.
 31  
 *
 32  
 * @author cgruber@israfil.net
 33  
 * @author $Author: cgruber $
 34  
 * @version $Revision: 892 $
 35  
 */
 36  
 
 37  0
 public class NSTimestamp extends Timestamp
 38  
     implements NSCoding {
 39  
 
 40  
     public static class IntRef {
 41  
 
 42  0
         public int value = 0;
 43  
 
 44  
         public String toString() {
 45  0
                 return getClass().getName() + " < value = " + value + " >";
 46  
         }
 47  
 
 48  0
         public IntRef() {
 49  0
         }
 50  
     }
 51  
 
 52  
 
 53  0
     public static final NSTimestamp DistantPast = new NSTimestamp(0xffffc77f2e9b6800L);
 54  0
     public static final NSTimestamp DistantFuture = new NSTimestamp(0x7fffffffffffffffL);
 55  
     public static long currentTimeIntervalSinceReferenceDate() {
 56  0
         return System.currentTimeMillis() / 1000L;
 57  
     }
 58  
 
 59  
     public static NSTimestamp distantFuture() {
 60  0
         return DistantFuture;
 61  
     }
 62  
 
 63  
     public static NSTimestamp distantPast() {
 64  0
         return DistantPast;
 65  
     }
 66  
 
 67  
     public static long millisecondsToTimeInterval(long l) {
 68  0
         return l / 1000L;
 69  
     }
 70  
 
 71  
     public static long timeIntervalToMilliseconds(long l) {
 72  0
         return l * 1000L;
 73  
     }
 74  
 
 75  
     public Class classForCoder() {
 76  0
         return getClass();
 77  
     }
 78  
 
 79  
     public static Object decodeObject(NSCoder nscoder) {
 80  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 81  
     }
 82  
 
 83  
     public void encodeWithCoder(NSCoder nscoder) {
 84  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 85  
     }
 86  
 
 87  
     public NSTimestamp() {
 88  0
             super(0);
 89  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 90  
     }
 91  
 
 92  
     public NSTimestamp(long l) {
 93  0
             super(l);
 94  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 95  
     }
 96  
 
 97  
     public NSTimestamp(long l, int i) {
 98  0
             super(0);
 99  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 100  
     }
 101  
 
 102  
     public NSTimestamp(long l, NSTimestamp nstimestamp) {
 103  0
             super(0);
 104  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 105  
     }
 106  
 
 107  
     public NSTimestamp(long l, TimeZone timezone) {
 108  0
             super(0);
 109  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 110  
     }
 111  
 
 112  
     public NSTimestamp(long l, int i, TimeZone timezone) {
 113  0
             super(0);
 114  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 115  
     }
 116  
 
 117  
     public NSTimestamp(int i, int j, int k, int l, int i1, int j1, TimeZone timezone) {
 118  0
             super(0);
 119  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 120  
     }
 121  
 
 122  
     public NSTimestamp(Date date) {
 123  0
             super(0);
 124  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 125  
     }
 126  
 
 127  
     public NSTimestamp(Timestamp timestamp) {
 128  0
             super(0);
 129  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 130  
     }
 131  
 
 132  
     public NSTimestamp timestampByAddingGregorianUnits(int i, int j, int k, int l, int i1, int j1) {
 133  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 134  
     }
 135  
 
 136  
     public NSTimestamp timestampByAddingTimeInterval(long l) {
 137  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 138  
     }
 139  
 
 140  
     public long dayOfCommonEra() {
 141  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 142  
     }
 143  
 
 144  
     public int dayOfMonth() {
 145  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 146  
     }
 147  
 
 148  
     public int dayOfWeek() {
 149  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 150  
     }
 151  
 
 152  
     public int dayOfYear() {
 153  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 154  
     }
 155  
 
 156  
     public int hourOfDay() {
 157  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 158  
     }
 159  
 
 160  
     public int microsecondOfSecond() {
 161  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 162  
     }
 163  
 
 164  
     public int minuteOfHour() {
 165  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 166  
     }
 167  
 
 168  
     public int monthOfYear() {
 169  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 170  
     }
 171  
 
 172  
     public int secondOfMinute() {
 173  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 174  
     }
 175  
 
 176  
     public int yearOfCommonEra() {
 177  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 178  
     }
 179  
 
 180  
     public void gregorianUnitsSinceTimestamp(IntRef intref, IntRef intref1, IntRef intref2, IntRef intref3, IntRef intref4, IntRef intref5, NSTimestamp nstimestamp) {
 181  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 182  
     }
 183  
 
 184  
     public long timeIntervalSinceTimestamp(NSTimestamp nstimestamp) {
 185  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 186  
     }
 187  
 
 188  
     public long timeIntervalSinceNow() {
 189  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 190  
     }
 191  
 
 192  
     public long timeIntervalSinceReferenceDate() {
 193  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 194  
     }
 195  
 
 196  
     public int compare(NSTimestamp nstimestamp) {
 197  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 198  
     }
 199  
 
 200  
     public NSTimestamp earlierTimestamp(NSTimestamp nstimestamp) {
 201  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 202  
     }
 203  
 
 204  
     public NSTimestamp laterTimestamp(NSTimestamp nstimestamp) {
 205  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 206  
     }
 207  
 
 208  
     public String toString() {
 209  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 210  
     }
 211  
 
 212  
     public NSTimeZone timeZone() {
 213  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 214  
     }
 215  
 
 216  
     public long _getTimeInMillis() {
 217  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 218  
     }
 219  
 
 220  
     public void setNanos(int i) {
 221  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 222  
     }
 223  
 
 224  
     /** @deprecated This method deprecated in parent java.util.Date */
 225  
     public void setDate(int i) {
 226  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 227  
     }
 228  
 
 229  
     /** @deprecated This method deprecated in parent java.util.Date */
 230  
     public void setHours(int i) {
 231  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 232  
     }
 233  
 
 234  
     /** @deprecated This method deprecated in parent java.util.Date */
 235  
     public void setMinutes(int i) {
 236  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 237  
     }
 238  
 
 239  
     /** @deprecated This method deprecated in parent java.util.Date */
 240  
     public void setMonth(int i) {
 241  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 242  
     }
 243  
 
 244  
     /** @deprecated This method deprecated in parent java.util.Date */
 245  
     public void setSeconds(int i) {
 246  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 247  
     }
 248  
 
 249  
     public void setTime(long l) {
 250  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 251  
     }
 252  
 
 253  
     public long getTime() {
 254  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 255  
     }
 256  
 
 257  
     /** @deprecated This method deprecated in parent java.util.Date */
 258  
     public void setYear(int i) {
 259  0
                 throw new UnsupportedOperationException("Not Yet Implemented");
 260  
     }
 261  
 }
 262  
 /*
 263  
  * $Log$
 264  
  * Revision 1.1  2006/02/16 12:47:16  cgruber
 265  
  * Check in all sources in eclipse-friendly maven-enabled packages.
 266  
  *
 267  
  * Revision 1.2  2003/08/06 23:07:52  chochos
 268  
  * general code cleanup (mostly, removing unused imports)
 269  
  *
 270  
  * Revision 1.1  2002/07/14 21:56:16  mpowers
 271  
  * Contributions from cgruber.
 272  
  *
 273  
  * Revision 1.3  2002/06/25 19:06:13  cgruber
 274  
  * Comment fix.
 275  
  *
 276  
  * Revision 1.2  2002/06/25 19:05:27  cgruber
 277  
  * Add deprecation statements to remove warnings 
 278  
  * about java.util.Date's deprecated APIs.
 279  
  *
 280  
  * Revision 1.1  2002/06/25 07:52:56  cgruber
 281  
  * Add quite a few abstract classes, interfaces, and classes.  All 
 282  
  * API consistent with WebObjects, but with no implementation, nor 
 283  
  * any private or package access members from the original.
 284  
  *
 285  
  */