Class SqlTime

    • Constructor Detail

      • SqlTime

        public SqlTime​(Object owner,
                       String fieldName)
        Creates a SqlTime 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
      • SqlTime

        public SqlTime​(Object owner,
                       String fieldName,
                       long date)
        Creates a SqlTime 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 SqlTime object to represent a point in time that is time milliseconds after January 1, 1970 00:00:00 GMT.
        Overrides:
        setTime in class Time
        Parameters:
        time - the number of milliseconds.
        See Also:
        Time
      • 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
      • setHours

        public void setHours​(int hours)
        Deprecated.
        As of JDK version 1.1, replaced by Calendar.set(Calendar.HOUR_OF_DAY, int hours).
        Sets the hour of this SqlTime object to the specified value.
        Overrides:
        setHours in class Date
        Parameters:
        hours - the hour value.
        See Also:
        Calendar, Time
      • setMinutes

        public void setMinutes​(int minutes)
        Deprecated.
        As of JDK version 1.1, replaced by Calendar.set(Calendar.MINUTE, int minutes).
        Sets the minutes of this SqlTime object to the specified value.
        Overrides:
        setMinutes in class Date
        Parameters:
        minutes - the value of the minutes.
        See Also:
        Calendar, Time
      • setSeconds

        public void setSeconds​(int seconds)
        Deprecated.
        As of JDK version 1.1, replaced by Calendar.set(Calendar.SECOND, int seconds).
        Sets the seconds of this SqlTime to the specified value.
        Overrides:
        setSeconds in class Date
        Parameters:
        seconds - the seconds value.
        See Also:
        Calendar, Time
      • 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 SqlTime 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:
        Time
      • 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