private Method generateCreateEntity(File file) { final Type entityImplType = getSupport().entityImplType(); file.add(Import.of(entityImplType)); return Method.of("createEntity", entityImplType).protected_() .add("return new " + getSupport().entityImplName() + "();"); }
requireNonNull(file); final Method getMetadata = Method.of("getMetadata", DefaultType.optional(String.class)) .protected_() .add(OVERRIDE);
private Method generateApplyResultSet( TranslatorSupport<Table> support, File file, Supplier<Stream<? extends Column>> columnsSupplier) { return Method.of("apply", support.entityType()) .protected_() .add(SQLException.class) .add(Field.of("resultSet", ResultSet.class)) .add(Field.of(OFFSET_PARAMETER_NAME, int.class)) .add(generateApplyResultSetBody( this::readFromResultSet, support, file, columnsSupplier )); }
private Method generateCreateEntity(File file) { final Type entityImplType = getSupport().entityImplType(); file.add(Import.of(entityImplType)); return Method.of("createEntity", entityImplType).protected_() .add("return new " + getSupport().entityImplName() + "();"); }
requireNonNull(file); final Method getMetadata = Method.of("getMetadata", DefaultType.optional(String.class)) .protected_() .add(OVERRIDE);
private Method generateApplyResultSet( TranslatorSupport<Table> support, File file, Supplier<Stream<? extends Column>> columnsSupplier) { return Method.of("apply", support.entityType()) .protected_() .add(SQLException.class) .add(Field.of("resultSet", ResultSet.class)) .add(Field.of(OFFSET_PARAMETER_NAME, int.class)) .add(generateApplyResultSetBody( this::readFromResultSet, support, file, columnsSupplier )); }