Tabnine Logo
MongoEndpointSpecificConfiguration
Code IndexAdd Tabnine to your IDE (free)

How to use
MongoEndpointSpecificConfiguration
in
org.kaaproject.kaa.server.common.nosql.mongo.dao.model

Best Java code snippets using org.kaaproject.kaa.server.common.nosql.mongo.dao.model.MongoEndpointSpecificConfiguration (Showing top 4 results out of 315)

origin: kaaproject/kaa

@Override
public EndpointSpecificConfiguration save(EndpointSpecificConfigurationDto dto) {
 LOG.debug("Saving endpoint specific configuration {}", dto);
 MongoEndpointSpecificConfiguration configuration =
     (MongoEndpointSpecificConfiguration) findByEndpointKeyHashAndConfigurationVersion(dto.getEndpointKeyHash(), dto.getConfigurationSchemaVersion());
 if (configuration != null) {
  dto.setVersion(configuration.getVersion());
 }
 configuration = save(new MongoEndpointSpecificConfiguration(dto));
 if (LOG.isTraceEnabled()) {
  LOG.trace("Saved: {}", configuration);
 } else {
  LOG.debug("Saved: {}", configuration != null);
 }
 return configuration;
}
origin: kaaproject/kaa

@Override
public EndpointSpecificConfigurationDto toDto() {
 EndpointSpecificConfigurationDto dto = new EndpointSpecificConfigurationDto();
 dto.setEndpointKeyHash(this.getEndpointKeyHash());
 dto.setConfiguration(this.getConfiguration());
 dto.setConfigurationSchemaVersion(this.getConfigurationVersion());
 dto.setVersion(this.getVersion());
 return dto;
}
origin: kaaproject/kaa

 @Test
 public void dataConversionTest() throws Exception {
  EndpointSpecificConfigurationDto dto = new EndpointSpecificConfigurationDto("hash".getBytes(), 1, "conf body", 2L);
  MongoEndpointSpecificConfiguration configuration = new MongoEndpointSpecificConfiguration(dto);
  Assert.assertEquals(dto, configuration.toDto());
 }
}
origin: kaaproject/kaa

/**
 * All-args constructor.
 */
public MongoEndpointSpecificConfiguration(EndpointSpecificConfigurationDto dto) {
 this.endpointKeyHash = dto.getEndpointKeyHash();
 this.configurationVersion = dto.getConfigurationSchemaVersion();
 this.configuration = dto.getConfiguration();
 this.version = dto.getVersion();
 generateId();
}
org.kaaproject.kaa.server.common.nosql.mongo.dao.modelMongoEndpointSpecificConfiguration

Most used methods

  • <init>
    All-args constructor.
  • generateId
  • getConfiguration
  • getConfigurationVersion
  • getEndpointKeyHash
  • getVersion
  • toDto

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Best plugins for Eclipse
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