edu.vt.middleware.ed
Class PersonName

java.lang.Object
  extended by edu.vt.middleware.ed.AbstractDataObject
      extended by edu.vt.middleware.ed.AbstractMutableDataObject
          extended by edu.vt.middleware.ed.PersonName
All Implemented Interfaces:
CarbonCopy<PersonName>, Congruence<PersonName>, DataObject, ManagedSetElement<PersonNameType>, MutableDataObject, Persistable, Serializable, Comparable<DataObject>

public class PersonName
extends AbstractMutableDataObject
implements Serializable, CarbonCopy<PersonName>, Congruence<PersonName>, ManagedSetElement<PersonNameType>

Contains attributes that identify a person's name.

Version:
$Revision: 7963 $
Author:
Daniel Fisher
See Also:
Serialized Form

Field Summary
private  Boolean active
          whether this name is active
private static String ALUMNI_NAME_SOURCE
          source for alumni names
static String FIND_BY_FIRST_NAME
          constant for named query
static String FIND_BY_FIRST_NAME_AND_LAST_NAME
          constant for named query
static String FIND_BY_LAST_NAME
          constant for named query
static String FIND_BY_PERSON_UID
          constant for named query
private  String firstName
          first name
private  String lastName
          last name
private  Boolean legal
          whether this is the person's legal name
private  String middleName
          middle name
private  Person person
          person associated with name
private  Boolean preferred
          whether this is the person's preferred name
private  String prefix
          name prefix
private static long serialVersionUID
          serial version UID
private  String source
          source of this name
private  String suffix
          name suffix
 
Fields inherited from class edu.vt.middleware.ed.AbstractMutableDataObject
modificationDate, modifiedBy
 
Fields inherited from class edu.vt.middleware.ed.AbstractDataObject
createdBy, creationDate, uid
 
Constructor Summary
PersonName()
           
 
Method Summary
 void copyValues(PersonName dataObject)
          Copies the non-relationship values from the supplied object into this object.
 String getFirstName()
          This returns the first name.
 String getLastName()
          This returns the last name.
 PersonNameType getManagedElementKey()
          This returns the key for this managed element.
 String getMiddleName()
          This returns the middle name.
 Person getPerson()
          This returns the person associated with this name.
 PersonNameType getPersonNameType()
          This returns the person name type.
 String getPrefix()
          This returns the name prefix.
protected  String getSource()
          This returns the name source.
 String getSuffix()
          This returns the name suffix.
 Long getUid()
          This returns the uid.
protected  Boolean isActive()
          This returns whether this name is active.
 boolean isCongruent(PersonName other)
          Determines whether the given object is congruent/equivalent to this object via equals comparison on properties.
 Boolean isLegal()
          This returns whether this is the person's legal name.
protected  Boolean isPreferred()
          This returns whether this is the person's preferred name.
protected  void setActive(Boolean b)
          This sets whether this name is active.
 void setFirstName(String s)
          This sets the first name.
 void setLastName(String s)
          This sets the last name.
 void setLegal(Boolean b)
          This sets whether this is the person's legal name.
 void setMiddleName(String s)
          This sets the middle name.
 void setPerson(Person p)
          This sets the person associated with this name.
 void setPersonNameType(PersonNameType type)
          This sets the person name type.
protected  void setPreferred(Boolean b)
          This sets whether this is the person's preferred name.
 void setPrefix(String s)
          This sets the name prefix.
protected  void setSource(String s)
          This sets the name source.
 void setSuffix(String s)
          This sets the name suffix.
 String toString()
          This returns a string representation of this name.
static Set<String> toStrings(Set<PersonName> names)
          Converts a set of PersonNames to a set of name strings.
 
Methods inherited from class edu.vt.middleware.ed.AbstractMutableDataObject
getModificationDate, getModifiedBy, setModificationDate, setModifiedBy
 
Methods inherited from class edu.vt.middleware.ed.AbstractDataObject
compareTo, getCreatedBy, getCreationDate, setCreatedBy, setCreationDate, setUid, validateProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.vt.middleware.ed.DataObject
getCreatedBy, getCreationDate, setCreatedBy, setCreationDate, setUid
 

Field Detail

FIND_BY_PERSON_UID

public static final String FIND_BY_PERSON_UID
constant for named query

See Also:
Constant Field Values

FIND_BY_FIRST_NAME

public static final String FIND_BY_FIRST_NAME
constant for named query

See Also:
Constant Field Values

