congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
EventClassFamilyDao.save
Code IndexAdd Tabnine to your IDE (free)

How to use
save
method
in
org.kaaproject.kaa.server.common.dao.impl.EventClassFamilyDao

Best Java code snippets using org.kaaproject.kaa.server.common.dao.impl.EventClassFamilyDao.save (Showing top 5 results out of 315)

origin: kaaproject/kaa

 EventClassFamily ecf = new EventClassFamily(eventClassFamily);
 ecf.setSchemas(schemas);
 eventClassFamilyDao.save(ecf);
} else {
 LOG.debug("Can't process event class family schema.");
origin: kaaproject/kaa

protected List<EventClass> generateEventClass(Tenant tenant, EventClassFamily eventClassFamily, int count) {
 if (tenant == null) {
  tenant = generateTenant();
 }
 if (eventClassFamily == null) {
  eventClassFamily = generateEventClassFamily(tenant, 1).get(0);
 }
 List<EventClassFamilyVersion> ecfvList = generateEventClassFamilyVersion(eventClassFamily, 1, count);
 eventClassFamily.setSchemas(ecfvList);
 eventClassFamily = eventClassFamilyDao.save(eventClassFamily);
 List<EventClass> storedECs = eventClassFamily.getSchemas().get(0).getRecords();
 return storedECs;
}
origin: kaaproject/kaa

protected List<EventClassFamily> generateEventClassFamily(Tenant tenant, int count) {
 if (tenant == null) {
  tenant = generateTenant();
 }
 EventClassFamily eventClassFamily;
 List<EventClassFamily> eventClassFamilies = new ArrayList<>(count);
 for (int i = 0; i < count; i++) {
  eventClassFamily = new EventClassFamily();
  eventClassFamily.setTenant(tenant);
  eventClassFamily.setClassName("Test ClassName" + RANDOM.nextInt());
  eventClassFamily.setCreatedTime(new Date().getTime());
  eventClassFamily.setCreatedUsername("Test Username");
  eventClassFamily.setDescription("Test Description");
  eventClassFamily.setName("Test Name" + RANDOM.nextInt());
  eventClassFamily.setNamespace("Test Namespace");
  eventClassFamily = eventClassFamilyDao.save(eventClassFamily);
  Assert.assertNotNull(eventClassFamily);
  eventClassFamilies.add(eventClassFamily);
 }
 return eventClassFamilies;
}
origin: kaaproject/kaa

 @Test
 public void findByEcfvIdTest() {
  List<EventClassFamily> eventClassFamilies = generateEventClassFamily(null, 1);
  EventClassFamily ecf = eventClassFamilies.get(0);
  List<EventClassFamilyVersion> ecfvList = generateEventClassFamilyVersion(ecf, 1, 1);
  ecf.setSchemas(ecfvList);
  ecf = eventClassFamilyDao.save(ecf);

  EventClassFamilyVersion ecfv = ecfvList.get(0);
  EventClassFamily ecfByEcfv = eventClassFamilyDao.findByEcfvId(ecfv.getStringId());
  Assert.assertNotNull(ecfByEcfv);
  Assert.assertEquals(ecf, ecfByEcfv);
  Assert.assertEquals(ecfByEcfv.getSchemas().size(), 1);
  if (ecfByEcfv.getSchemas().size() == 1) {
   Assert.assertEquals(ecfByEcfv.getSchemas().get(0).getRecords().size(), 1);
  } else {
   throw new AssertionError("There should be 1 ecfv in fetched ecf, but got: " + ecfByEcfv.getSchemas().size());
  }
 }
}
origin: kaaproject/kaa

 savedEventClassFamilyDto = getDto(eventClassFamilyDao.save(new EventClassFamily(
     eventClassFamilyDto)));
} else {
org.kaaproject.kaa.server.common.dao.implEventClassFamilyDaosave

Popular methods of EventClassFamilyDao

  • findByEcfvId
    Find EventClassFamily by ECF version id.
  • findById
  • findByTenantId
    Find EventClassFamily by tenant id.
  • findByTenantIdAndName
    Find EventClassFamily by tenant id and name.
  • removeById
  • removeByTenantId
    Remove all EventClassFamily objects by tenant id.
  • validateClassName
    Validate event class family class name for uniqueness within the tenant.
  • validateName
    Validate event class family name for uniqueness within the tenant.

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
  • startActivity (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • JButton (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now