예제 #1
0
 /**
  * Persist a new Dataset associated to an owning organization and installation for use in Unit
  * Tests.
  *
  * @param organizationKey owning organization key
  * @param installationKey installation key
  * @return persisted Dataset
  */
 public static Dataset newPersistedInstance(UUID organizationKey, UUID installationKey) {
   Dataset dataset = Datasets.newInstance(organizationKey, installationKey);
   UUID key = datasetService.create(dataset);
   // some properties like created, modified are only set when the dataset is retrieved anew
   return datasetService.get(key);
 }
예제 #2
0
 public static Dataset newInstance(UUID owningOrganizationKey, UUID installationKey) {
   Dataset d = INSTANCE.newTypedInstance();
   d.setOwningOrganizationKey(owningOrganizationKey);
   d.setInstallationKey(installationKey);
   return d;
 }