Tabnine Logo
BeanLocator$Finder
Code IndexAdd Tabnine to your IDE (free)

How to use
BeanLocator$Finder
in
org.apache.batchee.extras.locator

Best Java code snippets using org.apache.batchee.extras.locator.BeanLocator$Finder (Showing top 10 results out of 315)

origin: org.apache.batchee/batchee-extras

@Override
public void open(final Serializable checkpoint) throws Exception {
  if (input == null) {
    throw new BatchRuntimeException("Can't find any input");
  }
  final File file = new File(input);
  if (!file.exists()) {
    throw new BatchRuntimeException("'" + input + "' doesn't exist");
  }
  if (lineMapper != null) {
    mapper = BeanLocator.Finder.get(locator).newInstance(LineMapper.class, lineMapper);
  } else {
    mapper = null;
  }
  if (commentStr == null) {
    commentStr = "#";
  }
  comments = commentStr.split(",");
  reader = new BufferedReader(new FileReader(file));
  super.open(checkpoint);
}
origin: org.apache.batchee/batchee-extras

protected BeanLocator getBeanLocator() {
  return BeanLocator.Finder.get(locator);
}
origin: org.apache.batchee/batchee-commons-csv

@Override
public void open(final Serializable checkpoint) throws Exception {
  final CsvWriterMapper defaultMapper = mapping != null ? new DefaultMapper(Thread.currentThread().getContextClassLoader().loadClass(mapping)) : null;
  mapperInstance = mapper == null ?
    (defaultMapper != null ? new BeanLocator.LocatorInstance<CsvWriterMapper>(defaultMapper, null) : null) :
    BeanLocator.Finder.get(locator).newInstance(CsvWriterMapper.class, mapper);
  if ((header == null || header.isEmpty()) && Boolean.parseBoolean(writeHeaders) && DefaultMapper.class.isInstance(mapperInstance.getValue()) && checkpoint == null) {
    header = toListString(DefaultMapper.class.cast(mapperInstance.getValue()).getHeaders());
  }
  final CSVFormat format = newFormat();
  final File file = new File(output);
  if (!file.getParentFile().exists() && !file.getParentFile().mkdirs()) {
    throw new IllegalStateException("Cant create " + file);
  }
  this.transactionalWriter = new TransactionalWriter(file, encoding, checkpoint);
  this.writer = format.print(transactionalWriter);
}
origin: org.apache.batchee/batchee-extras

@Override
public void open(final Serializable checkpoint) throws Exception {
  final BeanLocator beanLocator = BeanLocator.Finder.get(locator);
  emProvider = findEntityManager();
  if (parameterProvider != null) {
    paramProvider = beanLocator.newInstance(ParameterProvider.class, parameterProvider);
  }
  if (pageSize != null) {
    page = Integer.parseInt(pageSize, page);
  }
  if (namedQuery == null && query == null) {
    throw new BatchRuntimeException("a query should be provided");
  }
  detach = Boolean.parseBoolean(detachEntities);
  transaction = Boolean.parseBoolean(jpaTransaction);
}
origin: org.apache.batchee/batchee-commons-csv

@Override
public void open(final Serializable checkpoint) throws Exception {
  final CSVFormat csvFormat = newFormat();
  parser = csvFormat.parse(newReader());
  iterator = new IteratorReader<CSVRecord>(parser.iterator());
  mapperInstance = mapper == null ?
    new BeanLocator.LocatorInstance<CsvReaderMapper>(
      mapping != null ? new DefaultMapper(Thread.currentThread().getContextClassLoader().loadClass(mapping)) : NOOP_MAPPER, null) :
    BeanLocator.Finder.get(locator).newInstance(CsvReaderMapper.class, mapper);
  super.open(checkpoint);
}
origin: org.apache.batchee/batchee-extras

protected BeanLocator.LocatorInstance<EntityManagerProvider> findEntityManager() {
  if (entityManagerProvider != null && entityManagerProvider.startsWith("jndi:")) {
    return new BeanLocator.LocatorInstance<EntityManagerProvider>(new JndiEntityManagerProvider(entityManagerProvider.substring("jndi:".length())), null);
  }
  return BeanLocator.Finder.get(locator).newInstance(EntityManagerProvider.class, entityManagerProvider);
}
origin: org.apache.batchee/batchee-extras

protected ItemProcessor getDelegate() { // note with cdi delegate scope shouldn't need cleanup
  if (delegate == null) {
    delegate = BeanLocator.Finder.get(locator).newInstance(ItemProcessor.class, delegateRef).getValue();
  }
  return delegate;
}
origin: org.apache.batchee/batchee-extras

@Override
public void open(final Serializable checkpoint) throws Exception {
  mapper = BeanLocator.Finder.get(locator).newInstance(ObjectMapper.class, mapperStr);
}
origin: org.apache.batchee/batchee-extras

@Override
public void open(final Serializable checkpoint) throws Exception {
  mapper = BeanLocator.Finder.get(locator).newInstance(RecordMapper.class, mapperStr);
  items = new LinkedList<Object>();
}
origin: org.apache.batchee/batchee-camel

private static BeanLocator.LocatorInstance<CamelTemplateLocator> locator(final String locator) {
  if (locator == null) {
    return new BeanLocator.LocatorInstance<CamelTemplateLocator>(DefaultCamelTemplateLocator.INSTANCE, null);
  }
  return BeanLocator.Finder.get(locator).newInstance(CamelTemplateLocator.class, locator);
}
org.apache.batchee.extras.locatorBeanLocator$Finder

Most used methods

  • get

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • From CI to AI: The AI layer in your organization
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