class FileTypeServiceImpl implements FileTypeService {

    @Override
    public FileType getFileType(FileTypeKey fileTypeKey)
    {
        // Perform validation and trim.
        validateAndTrimFileTypeKey(fileTypeKey);

        // Retrieve and ensure that a file type already exists with the specified key.
        FileTypeEntity fileTypeEntity = fileTypeDaoHelper.getFileTypeEntity(fileTypeKey.getFileTypeCode());

        // Create and return the file type object from the persisted entity.
        return createFileTypeFromEntity(fileTypeEntity);
    }

}