code: @Indexable(type = IndexableType.REINDEX)
  	@Override
  	public CPDefinition restoreCPDefinitionFromTrash(
  			long userId, long cpDefinitionId)
  		throws PortalException {
  
  		CPDefinition cpDefinition = cpDefinitionPersistence.findByPrimaryKey(
  			cpDefinitionId);
  
  		if (!cpDefinition.isInTrash()) {
  			throw new RestoreEntryException(
  				RestoreEntryException.INVALID_STATUS);
  		}
  
  		TrashEntry trashEntry = trashEntryLocalService.getEntry(
  			CPDefinition.class.getName(), cpDefinitionId);
  
  		cpDefinition = updateStatus(
  			userId, cpDefinitionId, trashEntry.getStatus(),
  			new ServiceContext(), new HashMap<String, Serializable>());
  
  		return cpDefinition;
  	}
docs: Restores the commerce product definition with the ID from the recycle
  bin.
  
  @param  userId the primary key of the user restoring the commerce product
  definition
  @param  cpDefinitionId the primary key of the commerce product definition
  to be restored
  @return the restored commerce product definition from the recycle bin