|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.uhn.hl7v2.model.AbstractType
ca.uhn.hl7v2.model.AbstractPrimitive
ca.uhn.hl7v2.model.primitive.DT
public abstract class DT
Represents an HL7 DT (date) datatype.
Constructor Summary | |
---|---|
DT(Message theMessage)
|
Method Summary | |
---|---|
int |
getDay()
Returns the day as an integer. |
int |
getMonth()
Returns the month as an integer. |
java.lang.String |
getValue()
Returns a String representation of the value of this field. |
int |
getYear()
Returns the year as an integer. |
void |
setValue(java.lang.String theValue)
Sets the value of this Primitive, first performing validation as specified by getMessage().getValidationContext() . |
void |
setYearMonthDayPrecision(int yr,
int mnth,
int dy)
|
void |
setYearMonthPrecision(int yr,
int mnth)
|
void |
setYearPrecision(int yr)
|
Methods inherited from class ca.uhn.hl7v2.model.AbstractPrimitive |
---|
clear, encode, parse, toString |
Methods inherited from class ca.uhn.hl7v2.model.AbstractType |
---|
getExtraComponents, getMessage, getName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ca.uhn.hl7v2.model.Type |
---|
getExtraComponents, getMessage, getName |
Constructor Detail |
---|
public DT(Message theMessage)
theMessage
- message to which this Type belongsMethod Detail |
---|
public void setValue(java.lang.String theValue) throws DataTypeException
AbstractPrimitive
getMessage().getValidationContext()
. No validation is performed
if getMessage() returns null.
setValue
in interface Primitive
setValue
in class AbstractPrimitive
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.AbstractPrimitive.setValue(java.lang.String)
public java.lang.String getValue()
Primitive
getValue
in interface Primitive
getValue
in class AbstractPrimitive
AbstractPrimitive.getValue()
public void setYearPrecision(int yr) throws DataTypeException
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.CommonDT.setYearPrecision(int)
public void setYearMonthPrecision(int yr, int mnth) throws DataTypeException
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.CommonDT.setYearMonthPrecision(int, int)
public void setYearMonthDayPrecision(int yr, int mnth, int dy) throws DataTypeException
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.CommonDT.setYearMonthDayPrecision(int, int, int)
public int getYear() throws DataTypeException
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.public int getMonth() throws DataTypeException
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.public int getDay() throws DataTypeException
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |