mls.domain
Class Property

java.lang.Object
  |
  +--mls.domain.Property

public class Property
extends java.lang.Object

A piece of real property (e.g. house or land)


Field Summary
 Address address
           
 int age
           
static java.lang.String ANY
          Used where any value will do
 double bathrooms
           
 int bedrooms
           
 java.lang.String dimensions
           
 java.lang.String id
           
 Lot lot
           
static int NO_PRICE_LIMIT
          A rough approximation to an infinite price
private static int NOT_SET
           
 int price
           
 java.lang.String style
           
 java.lang.String type
           
private static int uniqueID
           
static java.lang.String UNKNOWN
          An unknown type or style
private static java.lang.String VALID_STYLES
           
private static java.lang.String VALID_TYPES
           
 
Constructor Summary
Property()
          Default constructor
 
Method Summary
static Property getTest()
          Get a 'filled-in' property for testing, including nested address and lot objects
private static java.lang.String nextID()
          Test method to return unique MLS ID
static boolean validStyle(java.lang.String style)
          Return true if this is a valid property style
static boolean validType(java.lang.String type)
          Return true if this is a valid property type
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

id

public java.lang.String id

type

public java.lang.String type

style

public java.lang.String style

price

public int price

bedrooms

public int bedrooms

bathrooms

public double bathrooms

age

public int age

dimensions

public java.lang.String dimensions

address

public Address address

lot

public Lot lot

ANY

public static final java.lang.String ANY
Used where any value will do

UNKNOWN

public static final java.lang.String UNKNOWN
An unknown type or style

NO_PRICE_LIMIT

public static final int NO_PRICE_LIMIT
A rough approximation to an infinite price

NOT_SET

private static final int NOT_SET

VALID_TYPES

private static final java.lang.String VALID_TYPES

VALID_STYLES

private static final java.lang.String VALID_STYLES

uniqueID

private static int uniqueID
Constructor Detail

Property

public Property()
Default constructor
Method Detail

validType

public static boolean validType(java.lang.String type)
Return true if this is a valid property type
Parameters:
type - the type to validate
Returns:
true if this is a valid type

validStyle

public static boolean validStyle(java.lang.String style)
Return true if this is a valid property style
Parameters:
style - the style to validate
Returns:
true if this is a valid style

nextID

private static java.lang.String nextID()
Test method to return unique MLS ID
Returns:
an integer ID beginning at 0 and incremented ad nauseum

getTest

public static Property getTest()
Get a 'filled-in' property for testing, including nested address and lot objects
Returns:
a property initialized with test data