class StorageUnitStatusDaoHelper {

    public StorageUnitStatusEntity getStorageUnitStatusEntity(String code) throws ObjectNotFoundException
    {
        StorageUnitStatusEntity storageUnitStatusEntity = storageUnitStatusDao.getStorageUnitStatusByCode(code);

        if (storageUnitStatusEntity == null)
        {
            throw new ObjectNotFoundException(String.format("Storage unit status \"%s\" doesn't exist.", code));
        }

        return storageUnitStatusEntity;
    }

}