FIND_BY_LAST_NAME

public static final String FIND_BY_LAST_NAME
constant for named query

See Also:
Constant Field Values

FIND_BY_FIRST_NAME_AND_LAST_NAME

public static final String FIND_BY_FIRST_NAME_AND_LAST_NAME
constant for named query

See Also:
Constant Field Values

ALUMNI_NAME_SOURCE

private static final String ALUMNI_NAME_SOURCE
source for alumni names

See Also:
Constant Field Values

serialVersionUID

private static final long serialVersionUID
serial version UID

See Also:
Constant Field Values

prefix

private String prefix
name prefix


firstName

private String firstName
first name


middleName

private String middleName
middle name


lastName

private String lastName
last name


suffix

private String suffix
name suffix


preferred

private Boolean preferred
whether this is the person's preferred name


active

private Boolean active
whether this name is active


legal

private Boolean legal
whether this is the person's legal name


source

private String source
source of this name


person

private Person person
person associated with name

Constructor Detail

PersonName

public PersonName()
Method Detail

getUid

public Long getUid()
This returns the uid.

Specified by:
getUid in interface DataObject
Overrides:
getUid in class AbstractDataObject
Returns:
Long - uid

getPersonNameType

public PersonNameType getPersonNameType()
This returns the person name type.

Returns:
PersonNameType

setPersonNameType

public void setPersonNameType(PersonNameType type)
This sets the person name type.

Parameters:
type - PersonNameType

getPrefix

public String getPrefix()
This returns the name prefix.

Returns:
String

setPrefix

public void setPrefix(String s)
This sets the name prefix.

Parameters:
s - String

getFirstName

public String getFirstName()
This returns the first name.

Returns:
String

setFirstName

public void setFirstName(String s)
This sets the first name.

Parameters:
s - String

getMiddleName

public String getMiddleName()
This returns the middle name.

Returns:
String

setMiddleName

public void setMiddleName(String s)
This sets the middle name.

Parameters:
s - String

getLastName

public String getLastName()
This returns the last name.

Returns:
String

setLastName

public void setLastName(String s)
This sets the last name.

Parameters:
s - String

getSuffix

public String getSuffix()
This returns the name suffix.

Returns:
String

setSuffix

public void setSuffix(String s)
This sets the name suffix.

Parameters:
s - String

isPreferred

protected Boolean isPreferred()
This returns whether this is the person's preferred name.

Returns:
Boolean

setPreferred

protected void setPreferred(Boolean b)
This sets whether this is the person's preferred name.

Parameters:
b - Boolean

isActive

protected Boolean isActive()
This returns whether this name is active.

Returns:
Boolean

setActive

protected void setActive(Boolean b)
This sets whether this name is active.

Parameters:
b - Boolean

isLegal

public Boolean isLegal()
This returns whether this is the person's legal name.

Returns:
Boolean

setLegal

public void setLegal(Boolean b)
This sets whether this is the person's legal name.

Parameters:
b - Boolean

getSource

protected String getSource()
This returns the name source.

Returns:
String

setSource

protected void setSource(String s)
This sets the name source.

Parameters:
s - String

getPerson

public Person getPerson()
This returns the person associated with this name.

Returns:
Person with this name

setPerson

public void setPerson(Person p)
This sets the person associated with this name.

Parameters:
p - Person with this name

copyValues

public void copyValues(PersonName dataObject)
Copies the non-relationship values from the supplied object into this object.

Specified by:
copyValues in interface CarbonCopy<PersonName>
Parameters:
dataObject - Source to copy from.

isCongruent

public boolean isCongruent(PersonName other)
Determines whether the given object is congruent/equivalent to this object via equals comparison on properties.

Specified by:
isCongruent in interface Congruence<PersonName>
Parameters:
other - The object to compare to this instance.
Returns:
True if the given object is congruent to this instance, false otherwise.

toString

public String toString()
This returns a string representation of this name.

Overrides:
toString in class AbstractDataObject
Returns:
String

toStrings

public static Set<String> toStrings(Set<PersonName> names)
Converts a set of PersonNames to a set of name strings. Calls toString() on every object in the set.

Parameters:
names - Set
Returns:
Set

getManagedElementKey

public PersonNameType getManagedElementKey()
This returns the key for this managed element.

Specified by:
getManagedElementKey in interface ManagedSetElement<PersonNameType>
Returns:
K - key


Copyright © 2008 Virginia Tech. All Rights Reserved.