com.alphasystem.docx4j.builder.wml.CTFtnPropsBuilder Maven / Gradle / Ivy
package com.alphasystem.docx4j.builder.wml;
import java.math.BigInteger;
import org.docx4j.wml.CTFtnPos;
import org.docx4j.wml.CTFtnProps;
import org.docx4j.wml.CTNumRestart;
import org.docx4j.wml.NumFmt;
import org.docx4j.wml.NumberFormat;
import org.docx4j.wml.STFtnPos;
import org.docx4j.wml.STRestartNumber;
/**
* Fluent API builder for org.docx4j.wml.CTFtnProps
.
*
*/
public class CTFtnPropsBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
private CTFtnPropsBuilder.NumStartBuilder numStartBuilder;
/**
* Initialize the underlying object.
*
*/
public CTFtnPropsBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public CTFtnPropsBuilder(CTFtnProps object) {
super(object);
numStartBuilder = new CTFtnPropsBuilder.NumStartBuilder(this.object.getNumStart());
}
/**
* Copies values fom src
into target
. Values of target
will be overridden by the values from src
.
*
* @param src
* source object
* @param target
* target object
*/
public CTFtnPropsBuilder(CTFtnProps src, CTFtnProps target) {
this(target);
if (src!= null) {
CTFtnPos pos = src.getPos();
if (pos!= null) {
pos = new com.alphasystem.docx4j.builder.wml.CTFtnPosBuilder(pos, object.getPos()).getObject();
}
NumFmt numFmt = src.getNumFmt();
if (numFmt!= null) {
numFmt = new com.alphasystem.docx4j.builder.wml.NumFmtBuilder(numFmt, object.getNumFmt()).getObject();
}
org.docx4j.wml.CTEdnProps.NumStart numStart = src.getNumStart();
if (numStart!= null) {
numStart = new CTFtnPropsBuilder.NumStartBuilder(numStart, object.getNumStart()).getObject();
}
CTNumRestart numRestart = src.getNumRestart();
if (numRestart!= null) {
numRestart = new com.alphasystem.docx4j.builder.wml.CTNumRestartBuilder(numRestart, object.getNumRestart()).getObject();
}
withPos(pos).withNumFmt(numFmt).withNumStart(numStart).withNumRestart(numRestart);
}
}
protected CTFtnProps createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTFtnProps();
}
public CTFtnPropsBuilder withPos(CTFtnPos value) {
if (value!= null) {
object.setPos(value);
}
return this;
}
public CTFtnPropsBuilder withPos(STFtnPos val) {
if (val!= null) {
object.setPos(new com.alphasystem.docx4j.builder.wml.CTFtnPosBuilder().withVal(val).getObject());
}
return this;
}
public CTFtnPropsBuilder withNumFmt(NumFmt value) {
if (value!= null) {
object.setNumFmt(value);
}
return this;
}
public CTFtnPropsBuilder withNumFmt(NumberFormat val) {
if (val!= null) {
object.setNumFmt(new com.alphasystem.docx4j.builder.wml.NumFmtBuilder().withVal(val).getObject());
}
return this;
}
public CTFtnPropsBuilder withNumStart(org.docx4j.wml.CTEdnProps.NumStart value) {
if (value!= null) {
object.setNumStart(value);
}
return this;
}
public CTFtnPropsBuilder withNumStart(Long val) {
boolean initialized = (val!= null);
if (initialized) {
withNumStart(numStartBuilder.withVal(val).getObject());
}
return this;
}
public CTFtnPropsBuilder.NumStartBuilder getNumStartBuilder() {
return numStartBuilder;
}
public CTFtnPropsBuilder withNumRestart(CTNumRestart value) {
if (value!= null) {
object.setNumRestart(value);
}
return this;
}
public CTFtnPropsBuilder withNumRestart(STRestartNumber val) {
if (val!= null) {
object.setNumRestart(new com.alphasystem.docx4j.builder.wml.CTNumRestartBuilder().withVal(val).getObject());
}
return this;
}
/**
* Fluent API builder for org.docx4j.wml.CTEdnProps$NumStart
.
*
*/
public static class NumStartBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public NumStartBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public NumStartBuilder(org.docx4j.wml.CTEdnProps.NumStart object) {
super(object);
}
/**
* Copies values fom src
into target
. Values of target
will be overridden by the values from src
.
*
* @param src
* source object
* @param target
* target object
*/
public NumStartBuilder(org.docx4j.wml.CTEdnProps.NumStart src, org.docx4j.wml.CTEdnProps.NumStart target) {
this(target);
if (src!= null) {
withVal(WmlBuilderFactory.cloneBigInteger(src.getVal()));
}
}
protected org.docx4j.wml.CTEdnProps.NumStart createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTEdnPropsNumStart();
}
public CTFtnPropsBuilder.NumStartBuilder withVal(BigInteger value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
/**
* Calls setVal
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTFtnPropsBuilder.NumStartBuilder withVal(String value) {
if (value!= null) {
object.setVal(new BigInteger(value));
}
return this;
}
/**
* Calls setVal
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTFtnPropsBuilder.NumStartBuilder withVal(Long value) {
if (value!= null) {
object.setVal(BigInteger.valueOf(value));
}
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy