Package lumis.portal.bigdata
Class DocumentTypeBuilder<T extends DocumentType>
- java.lang.Object
-
- lumis.portal.bigdata.DocumentTypeBuilder<T>
-
- Type Parameters:
T
- theDocumentType
type.
- All Implemented Interfaces:
IDocumentTypeBuilder<T>
public class DocumentTypeBuilder<T extends DocumentType> extends Object implements IDocumentTypeBuilder<T>
DocumentType
builder.- Since:
- 8.1.0
- Version:
- $Revision: 17593 $ $Date: 2015-07-17 11:21:36 -0300 (Fri, 17 Jul 2015) $
-
-
Constructor Summary
Constructors Constructor Description DocumentTypeBuilder(T documentType)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IDocumentTypeBuilder<T>
addField(DocumentTypeField field)
Adds the given field in the document type.T
build()
Returns an immutableDocumentType
.Map<String,DocumentTypeField>
getFields()
Returns an unmodifiable map of fields in this builder.String
getId()
Returns the identifier of the document type this builder would build.IDocumentTypeBuilder<T>
removeField(String fieldId)
Removes the given field from the document type.
-
-
-
Constructor Detail
-
DocumentTypeBuilder
public DocumentTypeBuilder(T documentType)
Creates a new instance.- Parameters:
documentType
- the document type to be built.- Since:
- 8.1.0
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:IDocumentTypeBuilder
Returns the identifier of the document type this builder would build.- Specified by:
getId
in interfaceIDocumentTypeBuilder<T extends DocumentType>
- Returns:
- the document type identifier.
-
getFields
public Map<String,DocumentTypeField> getFields()
Description copied from interface:IDocumentTypeBuilder
Returns an unmodifiable map of fields in this builder.- Specified by:
getFields
in interfaceIDocumentTypeBuilder<T extends DocumentType>
- Returns:
- an unmodifiable map of fields, using the field identifier as the key.
-
addField
public IDocumentTypeBuilder<T> addField(DocumentTypeField field)
Description copied from interface:IDocumentTypeBuilder
Adds the given field in the document type.- Specified by:
addField
in interfaceIDocumentTypeBuilder<T extends DocumentType>
- Parameters:
field
- the field in the document type.- Returns:
- this builder.
-
removeField
public IDocumentTypeBuilder<T> removeField(String fieldId)
Description copied from interface:IDocumentTypeBuilder
Removes the given field from the document type.- Specified by:
removeField
in interfaceIDocumentTypeBuilder<T extends DocumentType>
- Parameters:
fieldId
- the field identifier.- Returns:
- this builder.
-
build
public T build()
Description copied from interface:IDocumentTypeBuilder
Returns an immutableDocumentType
.- Specified by:
build
in interfaceIDocumentTypeBuilder<T extends DocumentType>
- Returns:
- an immutable
DocumentType
.
-
-