Codota Logo
LogSchema.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.kaaproject.kaa.server.common.dao.model.sql.LogSchema
constructor

Best Java code snippets using org.kaaproject.kaa.server.common.dao.model.sql.LogSchema.<init> (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: kaaproject/kaa

@Override
protected GenericModel<LogSchemaDto> newInstance(Long id) {
 return new LogSchema(id);
}
origin: kaaproject/kaa

 @Test
 public void basicLogSchemaTest() {
  LogSchema logSchema = new LogSchema(TEST_ID);
  Assert.assertEquals((Long) TEST_ID, logSchema.getId());
 }
}
origin: kaaproject/kaa

@Override
public LogSchemaDto saveLogSchema(LogSchemaDto logSchemaDto) {
 String id = logSchemaDto.getId();
 if (StringUtils.isBlank(id)) {
  LogSchema logSchema = logSchemaDao.findLatestLogSchemaByAppId(
      logSchemaDto.getApplicationId());
  int version = 0;
  if (logSchema != null) {
   version = logSchema.getVersion();
  }
  logSchemaDto.setId(null);
  logSchemaDto.setVersion(++version);
  logSchemaDto.setCreatedTime(System.currentTimeMillis());
 } else {
  LogSchemaDto oldLogSchemaDto = getDto(logSchemaDao.findById(id));
  if (oldLogSchemaDto != null) {
   oldLogSchemaDto.editFields(logSchemaDto);
   logSchemaDto = oldLogSchemaDto;
  } else {
   LOG.error("Can't find log schema with given id [{}].", id);
   throw new IncorrectParameterException("Invalid log schema id: " + id);
  }
 }
 LogSchemaDto savedSchema = getDto(logSchemaDao.save(new LogSchema(logSchemaDto)));
 if (savedSchema == null) {
  throw new RuntimeException("Can't save log schema");
 }
 return savedSchema;
}
origin: kaaproject/kaa

protected List<LogSchema> generateLogSchema(Tenant tenant, int ctlVersion, Application application, int count) {
 List<LogSchema> schemas = Collections.emptyList();
 try {
  if (application == null) {
   application = generateApplication(tenant);
  }
  CtlSchema ctlSchema = generateCTLSchema(DEFAULT_FQN, ctlVersion, application.getTenant(), null);
  LogSchema schema;
  schemas = new ArrayList<>(count);
  for (int i = 0; i < count; i++) {
   schema = new LogSchema();
   schema.setApplication(application);
   schema.setCtlSchema(ctlSchema);
   schema.setCreatedUsername("Test User");
   schema.setName("Test Name");
   schema = logSchemaDao.save(schema);
   Assert.assertNotNull(schema);
   schemas.add(schema);
  }
 } catch (Exception ex) {
  LOG.error("Can't generate log schemas {}", ex);
  Assert.fail("Can't generate log schemas.");
 }
 return schemas;
}
org.kaaproject.kaa.server.common.dao.model.sqlLogSchema<init>

Popular methods of LogSchema

  • getStringId
  • getVersion
  • getApplication
  • getId
  • setApplication
  • setCreatedUsername
  • setCtlSchema
  • setName
  • toVersionDto

Popular in Java

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now