Fix for java6

This commit is contained in:
Travis Burtrum 2018-05-07 23:10:20 -04:00
parent 05ac1d3f84
commit 9f00f4924f
3 changed files with 15 additions and 7 deletions

View File

@ -8,6 +8,10 @@ import java.sql.SQLException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
//IFJAVA8_START
import java.util.stream.Stream;
//IFJAVA8_END
@JdbcMapper.Mapper( @JdbcMapper.Mapper(
cachePreparedStatements = JdbcMapper.OptionalBool.FALSE cachePreparedStatements = JdbcMapper.OptionalBool.FALSE
, allowReflection = JdbcMapper.OptionalBool.TRUE , allowReflection = JdbcMapper.OptionalBool.TRUE
@ -157,10 +161,10 @@ public interface QmDao extends JdbcMapper {
@SQL(selectThreePeople) @SQL(selectThreePeople)
ResultSetIterable<FieldPerson> getThreePeopleResultSetIterable(long personNo1, long personNo2, long personNo3) throws SQLException; ResultSetIterable<FieldPerson> getThreePeopleResultSetIterable(long personNo1, long personNo2, long personNo3) throws SQLException;
//IFJAVA 8_START //IFJAVA8_START
@SQL(selectThreePeople) @SQL(selectThreePeople)
java.util.stream.Stream<FieldPerson> getThreePeopleStream(long personNo1, long personNo2, long personNo3) throws SQLException; Stream<FieldPerson> getThreePeopleStream(long personNo1, long personNo2, long personNo3) throws SQLException;
//IFJAVA 8_END //IFJAVA8_END
} }

View File

@ -12,6 +12,10 @@ import java.sql.SQLException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
//IFJAVA8_START
import java.util.stream.Stream;
//IFJAVA8_END
import static com.moparisthebest.jdbc.TryClose.tryClose; import static com.moparisthebest.jdbc.TryClose.tryClose;
public class QueryMapperQmDao implements QmDao { public class QueryMapperQmDao implements QmDao {
@ -248,7 +252,7 @@ public class QueryMapperQmDao implements QmDao {
FieldPerson.class, personNo1, personNo2, personNo3); FieldPerson.class, personNo1, personNo2, personNo3);
} }
//IFJAVA 8_START //IFJAVA8_START
@Override @Override
public java.util.stream.Stream<FieldPerson> getThreePeopleStream(final long personNo1, final long personNo2, final long personNo3) throws SQLException { public java.util.stream.Stream<FieldPerson> getThreePeopleStream(final long personNo1, final long personNo2, final long personNo3) throws SQLException {
@ -256,5 +260,5 @@ public class QueryMapperQmDao implements QmDao {
FieldPerson.class, personNo1, personNo2, personNo3); FieldPerson.class, personNo1, personNo2, personNo3);
} }
//IFJAVA 8_END //IFJAVA8_END
} }

View File

@ -454,7 +454,7 @@ public class QueryMapperTest {
assertArrayEquals(people, fromDb.toArray()); assertArrayEquals(people, fromDb.toArray());
} }
//IFJAVA 8_START //IFJAVA8_START
@Test @Test
public void testStream() throws SQLException { public void testStream() throws SQLException {
@ -465,7 +465,7 @@ public class QueryMapperTest {
assertArrayEquals(people, fromDb.toArray()); assertArrayEquals(people, fromDb.toArray());
} }
//IFJAVA 8_END //IFJAVA8_END
/* /*
@Test @Test