Class SqlDate

    • Constructor Detail

      • SqlDate

        public SqlDate​(Object owner,
                       String fieldName)
        Creates a SqlDate object that represents the time at which it was allocated. Assigns owning object and field name
        Parameters:
        owner - the owning object
        fieldName - the owning field name
      • SqlDate

        public SqlDate​(Object owner,
                       String fieldName,
                       long date)
        Creates a SqlDate object that represents the given time in milliseconds. Assigns owning object and field name
        Parameters:
        owner - the owning object
        fieldName - the owning field name
        date - the number of milliseconds
    • Method Detail

      • setTime

        public void setTime​(long time)
        Sets the SqlDate object to represent a point in time that is time milliseconds after January 1, 1970 00:00:00 GMT.
        Overrides:
        setTime in class Date
        Parameters:
        time - the number of milliseconds.
        See Also:
        Date
      • clone

        public Object clone()
        Creates and returns a copy of this object.

        Mutable Second Class Objects are required to provide a public clone method in order to allow for copying PersistenceCapable objects. In contrast to Object.clone(), this method must not throw a CloneNotSupportedException.

        Overrides:
        clone in class Date
      • setYear

        public void setYear​(int year)
        Deprecated.
        As of JDK version 1.1, replaced by Calendar.set(Calendar.YEAR, year + 1900).
        Sets the year of this SqlDate object to be the specified value plus 1900.
        Overrides:
        setYear in class Date
        Parameters:
        year - the year value.
        See Also:
        Calendar, Date
      • setMonth

        public void setMonth​(int month)
        Deprecated.
        As of JDK version 1.1, replaced by Calendar.set(Calendar.MONTH, int month).
        Sets the month of this date to the specified value.
        Overrides:
        setMonth in class Date
        Parameters:
        month - the month value between 0-11.
        See Also:
        Calendar, Date
      • setDate

        public void setDate​(int date)
        Deprecated.
        As of JDK version 1.1, replaced by Calendar.set(Calendar.DAY_OF_MONTH, int date).
        Sets the day of the month of this SqlDate object to the specified value.
        Overrides:
        setDate in class Date
        Parameters:
        date - the day of the month value between 1-31.
        See Also:
        Calendar, Date
      • cloneInternal

        public Object cloneInternal()
        Creates and returns a copy of this object without resetting the owner and field value.
        Specified by:
        cloneInternal in interface SCO
      • setTimeInternal

        public void setTimeInternal​(long time)
        Sets the SqlDate object without notification of the Owner field. Used internaly to populate date from DB
        Specified by:
        setTimeInternal in interface SCODate
        Parameters:
        time - the number of milliseconds.
        See Also:
        Date
      • unsetOwner

        public void unsetOwner()
        Nullifies references to the owner Object and Field NOTE: This method should be called under the locking of the owener' state manager.
        Specified by:
        unsetOwner in interface SCO
      • getOwner

        public Object getOwner()
        Returns the owner object of the SCO instance
        Specified by:
        getOwner in interface SCO
        Returns:
        owner object
      • getFieldName

        public String getFieldName()
        Returns the field name
        Specified by:
        getFieldName in interface SCO
        Returns:
        field name as java.lang.String
      • makeDirty

        public StateManager makeDirty()
        Marks object dirty
        Specified by:
        makeDirty in interface SCO
        Returns:
        StateManager associated with the owner
      • applyUpdates

        public void applyUpdates​(StateManager sm,
                                 boolean modified)
        Apply changes (no-op)
        Specified by:
        applyUpdates in interface SCO