Package org.beanio.builder
Class RecordBuilder
- java.lang.Object
-
- org.beanio.builder.PropertyBuilderSupport<T>
-
- org.beanio.builder.SegmentBuilderSupport<RecordBuilder>
-
- org.beanio.builder.RecordBuilder
-
public class RecordBuilder extends SegmentBuilderSupport<RecordBuilder>
Builds a new record configuration.- Since:
- 2.1.0
-
-
Constructor Summary
Constructors Constructor Description RecordBuilder(java.lang.String name)
Constructs a newRecordBuilder
.RecordBuilder(java.lang.String name, java.lang.Class<?> type)
Constructs a newRecordBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordConfig
build()
Builds the record configuration.protected SegmentConfig
getConfig()
Returns the configuration settings.RecordBuilder
length(int n)
Sets the length of the record (i.e the number of fields in a delimited record, or the number of characters in a fixed length record).RecordBuilder
length(int min, int max)
Sets the minimum and maximum length of the record (i.e the number of fields in a delimited record, or the number of characters in a fixed length record).RecordBuilder
maxLength(int max)
Sets the minimum length of the record (i.e the number of fields in a delimited record, or the number of characters in a fixed length record).protected RecordBuilder
me()
Returns this.RecordBuilder
minLength(int min)
Sets the minimum length of the record (i.e the number of fields in a delimited record, or the number of characters in a fixed length record).RecordBuilder
order(int order)
Sets the order of this record relative to other children of the same parent.RecordBuilder
ridLength(int n)
Sets the length of the record for identification.RecordBuilder
ridLength(int min, int max)
Sets the minimum and maximum length of the record for identification.-
Methods inherited from class org.beanio.builder.SegmentBuilderSupport
addField, addSegment, key, value
-
Methods inherited from class org.beanio.builder.PropertyBuilderSupport
collection, getter, lazy, maxOccurs, minOccurs, occurs, occurs, setter, type, xmlName, xmlNamespace, xmlPrefix, xmlType
-
-
-
-
Constructor Detail
-
RecordBuilder
public RecordBuilder(java.lang.String name)
Constructs a newRecordBuilder
.- Parameters:
name
- the record name
-
RecordBuilder
public RecordBuilder(java.lang.String name, java.lang.Class<?> type)
Constructs a newRecordBuilder
.- Parameters:
name
- the record nametype
- the record type
-
-
Method Detail
-
me
protected RecordBuilder me()
Description copied from class:PropertyBuilderSupport
Returns this.- Specified by:
me
in classPropertyBuilderSupport<RecordBuilder>
- Returns:
- this
-
getConfig
protected SegmentConfig getConfig()
Description copied from class:PropertyBuilderSupport
Returns the configuration settings.- Specified by:
getConfig
in classSegmentBuilderSupport<RecordBuilder>
- Returns:
- the configuration
-
order
public RecordBuilder order(int order)
Sets the order of this record relative to other children of the same parent.- Parameters:
order
- the order- Returns:
- this
-
minLength
public RecordBuilder minLength(int min)
Sets the minimum length of the record (i.e the number of fields in a delimited record, or the number of characters in a fixed length record).- Parameters:
min
- the minimum length- Returns:
- this
-
maxLength
public RecordBuilder maxLength(int max)
Sets the minimum length of the record (i.e the number of fields in a delimited record, or the number of characters in a fixed length record).- Parameters:
max
- the maximum length, or -1 if unbounded- Returns:
- this
-
length
public RecordBuilder length(int n)
Sets the length of the record (i.e the number of fields in a delimited record, or the number of characters in a fixed length record).- Parameters:
n
- the length- Returns:
- this
-
length
public RecordBuilder length(int min, int max)
Sets the minimum and maximum length of the record (i.e the number of fields in a delimited record, or the number of characters in a fixed length record).- Parameters:
min
- the minimum lengthmax
- the maximum length, or -1 if unbounded- Returns:
- this
-
ridLength
public RecordBuilder ridLength(int n)
Sets the length of the record for identification.- Parameters:
n
- the length- Returns:
- this
-
ridLength
public RecordBuilder ridLength(int min, int max)
Sets the minimum and maximum length of the record for identification.- Parameters:
min
- the minimum lengthmax
- the maximum length, or -1 if unbounded- Returns:
- this
-
build
public RecordConfig build()
Builds the record configuration.- Returns:
- the record configuration
-
-