List datasetsDS = null;  if (datasets != null) datasetsDS = DatasetMapper.fillUserDatasets(datasets, dProto);   return datasetsDS;
if (datasets == null || datasets.size() == 0) return new ArrayList(); return DatasetMapper.fillUserDatasets(datasets, dProto);
	public List retrieveUserDatasets(DatasetSummary dProto)		throws DSOutOfServiceException, DSAccessException									{			//Make a new proto if none was provided.		if (dProto == null) dProto = new DatasetSummary();				//Retrieve the user ID.		UserCredentials uc = (UserCredentials)							registry.lookup(LookupNames.USER_CREDENTIALS);		//Define the criteria by which the object graph is pulled out.		Criteria c = DatasetMapper.buildUserDatasetsCriteria(uc.getUserID());		//Load the graph defined by criteria.		List datasets = (List) gateway.retrieveListData(Dataset.class, c);	  			//List of dataset summary objects.		List datasetsDS = null;		//Put the server data into the corresponding client object.		if (datasets != null) 			datasetsDS = DatasetMapper.fillUserDatasets(datasets, dProto);    		//can be null		return datasetsDS;	}