Codota Logo
org.jdbi.v3.core.mapper.reflect
Code IndexAdd Codota to your IDE (free)

How to use org.jdbi.v3.core.mapper.reflect

Best Java code snippets using org.jdbi.v3.core.mapper.reflect (Showing top 20 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: jdbi/jdbi

/**
 * Return a ConstructorMapper for the given type and prefix.
 *
 * @param <T>    the type to map
 * @param type   the mapped type
 * @param prefix the column name prefix
 * @return the mapper
 */
public static <T> RowMapper<T> of(Class<T> type, String prefix) {
  return new ConstructorMapper<>(findFactoryFor(type), prefix);
}
origin: jdbi/jdbi

/**
 * Instantiate a ConstructorMapper using the given constructor and prefix
 *
 * @param <T> the type to map
 * @param constructor the constructor to be used in mapping
 * @param prefix      the column name prefix
 * @return the mapper
 */
public static <T> RowMapper<T> of(Constructor<T> constructor, String prefix) {
  return new ConstructorMapper<>(new ConstructorInstanceFactory<>(constructor), prefix);
}
origin: jdbi/jdbi

/**
 * Returns a mapper for the given bean class
 *
 * @param <T> the type to map
 * @param type the mapped class
 * @return a mapper for the given bean class
 */
public static <T> RowMapper<T> of(Class<T> type) {
  return FieldMapper.of(type, DEFAULT_PREFIX);
}
origin: jdbi/jdbi

/**
 * Create a default configuration that attempts case insensitive and
 * snake_case matching for names.
 */
public ReflectionMappers() {
  columnNameMatchers = Arrays.asList(
      new CaseInsensitiveColumnNameMatcher(),
      new SnakeCaseColumnNameMatcher());
  strictMatching = false;
}
origin: jdbi/jdbi

  @JdbiConstructor
  static MultipleStaticFactoryMethodsBean two(String s) {
    return new MultipleStaticFactoryMethodsBean();
  }
}
origin: jdbi/jdbi

/**
 * Return a ConstructorMapper using the given constructor
 *
 * @param <T> the type to map
 * @param constructor the constructor to be used in mapping
 * @return the mapper
 */
public static <T> RowMapper<T> of(Constructor<T> constructor) {
  return ConstructorMapper.of(constructor, DEFAULT_PREFIX);
}
origin: jdbi/jdbi

/**
 * Returns a mapper for the given bean class
 *
 * @param <T> the type to find the mapper for
 * @param type the mapped class
 * @return a mapper for the given bean class
 */
public static <T> RowMapper<T> of(Class<T> type) {
  return BeanMapper.of(type, DEFAULT_PREFIX);
}
origin: jdbi/jdbi

  @JdbiConstructor
  static StaticFactoryMethodBean create(String s, int i) {
    return new StaticFactoryMethodBean(s, i, 42);
  }
}
origin: jdbi/jdbi

  @JdbiConstructor
  ConstructorBean(String s, int i) {
    this.s = s;
    this.i = i;
  }
}
origin: jdbi/jdbi

/**
 * Returns a mapper for the given bean class
 *
 * @param <T> the type to map
 * @param type the mapped class
 * @param prefix the column name prefix for each mapped field
 * @return a mapper for the given bean class
 */
public static <T> RowMapper<T> of(Class<T> type, String prefix) {
  return new FieldMapper<>(type, prefix);
}
origin: jdbi/jdbi

  @Override
  public ReflectionMappers createCopy() {
    return new ReflectionMappers(this);
  }
}
origin: jdbi/jdbi

/**
 * Returns a mapper for the given bean class
 *
 * @param <T> the type to find the mapper for
 * @param type the mapped class
 * @param prefix the column name prefix for each mapped bean property
 * @return a mapper for the given bean class
 */
public static <T> RowMapper<T> of(Class<T> type, String prefix) {
  return new BeanMapper<>(type, prefix);
}
origin: jdbi/jdbi

  @ColumnName("name")
  public void setS(String s) {
    this.s = s;
  }
}
origin: jdbi/jdbi

private ConstructorMapper(InstanceFactory<T> factory, String prefix) {
  this.factory = factory;
  this.prefix = prefix.toLowerCase();
  this.constructorProperties = factory.getAnnotation(ConstructorProperties.class);
}
origin: jdbi/jdbi

@JdbiConstructor
static MultipleStaticFactoryMethodsBean one(String s) {
  return new MultipleStaticFactoryMethodsBean();
}
origin: jdbi/jdbi

/**
 * Return a ConstructorMapper for the given type.
 *
 * @param <T>  the type to map
 * @param type the mapped type
 * @return the mapper
 */
public static <T> RowMapper<T> of(Class<T> type) {
  return ConstructorMapper.of(type, DEFAULT_PREFIX);
}
origin: jdbi/jdbi

/**
 * Returns a mapper factory that maps to the given bean class
 *
 * @param type the mapped class
 * @return a mapper factory that maps to the given bean class
 */
public static RowMapperFactory factory(Class<?> type) {
  return RowMapperFactory.of(type, BeanMapper.of(type));
}
origin: jdbi/jdbi

@JdbiConstructor
public Character(int id, String name, Instant created, Instant modified) {
  this.id = id;
  this.name = name;
  this.created = created;
  this.modified = modified;
}
origin: jdbi/jdbi

  NamedParameterBean(@ColumnName("xyz") int i) {
    this.i = i;
  }
}
origin: jdbi/jdbi

@ColumnName("id")
public int getI() {
  return i;
}
org.jdbi.v3.core.mapper.reflect

Most used classes

  • BeanMapper
    A row mapper which maps the columns in a statement into a JavaBean. The default implementation will
  • ConstructorMapper
    A row mapper which maps the fields in a result set into a constructor. The default implementation wi
  • FieldMapper
    A row mapper which maps the columns in a statement into an object, using reflection to set fields on
  • ColumnName
  • ReflectionMappers
    Configuration class for reflective mappers.
  • CaseInsensitiveColumnNameMatcher,
  • ColumnNameMatcher,
  • JdbiConstructor,
  • JdbiConstructors,
  • BeanMapperTest$ColumnNameBean,
  • BeanMapperTest,
  • ConstructorInstanceFactory,
  • ConstructorMapperTest$MultipleStaticFactoryMethodsBean,
  • ConstructorMapperTest$StaticFactoryMethodBean,
  • ConstructorMapperTest,
  • DerivedBean,
  • FieldMapperTest,
  • InstanceFactory,
  • ReflectionMapperUtil
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