Class ListItemClassAttributeDTOBuilder
java.lang.Object
de.hybris.platform.integrationbackoffice.widgets.modeling.data.dto.ListItemClassAttributeDTOBuilder
Builds a
ListItemClassAttributeDTO-
Method Summary
Modifier and TypeMethodDescriptionbuild()validate the parameters and buildListItemClassAttributeDTO.Sets the value of the attribute name field for the list item to build.withAttributeReturnType(Class<?> returnType) Sets the value of the attribute or read method's return type field for the list item to build.withCustomUnique(boolean unique) Sets the value of the unique field for the list item to build.withReadMethod(String readMethod) Sets the values of the read method field for the list item to build.withSelected(boolean selected) Sets the value of the selected field for the list item to build.withStructureType(ListItemStructureType structureType) Sets the value of the structureType field for the list item to build.withTypeAlias(String typeAlias) Sets theAbstractListItemDTO.typeAliaswithIntegrationObjectClassModel.CODEonly when multi-definition is in use, which meansIntegrationObjectClassModel.CODEdoes not equal to simpleName ofObject.getClass().
-
Method Details
-
withSelected
Sets the value of the selected field for the list item to build.- Parameters:
selected- if the list item is selected- Returns:
- a builder with the field set
-
withCustomUnique
Sets the value of the unique field for the list item to build.- Parameters:
unique- if the list item's unique checkbox is checked- Returns:
- a builder with the field set
-
withAlias
Sets the value of the attribute name field for the list item to build.- Parameters:
attributeAliasedName- the name of the attribute the list item represents- Returns:
- a builder with the field set
-
withReadMethod
Sets the values of the read method field for the list item to build.- Parameters:
readMethod- the read method of the attribute the list item represents- Returns:
- a builder with the field set
-
withStructureType
Sets the value of the structureType field for the list item to build.- Parameters:
structureType- the structure type of the attribute.- Returns:
- a builder with the field set.
-
withAttributeReturnType
Sets the value of the attribute or read method's return type field for the list item to build.- Parameters:
returnType- the return type of the attribute or read method.- Returns:
- a builder with the field set.
-
withTypeAlias
Sets theAbstractListItemDTO.typeAliaswithIntegrationObjectClassModel.CODEonly when multi-definition is in use, which meansIntegrationObjectClassModel.CODEdoes not equal to simpleName ofObject.getClass().- Parameters:
typeAlias- fromIntegrationObjectClassModel.CODE- Returns:
- a builder with the field set.
-
build
validate the parameters and buildListItemClassAttributeDTO. To ensure the valid DTO is created, this method infers fields that are optional but necessary. ThePropertyDescriptorthat represents theListItemClassAttributeDTOmust be found byattributeNameorreadMethod, otherwise the DTO will be invalid and an exception will be thrown.- Throws:
ClassCastException- when fails to retrieve the attributeReturnType from the introspector
-