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

com.microsoft.bingads.v10.bulk.entities.BulkAdGroupTargetIdentifier 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.23.2
Show newest version
package com.microsoft.bingads.v10.bulk.entities;

import com.microsoft.bingads.v10.internal.bulk.StringTable;
import com.microsoft.bingads.v10.internal.bulk.entities.MultiRecordBulkEntity;
import static com.microsoft.bingads.internal.utilities.Comparer.compareNullable;

/**
 * Reserved for internal use.
 */
class BulkAdGroupTargetIdentifier extends BulkTargetIdentifier {

    /**
     * Initializes a new instanced of the BulkAdGroupTargetIdentifier class.
     */
    public BulkAdGroupTargetIdentifier(Class targetBidType) {
        super(targetBidType);
    }

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

    /**
     * Reserved for internal use.
     */
    @Override
    String getEntityColumnName() {
        return StringTable.AdGroup;
    }

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

        BulkAdGroupTargetIdentifier otherIdentifier = (BulkAdGroupTargetIdentifier) other;

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

        return compareNullable(getEntityId(), otherIdentifier.getEntityId()) ||
                (
                        isNameNotEmpty &&
                                compareNullable(getEntityName(), otherIdentifier.getEntityName()) &&
                                compareNullable(getParentEntityName(), otherIdentifier.getParentEntityName())
                );
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy