org.kuali.rice.kim.api.identity.entity
Class Entity.Builder

java.lang.Object
  extended by org.kuali.rice.kim.api.identity.entity.Entity.Builder
All Implemented Interfaces:
Serializable, Inactivatable, GloballyUnique, Identifiable, Versioned, ModelBuilder, EntityContract
Enclosing class:
Entity

public static final class Entity.Builder
extends Object
implements Serializable, ModelBuilder, EntityContract

A builder which can be used to construct Entity instances. Enforces the constraints of the EntityContract.

See Also:
Serialized Form

Method Summary
 Entity build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static Entity.Builder create()
           
static Entity.Builder create(EntityContract contract)
           
 List<EntityAffiliation.Builder> getAffiliations()
          Gets this EntityContract's affiliations
 EntityBioDemographics.Builder getBioDemographics()
          Gets this EntityContract's demographic information
 List<EntityCitizenship.Builder> getCitizenships()
          Gets this EntityContract's citizenship information
 EntityAffiliation.Builder getDefaultAffiliation()
          Gets this EntityContract's default affiliation
 EntityName.Builder getDefaultName()
          Gets this EntityContract's default name
 List<EntityEmployment.Builder> getEmploymentInformation()
          Gets this EntityContract's employment information List
 EntityExternalIdentifier.Builder getEntityExternalIdentifier(String externalIdentifierTypeCode)
          Gets this EntityContract's external identifier for the given type code
 EntityTypeContactInfo.Builder getEntityTypeContactInfoByTypeCode(String entityTypeCode)
          Gets this EntityContract's identity type for the given type code
 List<EntityTypeContactInfo.Builder> getEntityTypeContactInfos()
          Gets this EntityContract's identity types
 List<EntityEthnicity.Builder> getEthnicities()
          Gets this EntityContract's ethnicities
 List<EntityExternalIdentifier.Builder> getExternalIdentifiers()
          Gets this EntityContract's external identifiers
 String getId()
          The unique identifier for an object.
 List<EntityName.Builder> getNames()
          Gets this EntityContract's names
 String getObjectId()
          Return the globally unique object id of this object.
 EntityEmployment.Builder getPrimaryEmployment()
          Gets this EntityContract's employment information
 List<Principal.Builder> getPrincipals()
          Gets this EntityContract's principals
 EntityPrivacyPreferences.Builder getPrivacyPreferences()
          Gets this EntityContract's privacy preferences
 List<EntityResidency.Builder> getResidencies()
          Gets this EntityContract's residencies
 Long getVersionNumber()
          Returns the version number for this object.
 List<EntityVisa.Builder> getVisas()
          Gets this EntityContract's visas
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean active)
           
 void setAffiliations(List<EntityAffiliation.Builder> affiliations)
           
 void setBioDemographics(EntityBioDemographics.Builder bioDemographics)
           
 void setCitizenships(List<EntityCitizenship.Builder> citizenships)
           
 void setEmploymentInformation(List<EntityEmployment.Builder> employmentInformation)
           
 void setEntityTypes(List<EntityTypeContactInfo.Builder> entityTypeContactInfos)
           
 void setEthnicities(List<EntityEthnicity.Builder> ethnicities)
           
 void setExternalIdentifiers(List<EntityExternalIdentifier.Builder> externalIdentifiers)
           
 void setId(String id)
           
 void setNames(List<EntityName.Builder> names)
           
 void setObjectId(String objectId)
           
 void setPrincipals(List<Principal.Builder> principals)
           
 void setPrivacyPreferences(EntityPrivacyPreferences.Builder privacyPreferences)
           
 void setResidencies(List<EntityResidency.Builder> residencies)
           
 void setVersionNumber(Long versionNumber)
           
 void setVisas(List<EntityVisa.Builder> visas)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Entity.Builder create()

create

public static Entity.Builder create(EntityContract contract)

build

public Entity build()
Description copied from interface: ModelBuilder
Returns an instance of the object being built by this builder based on the current state of the builder. It should be possible to invoke this method more than once on the same builder. It should never return null;

