类 Neo4jItemReaderBuilder<T>
- java.lang.Object
- org.springframework.batch.item.data.builder.Neo4jItemReaderBuilder<T>
public class Neo4jItemReaderBuilder<T> extends java.lang.Object
A builder for theNeo4jItemReader
.- 从以下版本开始:
- 4.0
- 作者:
- Glenn Renfro
- 另请参阅:
Neo4jItemReader
构造器概要
构造器 构造器 说明 Neo4jItemReaderBuilder()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Neo4jItemReader<T>
build()
Returns a fully constructedNeo4jItemReader
.Neo4jItemReaderBuilder<T>
currentItemCount(int currentItemCount)
Index for the current item.Neo4jItemReaderBuilder<T>
matchStatement(java.lang.String matchStatement)
An optional match fragment of the cypher query.Neo4jItemReaderBuilder<T>
maxItemCount(int maxItemCount)
Configure the max number of items to be read.Neo4jItemReaderBuilder<T>
name(java.lang.String name)
The name used to calculate the key within theExecutionContext
.Neo4jItemReaderBuilder<T>
orderByStatement(java.lang.String orderByStatement)
A list of properties to order the results by.Neo4jItemReaderBuilder<T>
pageSize(int pageSize)
The number of items to be read with each page.Neo4jItemReaderBuilder<T>
parameterValues(java.util.Map<java.lang.String,java.lang.Object> parameterValues)
Optional parameters to be used in the cypher query.Neo4jItemReaderBuilder<T>
returnStatement(java.lang.String returnStatement)
The return statement of the cypher query.Neo4jItemReaderBuilder<T>
saveState(boolean saveState)
Configure if the state of theItemStreamSupport
should be persisted within theExecutionContext
for restart purposes.Neo4jItemReaderBuilder<T>
sessionFactory(org.neo4j.ogm.session.SessionFactory sessionFactory)
Establish the session factory for the reader.Neo4jItemReaderBuilder<T>
startStatement(java.lang.String startStatement)
The start segment of the cypher query.Neo4jItemReaderBuilder<T>
targetType(java.lang.Class<T> targetType)
The object type to be returned from each call toAbstractItemCountingItemStreamItemReader.read()
Neo4jItemReaderBuilder<T>
whereStatement(java.lang.String whereStatement)
An optional where fragment of the cypher query.
构造器详细资料
Neo4jItemReaderBuilder
public Neo4jItemReaderBuilder()
方法详细资料
saveState
public Neo4jItemReaderBuilder<T> saveState(boolean saveState)
Configure if the state of theItemStreamSupport
should be persisted within theExecutionContext
for restart purposes.- 参数:
saveState
- defaults to true- 返回:
- The current instance of the builder.
name
public Neo4jItemReaderBuilder<T> name(java.lang.String name)
The name used to calculate the key within theExecutionContext
. Required ifsaveState(boolean)
is set to true.- 参数:
name
- name of the reader instance- 返回:
- The current instance of the builder.
- 另请参阅:
ItemStreamSupport.setName(String)
maxItemCount
public Neo4jItemReaderBuilder<T> maxItemCount(int maxItemCount)
Configure the max number of items to be read.- 参数:
maxItemCount
- the max items to be read- 返回:
- The current instance of the builder.
- 另请参阅:
AbstractItemCountingItemStreamItemReader.setMaxItemCount(int)
currentItemCount
public Neo4jItemReaderBuilder<T> currentItemCount(int currentItemCount)
Index for the current item. Used on restarts to indicate where to start from.- 参数:
currentItemCount
- current index- 返回:
- this instance for method chaining
- 另请参阅:
AbstractItemCountingItemStreamItemReader.setCurrentItemCount(int)
sessionFactory
public Neo4jItemReaderBuilder<T> sessionFactory(org.neo4j.ogm.session.SessionFactory sessionFactory)
Establish the session factory for the reader.- 参数:
sessionFactory
- the factory to use for the reader.- 返回:
- this instance for method chaining
- 另请参阅:
AbstractNeo4jItemReader.setSessionFactory(SessionFactory)
pageSize
public Neo4jItemReaderBuilder<T> pageSize(int pageSize)
The number of items to be read with each page.- 参数:
pageSize
- the number of items- 返回:
- this instance for method chaining
- 另请参阅:
AbstractPaginatedDataItemReader.setPageSize(int)
parameterValues
public Neo4jItemReaderBuilder<T> parameterValues(java.util.Map<java.lang.String,java.lang.Object> parameterValues)
Optional parameters to be used in the cypher query.- 参数:
parameterValues
- the parameter values to be used in the cypher query- 返回:
- this instance for method chaining
- 另请参阅:
AbstractNeo4jItemReader.setParameterValues(Map)
startStatement
public Neo4jItemReaderBuilder<T> startStatement(java.lang.String startStatement)
The start segment of the cypher query. START is prepended to the statement provided and should not be included.- 参数:
startStatement
- the start fragment of the cypher query.- 返回:
- this instance for method chaining
- 另请参阅:
AbstractNeo4jItemReader.setStartStatement(String)
returnStatement
public Neo4jItemReaderBuilder<T> returnStatement(java.lang.String returnStatement)
The return statement of the cypher query. RETURN is prepended to the statement provided and should not be included- 参数:
returnStatement
- the return fragment of the cypher query.- 返回:
- this instance for method chaining
- 另请参阅:
AbstractNeo4jItemReader.setReturnStatement(String)
matchStatement
public Neo4jItemReaderBuilder<T> matchStatement(java.lang.String matchStatement)
An optional match fragment of the cypher query. MATCH is prepended to the statement provided and should not be included.- 参数:
matchStatement
- the match fragment of the cypher query- 返回:
- this instance for method chaining
- 另请参阅:
AbstractNeo4jItemReader.setMatchStatement(String)
whereStatement
public Neo4jItemReaderBuilder<T> whereStatement(java.lang.String whereStatement)
An optional where fragment of the cypher query. WHERE is prepended to the statement provided and should not be included.- 参数:
whereStatement
- where fragment of the cypher query- 返回:
- this instance for method chaining
- 另请参阅:
AbstractNeo4jItemReader.setWhereStatement(String)
orderByStatement
public Neo4jItemReaderBuilder<T> orderByStatement(java.lang.String orderByStatement)
A list of properties to order the results by. This is required so that subsequent page requests pull back the segment of results correctly. ORDER BY is prepended to the statement provided and should not be included.- 参数:
orderByStatement
- order by fragment of the cypher query.- 返回:
- this instance for method chaining
- 另请参阅:
AbstractNeo4jItemReader.setOrderByStatement(String)
targetType
public Neo4jItemReaderBuilder<T> targetType(java.lang.Class<T> targetType)
The object type to be returned from each call toAbstractItemCountingItemStreamItemReader.read()
- 参数:
targetType
- the type of object to return.- 返回:
- this instance for method chaining
- 另请参阅:
AbstractNeo4jItemReader.setTargetType(Class)
build
public Neo4jItemReader<T> build()
Returns a fully constructedNeo4jItemReader
.- 返回:
- a new
Neo4jItemReader