com.microsoft.bingads.v13.bulk.entities.BulkEntity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of microsoft.bingads Show documentation
Show all versions of microsoft.bingads Show documentation
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.
package com.microsoft.bingads.v13.bulk.entities;
import java.util.Calendar;
import java.util.List;
import com.microsoft.bingads.internal.ErrorMessages;
import com.microsoft.bingads.v13.bulk.BulkFileReader;
import com.microsoft.bingads.v13.bulk.BulkFileWriter;
import com.microsoft.bingads.v13.bulk.BulkOperation;
import com.microsoft.bingads.v13.bulk.BulkServiceManager;
import com.microsoft.bingads.v13.internal.bulk.BulkObject;
/**
* The abstract base class for all bulk entities that can be read or written in a bulk file.
*
*
* For more information, see Bulk File Schema at
* https://go.microsoft.com/fwlink/?linkid=846127.
*
*
* @see BulkServiceManager
* @see BulkOperation
* @see BulkFileReader
* @see BulkFileWriter
*/
public abstract class BulkEntity extends BulkObject {
/**
* Determines whether the bulk entity has associated errors.
*/
public abstract boolean hasErrors();
/**
* Gets the last modified time for the entity.
*/
public abstract Calendar getLastModifiedTime();
/**
* Reserved for internal use.
*/
protected void validatePropertyNotNull(Object propertyValue, String propertyName) {
if (propertyValue == null) {
throw new IllegalArgumentException(ErrorMessages.getPropertyMustNotBeNullMessage(getClass().getName(), propertyName));
}
}
/**
* Reserved for internal use.
*/
protected void validateListNotNullOrEmpty(Object listObject, List list, String propertyName) {
if (listObject == null || list.isEmpty()) {
throw new IllegalArgumentException(ErrorMessages.getListMustNotBeEmptyMessage(getClass().getName(), propertyName));
}
}
}