Specified by:
build in interface ModelBuilder
Returns:
an instance of the object being built by this builder, should never return null

getPrincipals

public List<Principal.Builder> getPrincipals()
Description copied from interface: EntityContract
Gets this EntityContract's principals

Specified by:
getPrincipals in interface EntityContract
Returns:
the List of PrincipalContracts for this EntityContract. The returned List will never be null, an empty List will be assigned and returned if needed.

getEntityTypeContactInfos

public List<EntityTypeContactInfo.Builder> getEntityTypeContactInfos()
Description copied from interface: EntityContract
Gets this EntityContract's identity types

Specified by:
getEntityTypeContactInfos in interface EntityContract
Returns:
the List of EntityTypeContactInfoContractS for this EntityContract. The returned List will never be null, an empty List will be assigned and returned if needed.

getExternalIdentifiers

public List<EntityExternalIdentifier.Builder> getExternalIdentifiers()
Description copied from interface: EntityContract
Gets this EntityContract's external identifiers

Specified by:
getExternalIdentifiers in interface EntityContract
Returns:
the List of EntityExternalIdentifierContractS for this EntityContract. The returned List will never be null, an empty List will be assigned and returned if needed.

getAffiliations

public List<EntityAffiliation.Builder> getAffiliations()
Description copied from interface: EntityContract
Gets this EntityContract's affiliations

Specified by:
getAffiliations in interface EntityContract
Returns:
the List of EntityAffiliationContractS for this EntityContract. The returned List will never be null, an empty List will be assigned and returned if needed.

getNames

public List<EntityName.Builder> getNames()
Description copied from interface: EntityContract
Gets this EntityContract's names

Specified by:
getNames in interface EntityContract
Returns:
the List of EntityNameContractS for this EntityContract. The returned List will never be null, an empty List will be assigned and returned if needed.

getEmploymentInformation

public List<EntityEmployment.Builder> getEmploymentInformation()
Description copied from interface: EntityContract
Gets this EntityContract's employment information List

Specified by:
getEmploymentInformation in interface EntityContract
Returns:
the List of EntityEmploymentContractS for this EntityContract. The returned List will never be null, an empty List will be assigned and returned if needed.

getPrivacyPreferences

public EntityPrivacyPreferences.Builder getPrivacyPreferences()
Description copied from interface: EntityContract
Gets this EntityContract's privacy preferences

Specified by:
getPrivacyPreferences in interface EntityContract
Returns:
the EntityPrivacyPreferences for this EntityContract, or null if none has been assigned.

getBioDemographics

public EntityBioDemographics.Builder getBioDemographics()
Description copied from interface: EntityContract
Gets this EntityContract's demographic information

Specified by:
getBioDemographics in interface EntityContract
Returns:
the EntityBioDemographicsContract for this EntityContract, or null if none has been assigned.

getCitizenships

public List<EntityCitizenship.Builder> getCitizenships()
Description copied from interface: EntityContract
Gets this EntityContract's citizenship information

Specified by:
getCitizenships in interface EntityContract
Returns:
the List of EntityCitizenshipContracts for this EntityContract. The returned List will never be null, an empty List will be assigned and returned if needed.

getEntityTypeContactInfoByTypeCode

public EntityTypeContactInfo.Builder getEntityTypeContactInfoByTypeCode(String entityTypeCode)
Description copied from interface: EntityContract
Gets this EntityContract's identity type for the given type code

Specified by:
getEntityTypeContactInfoByTypeCode in interface EntityContract
Parameters:
entityTypeCode - the type code
Returns:
the EntityEntityType object corresponding to the given code or null if this identity does not have data for that type.

getPrimaryEmployment

public EntityEmployment.Builder getPrimaryEmployment()
Description copied from interface: EntityContract
Gets this EntityContract's employment information

Specified by:
getPrimaryEmployment in interface EntityContract
Returns:
the primary EntityEmploymentContract for this EntityContract, or null if none has been assigned.

