org.kuali.rice.kew.api.note
Class Note.Builder

java.lang.Object
  extended by org.kuali.rice.kew.api.note.Note.Builder
All Implemented Interfaces:
Serializable, Identifiable, Versioned, ModelBuilder, NoteContract
Enclosing class:
Note

public static final class Note.Builder
extends Object
implements Serializable, ModelBuilder, NoteContract

A builder which can be used to construct Note instances. Enforces the constraints of the NoteContract.

See Also:
Serialized Form

Method Summary
 Note build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static Note.Builder create(NoteContract contract)
           
static Note.Builder create(String documentId, String authorPrincipalId)
           
 String getAuthorPrincipalId()
           
 org.joda.time.DateTime getCreateDate()
           
 String getDocumentId()
           
 String getId()
          The unique identifier for an object.
 String getText()
           
 Long getVersionNumber()
          Returns the version number for this object.
 void setAuthorPrincipalId(String authorPrincipalId)
           
 void setCreateDate(org.joda.time.DateTime createDate)
           
 void setDocumentId(String documentId)
           
 void setId(String id)
           
 void setText(String text)
           
 void setVersionNumber(Long versionNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Note.Builder create(String documentId,
                                  String authorPrincipalId)

create

public static Note.Builder create(NoteContract contract)

build

public Note 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

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

getDocumentId

public String getDocumentId()
Specified by:
getDocumentId in interface NoteContract

getAuthorPrincipalId

public String getAuthorPrincipalId()
Specified by:
getAuthorPrincipalId in interface NoteContract

getCreateDate

public org.joda.time.DateTime getCreateDate()
Specified by:
getCreateDate in interface NoteContract

getText

public String getText()
Specified by:
getText in interface NoteContract

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

setId

public void setId(String id)

setDocumentId

public void setDocumentId(String documentId)

setAuthorPrincipalId

public void setAuthorPrincipalId(String authorPrincipalId)

setCreateDate

public void setCreateDate(org.joda.time.DateTime createDate)

setText

public void setText(String text)

setVersionNumber

public void setVersionNumber(Long versionNumber)


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