Codota Logo
Binding
Code IndexAdd Codota to your IDE (free)

How to use
Binding
in
org.milyn.flatfile

Best Java code snippets using org.milyn.flatfile.Binding (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: org.milyn/milyn-smooks-all

  public List<SmooksResourceConfiguration> toConfig() {
    getParameters().setProperty("parserFactory", factoryParserClass.getName());
    getParameters().setProperty("indent", Boolean.toString(indent));
    getParameters().setProperty("strict", Boolean.toString(strict));
    getParameters().setProperty("fields-in-message", Boolean.toString(fieldsInMessage));

    if(binding != null) {
      getParameters().setProperty("bindBeanId", binding.getBeanId());
      getParameters().setProperty("bindBeanClass", binding.getBeanClass().getName());
      getParameters().setProperty("bindingType", binding.getBindingType().toString());
      if(binding.getBindingType() == BindingType.MAP) {
        if(binding.getKeyField() == null) {
          throw new SmooksConfigurationException("CSV 'MAP' Binding must specify a 'keyField' property on the binding configuration.");
        }
        getParameters().setProperty("bindMapKeyField", binding.getKeyField());
      }
    }

    return super.toConfig();
  }
}
origin: org.milyn/milyn-smooks-csv

public CSVMapBinder(String fields, Class recordType, String keyField) {
  AssertArgument.isNotNullAndNotEmpty(fields, "fields");
  AssertArgument.isNotNull(recordType, "recordType");
  AssertArgument.isNotNullAndNotEmpty(keyField, "keyField");
  smooks = new Smooks();
  smooks.setFilterSettings(FilterSettings.DEFAULT_SAX);
  smooks.setReaderConfig(new CSVRecordParserConfigurator(fields)
      .setBinding(new Binding(beanId, recordType, BindingType.MAP).setKeyField(keyField)));
}
origin: org.milyn/milyn-smooks-csv

public CSVListBinder(String fields, Class recordType) {
  AssertArgument.isNotNullAndNotEmpty(fields, "fields");
  AssertArgument.isNotNull(recordType, "recordType");
  smooks = new Smooks();
  smooks.setFilterSettings(FilterSettings.DEFAULT_SAX);
  smooks.setReaderConfig(new CSVRecordParserConfigurator(fields)
      .setBinding(new Binding(beanId, recordType, BindingType.LIST)));
}
origin: org.milyn/milyn-smooks-all

public CSVMapBinder(String fields, Class recordType, String keyField) {
  AssertArgument.isNotNullAndNotEmpty(fields, "fields");
  AssertArgument.isNotNull(recordType, "recordType");
  AssertArgument.isNotNullAndNotEmpty(keyField, "keyField");
  smooks = new Smooks();
  smooks.setFilterSettings(FilterSettings.DEFAULT_SAX);
  smooks.setReaderConfig(new CSVRecordParserConfigurator(fields)
      .setBinding(new Binding(beanId, recordType, BindingType.MAP).setKeyField(keyField)));
}
origin: org.milyn/milyn-smooks-all

public CSVListBinder(String fields, Class recordType) {
  AssertArgument.isNotNullAndNotEmpty(fields, "fields");
  AssertArgument.isNotNull(recordType, "recordType");
  smooks = new Smooks();
  smooks.setFilterSettings(FilterSettings.DEFAULT_SAX);
  smooks.setReaderConfig(new CSVRecordParserConfigurator(fields)
      .setBinding(new Binding(beanId, recordType, BindingType.LIST)));
}
origin: org.virtuslab/milyn-smooks-flatfile

  public List<SmooksResourceConfiguration> toConfig() {
    getParameters().setProperty("parserFactory", factoryParserClass.getName());
    getParameters().setProperty("indent", Boolean.toString(indent));
    getParameters().setProperty("strict", Boolean.toString(strict));
    getParameters().setProperty("fields-in-message", Boolean.toString(fieldsInMessage));

    if(binding != null) {
      getParameters().setProperty("bindBeanId", binding.getBeanId());
      getParameters().setProperty("bindBeanClass", binding.getBeanClass().getName());
      getParameters().setProperty("bindingType", binding.getBindingType().toString());
      if(binding.getBindingType() == BindingType.MAP) {
        if(binding.getKeyField() == null) {
          throw new SmooksConfigurationException("CSV 'MAP' Binding must specify a 'keyField' property on the binding configuration.");
        }
        getParameters().setProperty("bindMapKeyField", binding.getKeyField());
      }
    }

    return super.toConfig();
  }
}
org.milyn.flatfileBinding

Javadoc

Binding configuration.

For more complex bindings, use the main java binding framework.

Most used methods

  • <init>
  • getBeanClass
  • getBeanId
  • getBindingType
  • getKeyField
  • setKeyField

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • String (java.lang)
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • JCheckBox (javax.swing)
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