org.kuali.rice.kew.api.document
Class DocumentLink.Builder

java.lang.Object
  extended by org.kuali.rice.kew.api.document.DocumentLink.Builder
All Implemented Interfaces:
Serializable, Identifiable, ModelBuilder, DocumentLinkContract
Enclosing class:
DocumentLink

public static final class DocumentLink.Builder
extends Object
implements Serializable, ModelBuilder, DocumentLinkContract

A builder which can be used to construct DocumentLink instances. Enforces the constraints of the DocumentLinkContract.

See Also:
Serialized Form

Field Summary
private  String destinationDocumentId
           
private  String id
           
private  String originatingDocumentId
           
private static long serialVersionUID
           
 
Constructor Summary
private DocumentLink.Builder(String originatingDocumentId, String destinationDocumentId)
           
 
Method Summary
 DocumentLink build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static DocumentLink.Builder create(DocumentLinkContract contract)
           
static DocumentLink.Builder create(String originatingDocumentId, String destinationDocumentId)
           
 String getDestinationDocumentId()
           
 String getId()
          The unique identifier for an object.
 String getOriginatingDocumentId()
           
 void setDestinationDocumentId(String destinationDocumentId)
           
 void setId(String id)
           
 void setOriginatingDocumentId(String originatingDocumentId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

id

private String id

originatingDocumentId

private String originatingDocumentId

destinationDocumentId

private String destinationDocumentId
Constructor Detail

DocumentLink.Builder

private DocumentLink.Builder(String originatingDocumentId,
                             String destinationDocumentId)
Method Detail

create

public static DocumentLink.Builder create(String originatingDocumentId,
                                          String destinationDocumentId)

create

public static DocumentLink.Builder create(DocumentLinkContract contract)

build

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

getOriginatingDocumentId

public String getOriginatingDocumentId()
Specified by:
getOriginatingDocumentId in interface DocumentLinkContract

getDestinationDocumentId

public String getDestinationDocumentId()
Specified by:
getDestinationDocumentId in interface DocumentLinkContract

setId

public void setId(String id)

setOriginatingDocumentId

public void setOriginatingDocumentId(String originatingDocumentId)

setDestinationDocumentId

public void setDestinationDocumentId(String destinationDocumentId)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.