getDefaultAffiliation

public EntityAffiliation.Builder getDefaultAffiliation()
Description copied from interface: EntityContract
Gets this EntityContract's default affiliation

Specified by:
getDefaultAffiliation in interface EntityContract
Returns:
the default EntityAffiliationContract for the identity. If no default is defined, then it returns the first one found. If none are defined, it returns null.

getEntityExternalIdentifier

public EntityExternalIdentifier.Builder getEntityExternalIdentifier(String externalIdentifierTypeCode)
Description copied from interface: EntityContract
Gets this EntityContract's external identifier for the given type code

Specified by:
getEntityExternalIdentifier in interface EntityContract
Parameters:
externalIdentifierTypeCode - the type code
Returns:
the EntityExternalIdentifierContract for this EntityContract, or null if none has been assigned.

getDefaultName

public EntityName.Builder getDefaultName()
Description copied from interface: EntityContract
Gets this EntityContract's default name

Specified by:
getDefaultName in interface EntityContract
Returns:
the default EntityNameContract record for the identity. If no default is defined, then it returns the first one found. If none are defined, it returns null.

getEthnicities

public List<EntityEthnicity.Builder> getEthnicities()
Description copied from interface: EntityContract
Gets this EntityContract's ethnicities

Specified by:
getEthnicities in interface EntityContract
Returns:
the List of EntityEthnicityContractS for this EntityContract. The returned List will never be null, an empty List will be assigned and returned if needed.

getResidencies

public List<EntityResidency.Builder> getResidencies()
Description copied from interface: EntityContract
Gets this EntityContract's residencies

Specified by:
getResidencies in interface EntityContract
Returns:
the List of EntityResidencyContractS for this EntityContract. The returned List will never be null, an empty List will be assigned and returned if needed.

getVisas

public List<EntityVisa.Builder> getVisas()
Description copied from interface: EntityContract
Gets this EntityContract's visas

Specified by:
getVisas in interface EntityContract
Returns:
the List of EntityVisaContractS for this EntityContract. The returned List will never be null, an empty List will be assigned and returned if needed.

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

getObjectId

public String getObjectId()
Description copied from interface: GloballyUnique
Return the globally unique object id of this object. In general, this value should only be null if the object has not yet been stored to a persistent data store.

Specified by:
getObjectId in interface GloballyUnique
Returns:
the objectId of this object, or null if it has not been set yet

isActive

public boolean isActive()
Description copied from interface: Inactivatable
The active indicator for an object.

Specified by:
isActive in interface Inactivatable
Returns:
true if active false if not.

getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

setPrincipals

public void setPrincipals(List<Principal.Builder> principals)

setEntityTypes

public void setEntityTypes(List<EntityTypeContactInfo.Builder> entityTypeContactInfos)

setExternalIdentifiers

public void setExternalIdentifiers(List<EntityExternalIdentifier.Builder> externalIdentifiers)

setAffiliations

public void setAffiliations(List<EntityAffiliation.Builder> affiliations)

setNames

public void setNames(List<EntityName.Builder> names)

setEmploymentInformation

public void setEmploymentInformation(List<EntityEmployment.Builder> employmentInformation)

setPrivacyPreferences

public void setPrivacyPreferences(EntityPrivacyPreferences.Builder privacyPreferences)

setBioDemographics

public void setBioDemographics(EntityBioDemographics.Builder bioDemographics)

setCitizenships

public void setCitizenships(List<EntityCitizenship.Builder> citizenships)

setEthnicities

public void setEthnicities(List<EntityEthnicity.Builder> ethnicities)

setResidencies

public void setResidencies(List<EntityResidency.Builder> residencies)

setVisas

public void setVisas(List<EntityVisa.Builder> visas)

setVersionNumber

public void setVersionNumber(Long versionNumber)

setObjectId

public void setObjectId(String objectId)

setActive

public void setActive(boolean active)

setId

public void setId(String id)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.