<commit_before>package org.kuali.kfs.module.purap.businessobject;

import java.util.LinkedHashMap;
import java.util.List;

import org.kuali.kfs.integration.purap.CapitalAssetLocation;
import org.kuali.kfs.integration.purap.CapitalAssetSystem;
import org.kuali.kfs.integration.purap.ItemCapitalAsset;



/**
 * @author <NAME>ervous System Team (<EMAIL>)
 */

public class PurchaseOrderCapitalAssetSystem extends PurchasingCapitalAssetSystemBase {

	private String documentNumber;
	
	/**
	 * Default constructor.
	 */
	public PurchaseOrderCapitalAssetSystem() {
       super();
	}
	
	public PurchaseOrderCapitalAssetSystem(RequisitionCapitalAssetSystem reqSystem) {
	    super();
	    this.setCapitalAssetSystemDescription(reqSystem.getCapitalAssetSystemDescription());
	    this.setCapitalAssetNotReceivedCurrentFiscalYearIndicator(reqSystem.isCapitalAssetNotReceivedCurrentFiscalYearIndicator());
	    this.setCapitalAssetTypeCode(reqSystem.getCapitalAssetTypeCode());
	    this.setCapitalAssetManufacturerName(reqSystem.getCapitalAssetManufacturerName());
	    this.setCapitalAssetModelDescription(reqSystem.getCapitalAssetModelDescription());
	    this.setCapitalAssetNoteText(reqSystem.getCapitalAssetNoteText());
	    populatePurchaseOrderItemCapitalAssets(reqSystem);
	    this.setCapitalAssetLocations(reqSystem.getCapitalAssetLocations());
	    this.setCapitalAssetCountAssetNumber(reqSystem.getCapitalAssetCountAssetNumber());
	}

	private void populatePurchaseOrderItemCapitalAssets(RequisitionCapitalAssetSystem reqSystem) {
	    for (ItemCapitalAsset reqAsset : reqSystem.getItemCapitalAssets()) {
	        PurchaseOrderItemCapitalAsset poAsset = new PurchaseOrderItemCapitalAsset(reqAsset.getCapitalAssetNumber());
	        this.getItemCapitalAssets().add(poAsset);
	    }
	}
	
	public String getDocumentNumber() {
        return documentNumber;
    }

    @Override
    public Class getCapitalAssetLocationClass() {
        return PurchaseOrderCapitalAssetLocation.class;
    }

    @Override
    public Class getItemCapitalAssetClass() {
        return PurchaseOrderItemCapitalAsset.class;
    }

    public void setDocumentNumber(String documentNumber) {
        this.documentNumber = documentNumber;
    }
    
    @Override<commit_msg>KULPURAP-2909<commit_after>package org.kuali.kfs.module.purap.businessobject;

import java.util.LinkedHashMap;

import org.kuali.kfs.integration.purap.CapitalAssetLocation;
import org.kuali.kfs.integration.purap.ItemCapitalAsset;



/**
 * @author <NAME>vous System Team (<EMAIL>)
 */

public class PurchaseOrderCapitalAssetSystem extends PurchasingCapitalAssetSystemBase {

	private String documentNumber;
	
	/**
	 * Default constructor.
	 */
	public PurchaseOrderCapitalAssetSystem() {
       super();
	}
	
	public PurchaseOrderCapitalAssetSystem(RequisitionCapitalAssetSystem reqSystem) {
	    super();
	    this.setCapitalAssetSystemDescription(reqSystem.getCapitalAssetSystemDescription());
	    this.setCapitalAssetNotReceivedCurrentFiscalYearIndicator(reqSystem.isCapitalAssetNotReceivedCurrentFiscalYearIndicator());
	    this.setCapitalAssetTypeCode(reqSystem.getCapitalAssetTypeCode());
	    this.setCapitalAssetManufacturerName(reqSystem.getCapitalAssetManufacturerName());
	    this.setCapitalAssetModelDescription(reqSystem.getCapitalAssetModelDescription());
	    this.setCapitalAssetNoteText(reqSystem.getCapitalAssetNoteText());
	    populatePurchaseOrderItemCapitalAssets(reqSystem);
	    populateCapitalAssetLocations(reqSystem);
	    this.setCapitalAssetCountAssetNumber(reqSystem.getCapitalAssetCountAssetNumber());
	}

	private void populatePurchaseOrderItemCapitalAssets(RequisitionCapitalAssetSystem reqSystem) {
	    for (ItemCapitalAsset reqAsset : reqSystem.getItemCapitalAssets()) {
	        PurchaseOrderItemCapitalAsset poAsset = new PurchaseOrderItemCapitalAsset(reqAsset.getCapitalAssetNumber());
	        this.getItemCapitalAssets().add(poAsset);
	    }
	}
	
	private void populateCapitalAssetLocations(RequisitionCapitalAssetSystem reqSystem) {
	    for (CapitalAssetLocation reqLocation : reqSystem.getCapitalAssetLocations()) {
	        PurchaseOrderCapitalAssetLocation poLocation = new PurchaseOrderCapitalAssetLocation();
	        poLocation.setItemQuantity(reqLocation.getItemQuantity());
	        poLocation.setCampusCode(reqLocation.getCampusCode());
	        poLocation.setOffCampusIndicator(reqLocation.isOffCampusIndicator());
	        poLocation.setBuildingCode(reqLocation.getBuildingCode());
	        poLocation.setBuildingRoomNumber(reqLocation.getBuildingRoomNumber());
	        poLocation.setCapitalAssetLine1Address(reqLocation.getCapitalAssetLine1Address());
	        poLocation.setCapitalAssetCityName(reqLocation.getCapitalAssetCityName());
	        poLocation.setCapitalAssetStateCode(reqLocation.getCapitalAssetStateCode());
	        poLocation.setCapitalAssetPostalCode(reqLocation.getCapitalAssetPostalCode());
	        poLocation.setCapitalAssetCountryCode(reqLocation.getCapitalAssetCountryCode());
	        this.getCapitalAssetLocations().add(poLocation);
	    }
	}
	
	public String getDocumentNumber() {
        return documentNumber;
    }

    @Override
    public Class getCapitalAssetLocationClass() {
        return PurchaseOrderCapitalAssetLocation.class;
    }

    @Override
    public Class getItemCapitalAssetClass() {
        return PurchaseOrderItemCapitalAsset.class;
    }

    public void setDocumentNumber(String documentNumber) {
        this.documentNumber = documentNumber;
    }
    
    @Override
{'fraction_non_alphanumeric': 0.08009401554872536, 'fraction_numerical': 0.0010847947929849937, 'mean_word_length': 5.395375722543353, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5221559', 'n_tokens_mistral': 1605, 'n_tokens_neox': 1506, 'n_words': 178}