au.gov.nehta.vendorlibrary.mdm.datatypes
Class XAD.Builder

java.lang.Object
  extended by au.gov.nehta.vendorlibrary.mdm.datatypes.XAD.Builder
Enclosing class:
XAD

public static final class XAD.Builder
extends java.lang.Object

XAD.Builder Build class used to construct and validate an XAD object.


Constructor Summary
XAD.Builder()
          Default constructor.
 
Method Summary
 XAD build()
          Build XAD and validate necessary fields.
 XAD.Builder city(java.lang.String value)
          Set the street address city.
 XAD.Builder country(java.lang.String value)
          Set the street address country.
 XAD.Builder firstLine(java.lang.String value)
          Set the first line of the street address.
 XAD.Builder postCode(int value)
          Set the street address post code.
 XAD.Builder secondLine(java.lang.String value)
          Set the second line of the street address.
 XAD.Builder state(java.lang.String value)
          Set the street address state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XAD.Builder

public XAD.Builder()
Default constructor.

Method Detail

firstLine

public XAD.Builder firstLine(java.lang.String value)
Set the first line of the street address.

Parameters:
value - First line (not null).
Returns:
XAD.Builder

secondLine

public XAD.Builder secondLine(java.lang.String value)
Set the second line of the street address.

Parameters:
value - Second line (not null).
Returns:
XAD.Builder

city

public XAD.Builder city(java.lang.String value)
Set the street address city.

Parameters:
value - City (not null).
Returns:
XAD.Builder

state

public XAD.Builder state(java.lang.String value)
Set the street address state.

Parameters:
value - State (not null).
Returns:
XAD.Builder

postCode

public XAD.Builder postCode(int value)
Set the street address post code.

Parameters:
value - Post code (not null).
Returns:
XAD.Builder

country

public XAD.Builder country(java.lang.String value)
Set the street address country.

Parameters:
value - Country (not null).
Returns:
XAD.Builder

build

public XAD build()
          throws MDMValidationException
Build XAD and validate necessary fields.

Returns:
XAD
Throws:
MDMValidationException - Thrown when validation fails.