All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alphasystem.docx4j.builder.wml.CTSectPrChangeBuilder Maven / Gradle / Ivy

There is a newer version: 0.5.5
Show newest version

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.CTSectPrChange;
import org.docx4j.wml.SectPrBase;


/**
 * Fluent API builder for org.docx4j.wml.CTSectPrChange.
 * 
 */
public class CTSectPrChangeBuilder
    extends OpenXmlBuilder
{


    /**
     * Initialize the underlying object.
     * 
     */
    public CTSectPrChangeBuilder() {
        this(null);
    }

    /**
     * Initialize the builder with given object.
     * 
     * @param object
     *     the given object
     */
    public CTSectPrChangeBuilder(CTSectPrChange 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 CTSectPrChangeBuilder(CTSectPrChange src, CTSectPrChange target) {
        this(target);
        if (src!= null) {
            SectPrBase sectPr = src.getSectPr();
            if (sectPr!= null) {
                sectPr = new SectPrBaseBuilder(sectPr, object.getSectPr()).getObject();
            }
            withSectPr(sectPr).withAuthor(src.getAuthor()).withDate(src.getDate()).withId(WmlBuilderFactory.cloneBigInteger(src.getId()));
        }
    }

    protected CTSectPrChange createObject() {
        return WmlBuilderFactory.OBJECT_FACTORY.createCTSectPrChange();
    }

    public CTSectPrChangeBuilder withSectPr(SectPrBase value) {
        if (value!= null) {
            object.setSectPr(value);
        }
        return this;
    }

    public CTSectPrChangeBuilder withAuthor(String value) {
        if (value!= null) {
            object.setAuthor(value);
        }
        return this;
    }

    public CTSectPrChangeBuilder withDate(XMLGregorianCalendar value) {
        if (value!= null) {
            object.setDate(value);
        }
        return this;
    }

    public CTSectPrChangeBuilder withId(BigInteger value) {
        if (value!= null) {
            object.setId(value);
        }
        return this;
    }

    /**
     * Calls setId method.
     * 
     * @param value
     *     Value to set
     * @return
     *     reference to this
     */
    public CTSectPrChangeBuilder 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 CTSectPrChangeBuilder withId(Long value) {
        if (value!= null) {
            object.setId(BigInteger.valueOf(value));
        }
        return this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy