org.kuali.rice.krms.api.repository.language
Class NaturalLanguageTemplate.Builder

java.lang.Object
  extended by org.kuali.rice.krms.api.repository.language.NaturalLanguageTemplate.Builder
All Implemented Interfaces:
Serializable, Inactivatable, Identifiable, Versioned, ModelBuilder, NaturalLanguageTemplateContract
Enclosing class:
NaturalLanguageTemplate

public static final class NaturalLanguageTemplate.Builder
extends Object
implements Serializable, ModelBuilder, NaturalLanguageTemplateContract

A builder which can be used to construct NaturalLanguageTemplate instances. Enforces the constraints of the NaturalLanguageTemplateContract.

See Also:
Serialized Form

Method Summary
 NaturalLanguageTemplate build()
          Builds an instance of a NaturalLanguageTemplate based on the current state of the builder.
static NaturalLanguageTemplate.Builder create(NaturalLanguageTemplateContract contract)
           
static NaturalLanguageTemplate.Builder create(String languageCode, String naturalLanguageUsageId, String template, String typeId)
           
 Map<String,String> getAttributes()
          This method returns a list of custom/remote attributes associated with the agenda.
 String getId()
          The unique identifier for an object.
 String getLanguageCode()
          This is the Language Code of the NaturalLanguageTemplate
 String getNaturalLanguageUsageId()
          This is the NaturalLanguageUsageId of the NaturalLanguageTemplate
 String getTemplate()
          This is the Template of the NaturalLanguageTemplate
 String getTypeId()
          This is the TypeId of the NaturalLanguageTemplate
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean active)
          Sets the value of active on this builder to the given value.
 void setAttributes(Map<String,String> attributes)
          Sets the Map of attributes as name / value pairs.
 void setId(String id)
          Sets the value of id on this builder to the given value.
 void setLanguageCode(String languageCode)
          Sets the value of languageCode on this builder to the given value.
 void setNaturalLanguageUsageId(String naturalLanguageUsageId)
          Sets the value of naturalLanguageUsageId on this builder to the given value.
 void setTemplate(String template)
          Sets the value of template on this builder to the given value.
 void setTypeId(String typeId)
          Sets the value of typeId on this builder to the given value.
 void setVersionNumber(Long versionNumber)
          Sets the value of versionNumber on this builder to the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static NaturalLanguageTemplate.Builder create(String languageCode,
                                                     String naturalLanguageUsageId,
                                                     String template,
                                                     String typeId)

create

public static NaturalLanguageTemplate.Builder create(NaturalLanguageTemplateContract contract)

build

public NaturalLanguageTemplate build()
Builds an instance of a NaturalLanguageTemplate based on the current state of the builder.

Specified by:
build in interface ModelBuilder
Returns:
the fully-constructed NaturalLanguageTemplate.

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.

getAttributes

public Map<String,String> getAttributes()
Description copied from interface: NaturalLanguageTemplateContract
This method returns a list of custom/remote attributes associated with the agenda.

The attributes of the NaturalLanguageUsage

Specified by:
getAttributes in interface NaturalLanguageTemplateContract
Returns:
a list of custom/remote attribute of the agenda.

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

getLanguageCode

public String getLanguageCode()
Description copied from interface: NaturalLanguageTemplateContract
This is the Language Code of the NaturalLanguageTemplate

The Language Code of the NaturalLanguageTemplate

Specified by:
getLanguageCode in interface NaturalLanguageTemplateContract
Returns:
the Language Code of the NaturalLanguageTemplate

getNaturalLanguageUsageId

public String getNaturalLanguageUsageId()
Description copied from interface: NaturalLanguageTemplateContract
This is the NaturalLanguageUsageId of the NaturalLanguageTemplate

The NaturalLanguageUsageId of the NaturalLanguageTemplate

Specified by:
getNaturalLanguageUsageId in interface NaturalLanguageTemplateContract
Returns:
the NaturalLanguageUsageId of the NaturalLanguageTemplate

getTemplate

public String getTemplate()
Description copied from interface: NaturalLanguageTemplateContract
This is the Template of the NaturalLanguageTemplate

The Template of the NaturalLanguageTemplate

Specified by:
getTemplate in interface NaturalLanguageTemplateContract
Returns:
the Template of the NaturalLanguageTemplate

getTypeId

public String getTypeId()
Description copied from interface: NaturalLanguageTemplateContract
This is the TypeId of the NaturalLanguageTemplate

The TypeId of the NaturalLanguageTemplate

Specified by:
getTypeId in interface NaturalLanguageTemplateContract
Returns:
the TypeId of the NaturalLanguageTemplate

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

setActive

public void setActive(boolean active)
Sets the value of active on this builder to the given value.

Parameters:
active - the active value to set.

setAttributes

public void setAttributes(Map<String,String> attributes)
Sets the Map of attributes as name / value pairs.

Parameters:
attributes - a Map of name value String pairs representing the attributes.

setId

public void setId(String id)
Sets the value of id on this builder to the given value.

Parameters:
id - the id value to set., may be null, representing the Object has not been persisted, but must not be blank.
Throws:
IllegalArgumentException - if the id is blank

setLanguageCode

public void setLanguageCode(String languageCode)
Sets the value of languageCode on this builder to the given value.

Parameters:
languageCode - the languageCode value to set., must not be null or blank
Throws:
IllegalArgumentException - if the languageCode is null or blank

setNaturalLanguageUsageId

public void setNaturalLanguageUsageId(String naturalLanguageUsageId)
Sets the value of naturalLanguageUsageId on this builder to the given value.

Parameters:
naturalLanguageUsageId - the naturalLanguageUsageId value to set., must not be null or blank
Throws:
IllegalArgumentException - if the naturalLanguageUsageId is null or blank

setTemplate

public void setTemplate(String template)
Sets the value of template on this builder to the given value.

Parameters:
template - the template value to set., must not be null or blank
Throws:
IllegalArgumentException - if the template is null or blank

setTypeId

public void setTypeId(String typeId)
Sets the value of typeId on this builder to the given value.

Parameters:
typeId - the typeId value to set., must not be null or blank
Throws:
IllegalArgumentException - if the typeId is null or blank

setVersionNumber

public void setVersionNumber(Long versionNumber)
Sets the value of versionNumber on this builder to the given value.

Parameters:
versionNumber - the versionNumber value to set.


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