@Entity public abstract class BasicAd extends NamedEntity implements HasCurrency, ImageOwner<BasicAd,AdImage>, EntityWithCustomValues<AdCustomField,AdCustomFieldPossibleValueCategory,AdCustomFieldPossibleValue,AdCustomFieldValue>
| Modifier and Type | Field and Description |
|---|---|
protected java.math.BigDecimal |
stockQuantity |
protected AdWebShopStockType |
stockType |
| Constructor and Description |
|---|
BasicAd() |
| Modifier and Type | Method and Description |
|---|---|
static AdStatus |
getActualStatus(DatePeriod publicationPeriod,
boolean removedFromOwner,
AdStatus persistedStatus)
The persisted status might not be real based on the ad conditions like the publication period.
|
java.util.Set<UserAddress> |
getAddresses() |
java.util.Set<AdHistoryLog> |
getAdHistory() |
protected abstract AdType |
getAdType() |
java.lang.String |
getAuthorizationNotes() |
java.util.Set<AdCategory> |
getCategories() |
java.util.Date |
getCreationDate() |
Currency |
getCurrency() |
java.math.BigDecimal |
getCurrentPrice() |
java.lang.Class<AdCustomField> |
getCustomFieldClass()
Returns custom field the class on this entity
|
java.lang.Class<AdCustomFieldValue> |
getCustomFieldValueClass()
Returns the class for storing custom field values
|
java.util.Set<AdCustomFieldValue> |
getCustomValues()
Returns all custom field values
|
java.util.Date |
getDeletedDate() |
java.lang.String |
getDescription() |
AdType |
getDiscriminator() |
AdImage |
getImage()
De-normalized reference to the first image
|
int |
getImageCount() |
java.util.List<AdImage> |
getImages() |
java.util.Date |
getLastModified() |
EntityLogType |
getLogType()
If this entity generates log then it must returns its
EntityLogType. |
Network |
getNetwork()
Returns the network this entity belongs to
|
java.lang.Integer |
getNumberOfImages() |
User |
getOwner() |
AdStatus |
getPersistedStatus() |
CurrencyAmount |
getPrice() |
DatePeriod |
getPromotionalPeriod() |
java.math.BigDecimal |
getPromotionalPrice() |
DatePeriod |
getPublicationPeriod() |
java.util.Set<AdQuestion> |
getQuestions() |
AdStatus |
getStatus() |
AdType |
getType() |
java.util.Set<TempImage> |
getUploadedImages() |
boolean |
isDoProcess() |
boolean |
isExpirationNotified() |
boolean |
isHidden() |
abstract boolean |
isInStock() |
boolean |
isPromotionalPeriodActive() |
boolean |
isRemovedFromOwner() |
void |
setAddresses(java.util.Set<UserAddress> addresses) |
void |
setAdHistory(java.util.Set<AdHistoryLog> adHistory) |
void |
setAuthorizationNotes(java.lang.String authorizationNotes) |
void |
setCategories(java.util.Set<AdCategory> categories) |
void |
setCreationDate(java.util.Date creationDate) |
void |
setCustomValues(java.util.Set<AdCustomFieldValue> customValues) |
void |
setDeletedDate(java.util.Date deletedDate) |
void |
setDescription(java.lang.String description) |
void |
setDoProcess(boolean doProcess) |
void |
setExpirationNotified(boolean expirationNotified) |
void |
setImage(AdImage image)
De-normalized reference to the first image
|
void |
setImages(java.util.List<AdImage> images) |
void |
setLastModified(java.util.Date lastModified) |
void |
setOwner(User owner) |
void |
setPrice(CurrencyAmount price) |
void |
setPromotionalPeriod(DatePeriod promotionalPeriod) |
void |
setPromotionalPrice(java.math.BigDecimal promotionalPrice) |
void |
setPublicationPeriod(DatePeriod publicationPeriod) |
void |
setQuestions(java.util.Set<AdQuestion> questions) |
void |
setRemovedFromOwner(boolean removedFromOwner) |
void |
setStatus(AdStatus status) |
void |
setUploadedImages(java.util.Set<TempImage> uploadedImages) |
compareTo, getName, getNames, setName, toStringgetDataTranslationType, getVersionisGlobalclone, equals, getId, getId, getIds, getUniqueIds, getUniqueIds, hashCode, isPersistent, isTransientprotected java.math.BigDecimal stockQuantity
protected AdWebShopStockType stockType
public static AdStatus getActualStatus(DatePeriod publicationPeriod, boolean removedFromOwner, AdStatus persistedStatus)
public java.util.Set<UserAddress> getAddresses()
public java.util.Set<AdHistoryLog> getAdHistory()
public java.lang.String getAuthorizationNotes()
public java.util.Set<AdCategory> getCategories()
public java.util.Date getCreationDate()
public Currency getCurrency()
getCurrency in interface HasCurrencypublic java.math.BigDecimal getCurrentPrice()
public java.lang.Class<AdCustomField> getCustomFieldClass()
EntityWithCustomValuesgetCustomFieldClass in interface EntityWithCustomValues<AdCustomField,AdCustomFieldPossibleValueCategory,AdCustomFieldPossibleValue,AdCustomFieldValue>public java.lang.Class<AdCustomFieldValue> getCustomFieldValueClass()
EntityWithCustomValuespublic java.util.Set<AdCustomFieldValue> getCustomValues()
EntityWithCustomValuesgetCustomValues in interface EntityWithCustomValues<AdCustomField,AdCustomFieldPossibleValueCategory,AdCustomFieldPossibleValue,AdCustomFieldValue>public java.util.Date getDeletedDate()
public java.lang.String getDescription()
public AdType getDiscriminator()
public AdImage getImage()
ImageOwnergetImage in interface ImageOwner<BasicAd,AdImage>public int getImageCount()
public java.util.List<AdImage> getImages()
getImages in interface ImageOwner<BasicAd,AdImage>public java.util.Date getLastModified()
public EntityLogType getLogType()
BaseEntityEntityLogType.getLogType in class BaseEntityEntityLogType. Null means it doesn't allow log.public Network getNetwork()
NetworkedEntitygetNetwork in class NetworkedEntitypublic java.lang.Integer getNumberOfImages()
public User getOwner()
public AdStatus getPersistedStatus()
public CurrencyAmount getPrice()
public DatePeriod getPromotionalPeriod()
public java.math.BigDecimal getPromotionalPrice()
public DatePeriod getPublicationPeriod()
public java.util.Set<AdQuestion> getQuestions()
public AdStatus getStatus()
public AdType getType()
public java.util.Set<TempImage> getUploadedImages()
public boolean isDoProcess()
public boolean isExpirationNotified()
public boolean isHidden()
public abstract boolean isInStock()
public boolean isPromotionalPeriodActive()
public boolean isRemovedFromOwner()
public void setAddresses(java.util.Set<UserAddress> addresses)
public void setAdHistory(java.util.Set<AdHistoryLog> adHistory)
public void setAuthorizationNotes(java.lang.String authorizationNotes)
public void setCategories(java.util.Set<AdCategory> categories)
public void setCreationDate(java.util.Date creationDate)
public void setCustomValues(java.util.Set<AdCustomFieldValue> customValues)
public void setDeletedDate(java.util.Date deletedDate)
public void setDescription(java.lang.String description)
public void setDoProcess(boolean doProcess)
public void setExpirationNotified(boolean expirationNotified)
public void setImage(AdImage image)
ImageOwnersetImage in interface ImageOwner<BasicAd,AdImage>public void setImages(java.util.List<AdImage> images)
setImages in interface ImageOwner<BasicAd,AdImage>public void setLastModified(java.util.Date lastModified)
public void setOwner(User owner)
public void setPrice(CurrencyAmount price)
public void setPromotionalPeriod(DatePeriod promotionalPeriod)
public void setPromotionalPrice(java.math.BigDecimal promotionalPrice)
public void setPublicationPeriod(DatePeriod publicationPeriod)
public void setQuestions(java.util.Set<AdQuestion> questions)
public void setRemovedFromOwner(boolean removedFromOwner)
public void setStatus(AdStatus status)
public void setUploadedImages(java.util.Set<TempImage> uploadedImages)
protected abstract AdType getAdType()