biz.janux.people
Enum PersonFacet

java.lang.Object
  extended by java.lang.Enum<PersonFacet>
      extended by biz.janux.people.PersonFacet
All Implemented Interfaces:
Serializable, Comparable<PersonFacet>

public enum PersonFacet
extends Enum<PersonFacet>

Enumeration that defines the possible relations to a Person. Using a set of facets we can specify which relations to load when retrieving a Person instance from database.

Author:
Daniel Mora

Enum Constant Summary
EMAIL_ADDRESSES
           
PHONE_NUMBERS
           
POSTAL_ADDRESSES
           
URLS
           
 
Method Summary
static PersonFacet valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PersonFacet[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

URLS

public static final PersonFacet URLS

PHONE_NUMBERS

public static final PersonFacet PHONE_NUMBERS

POSTAL_ADDRESSES

public static final PersonFacet POSTAL_ADDRESSES

EMAIL_ADDRESSES

public static final PersonFacet EMAIL_ADDRESSES
Method Detail

values

public static PersonFacet[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PersonFacet c : PersonFacet.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PersonFacet valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2005-2013 Janux. All Rights Reserved.