public abstract class DT extends AbstractPrimitive
| Modifier and Type | Method and Description |
|---|---|
int |
getDay()
Returns the day as an integer.
|
int |
getMonth()
Returns the month as an integer.
|
String |
getValue()
Returns a String representation of the value of this field.
|
int |
getYear()
Returns the year as an integer.
|
void |
setValue(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) |
accept, clear, encode, isEmpty, parse, toStringgetExtraComponents, getMessage, getName, provideLocationclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetExtraComponents, getMessage, getNameprovideLocationpublic void setValue(String theValue) throws DataTypeException
AbstractPrimitivegetMessage().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.
setValue in interface PrimitivesetValue in class AbstractPrimitivetheValue - the value to be setDataTypeException - 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 String getValue()
PrimitivegetValue in interface PrimitivegetValue in class AbstractPrimitiveAbstractPrimitive.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.Copyright © 2001–2017 University Health Network. All rights reserved.