Package org.openwms.common.location.impl
Class LocationTypeServiceImpl
java.lang.Object
org.openwms.common.location.impl.LocationTypeServiceImpl
- All Implemented Interfaces:
LocationTypeService
A LocationTypeServiceImpl is a Spring managed transactional Service that operates on
LocationType entities and spans the
tx boundary.- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LocationTypeRepositoryprivate final org.ameba.i18n.Translator -
Constructor Summary
ConstructorsConstructorDescriptionLocationTypeServiceImpl(org.ameba.i18n.Translator translator, LocationTypeRepository repository) -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(@NotNull List<LocationType> locationTypes) Delete already persistedLocationTypes.@NotNull List<LocationType> findAll()Return a list of allLocationTypes in natural order.@NotNull LocationTypefindByPKey(@NotBlank String pKey) Find and return aLocationType.findByTypeName(@NotBlank String typeName) Find aLocationTypeby it's name.private LocationTypefindInternal(String pKey) @NotNull LocationTypesave(@NotNull LocationType locationType) Save aLocationType.
-
Field Details
-
translator
private final org.ameba.i18n.Translator translator -
repository
-
-
Constructor Details
-
LocationTypeServiceImpl
LocationTypeServiceImpl(org.ameba.i18n.Translator translator, LocationTypeRepository repository)
-
-
Method Details
-
findByPKey
Find and return aLocationType.- Specified by:
findByPKeyin interfaceLocationTypeService- Parameters:
pKey- The persistent key- Returns:
- The instance
-
findInternal
-
findByTypeName
Find aLocationTypeby it's name.- Specified by:
findByTypeNamein interfaceLocationTypeService- Parameters:
typeName- The name of the LocationType- Returns:
- The instance
-
findAll
Return a list of allLocationTypes in natural order.- Specified by:
findAllin interfaceLocationTypeService- Returns:
- All LocationTypes as a list
-
delete
Delete already persistedLocationTypes. The implementation uses the PK to find the LocationType to be removed and removes it.- Specified by:
deletein interfaceLocationTypeService- Parameters:
locationTypes- A list of all instances to be deleted.
-
save
Save aLocationType.- Specified by:
savein interfaceLocationTypeService- Parameters:
locationType- The type to save- Returns:
- The saved type
-