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

com.microsoft.bingads.v13.internal.bulk.entities.BulkCampaignNegativeSitesIdentifier Maven / Gradle / Ivy

Go to download

The Bing Ads Java SDK is a library improving developer experience when working with the Bing Ads services by providing high-level access to features such as Bulk API, OAuth Authorization and SOAP API.

There is a newer version: 13.0.22.1
Show newest version
package com.microsoft.bingads.v13.internal.bulk.entities;

import com.microsoft.bingads.v13.bulk.entities.BulkCampaignNegativeSites;
import com.microsoft.bingads.v13.internal.bulk.StringTable;
import static com.microsoft.bingads.internal.utilities.Comparer.compareNullable;

/**
 * Reserved for internal use.
 */
public class BulkCampaignNegativeSitesIdentifier extends BulkNegativeSiteIdentifier {

    /**
     * Reserved for internal use.
     */
    public long getCampaignId() {
        return this.getEntityId();
    }

    public void setCampaignId(long value) {
        this.setEntityId(value);
    }

    /**
     * Reserved for internal use.
     */
    public String getCampaignName() {
        return this.getEntityName();
    }

    public void setCampaignName(String value) {
        this.setEntityName(value);
    }

    @Override
    public MultiRecordBulkEntity createEntityWithThisIdentifier() {
        return new BulkCampaignNegativeSites(this);
    }

    @Override
    protected String getParentColumnName() {
        return StringTable.Campaign;
    }

    @Override
    public boolean equals(Object other) {
        if (!(other instanceof BulkCampaignNegativeSitesIdentifier)) {
            return false;
        }
        
        BulkCampaignNegativeSitesIdentifier otherIdentifier = (BulkCampaignNegativeSitesIdentifier) other;

        boolean isNameNotEmpty = getCampaignName() != null &&
                getCampaignName().length() != 0;

        return compareNullable(getCampaignId(), otherIdentifier.getCampaignId()) ||
                (
                        isNameNotEmpty &&
                                compareNullable(getCampaignName(), otherIdentifier.getCampaignName())
                );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy