com.alphasystem.docx4j.builder.wml.CTTrPrChangeBuilder Maven / Gradle / Ivy
package com.alphasystem.docx4j.builder.wml;
import java.math.BigInteger;
import javax.xml.datatype.XMLGregorianCalendar;
import com.alphasystem.docx4j.builder.OpenXmlBuilder;
import org.docx4j.wml.CTTrPrBase;
import org.docx4j.wml.CTTrPrChange;
/**
* Fluent API builder for org.docx4j.wml.CTTrPrChange
.
*
*/
public class CTTrPrChangeBuilder
extends OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public CTTrPrChangeBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public CTTrPrChangeBuilder(CTTrPrChange 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 CTTrPrChangeBuilder(CTTrPrChange src, CTTrPrChange target) {
this(target);
if (src!= null) {
CTTrPrBase trPr = src.getTrPr();
if (trPr!= null) {
trPr = new CTTrPrBaseBuilder(trPr, object.getTrPr()).getObject();
}
withTrPr(trPr).withAuthor(src.getAuthor()).withDate(src.getDate()).withId(WmlBuilderFactory.cloneBigInteger(src.getId()));
}
}
protected CTTrPrChange createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTTrPrChange();
}
public CTTrPrChangeBuilder withTrPr(CTTrPrBase value) {
if (value!= null) {
object.setTrPr(value);
}
return this;
}
public CTTrPrChangeBuilder withAuthor(String value) {
if (value!= null) {
object.setAuthor(value);
}
return this;
}
public CTTrPrChangeBuilder withDate(XMLGregorianCalendar value) {
if (value!= null) {
object.setDate(value);
}
return this;
}
public CTTrPrChangeBuilder withId(BigInteger value) {
if (value!= null) {
object.setId(value);
}
return this;
}
/**
* Calls setId
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTTrPrChangeBuilder withId(String value) {
if (value!= null) {
object.setId(new BigInteger(value));
}
return this;
}
/**
* Calls setId
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTTrPrChangeBuilder withId(Long value) {
if (value!= null) {
object.setId(BigInteger.valueOf(value));
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy