Package ca.uhn.hl7v2.model.primitive
Class TM
java.lang.Object
ca.uhn.hl7v2.model.AbstractType
ca.uhn.hl7v2.model.AbstractPrimitive
ca.uhn.hl7v2.model.primitive.TM
- All Implemented Interfaces:
Primitive,Type,Visitable,Serializable
Represents an HL7 TM (time) datatype.
- Version:
- $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:51 $ by $Author: jamesagnew $
- Author:
- Neal Acharya, Bryan Tripp
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the fractional second value as a float.intReturns the GMT offset value as an integer.intgetHour()Returns the hour as an integer.intReturns the minute as an integer.intReturns the second as an integer.getValue()Returns a String representation of the value of this field.voidsetHourMinSecondPrecision(int hr, int min, float sec) voidsetHourMinutePrecision(int hr, int min) voidsetHourPrecision(int hr) voidsetOffset(int signedOffset) voidSets the value of this Primitive, first performing validation as specified bygetMessage().getValidationContext().Methods inherited from class ca.uhn.hl7v2.model.AbstractPrimitive
accept, clear, encode, isEmpty, parse, toStringMethods inherited from class ca.uhn.hl7v2.model.AbstractType
getExtraComponents, getMessage, getName, provideLocationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ca.uhn.hl7v2.model.Type
getExtraComponents, getMessage, getNameMethods inherited from interface ca.uhn.hl7v2.model.Visitable
provideLocation
-
Constructor Details
-
TM
- Parameters:
theMessage- message to which this Type belongs
-
-
Method Details
-
setValue
Description copied from class:AbstractPrimitiveSets the value of this Primitive, first performing validation as specified bygetMessage().getValidationContext(). No validation is performed if getMessage() returns null.Note: as of the next HAPI release, the ValidationContext will be retrieved from getParser().getValidationContext(), which ultimately is the ValidationContext of the active HapiContext.
- Specified by:
setValuein interfacePrimitive- Overrides:
setValuein classAbstractPrimitive- Parameters:
theValue- the value to be set- Throws:
DataTypeException- if the value is incorrectly formatted and either validation is enabled for this primitive or detail setters / getters have been called, forcing further parsing.- See Also:
-
getValue
Description copied from interface:PrimitiveReturns a String representation of the value of this field.- Specified by:
getValuein interfacePrimitive- Overrides:
getValuein classAbstractPrimitive- Returns:
- a String representation of the value of this field
- See Also:
-
setHourPrecision
- Throws:
DataTypeException- if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.- See Also:
-
setHourMinutePrecision
- Throws:
DataTypeException- if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.- See Also:
-
setHourMinSecondPrecision
- Throws:
DataTypeException- if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.- See Also:
-
setOffset
- Throws:
DataTypeException- if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.- See Also:
-
getHour
Returns the hour as an integer.- Throws:
DataTypeException- if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.
-
getMinute
Returns the minute as an integer.- Throws:
DataTypeException- if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.
-
getSecond
Returns the second as an integer.- Throws:
DataTypeException- if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.
-
getFractSecond
Returns the fractional second value as a float.- Throws:
DataTypeException- if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.
-
getGMTOffset
Returns the GMT offset value as an integer.- Throws:
DataTypeException- if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.
-