A single item put up for bidding on a website, with its bidding window, starting price and current leading bid. Bids are recorded as AuctionBid rows; the auction itself caches the current bid count and value, the leading bid while bidding is open and the winning bid once it has been processed. An auction can be restricted to particular groups or organisations, is optionally grouped into an AuctionSet, and can pay out either a reward or, once won, an order held as the related cart. The auctionType field selects the bidding rules, one of the HighestBidAuction, LowestUniqueBidAuction or HighestUniqueBidAuction constants.

Group: Database Entities

Implements: Serializable, Relational


Properties

PropertyReturnsDescription
auctionDescriptionStringDescription of the item being auctioned, shown to bidders on the auction page. Also searched by the auction search.
auctionEndDateDateDate and time bidding closes. Bids are no longer accepted after this, but the winner is not decided until the auction is processed.
auctionGroupsList<AuctionGroup>The groups the auction is restricted to, as join rows. An empty or null list means it is not restricted by group.
auctionOrganisationsList<AuctionOrganisation>The organisations the auction is restricted to, as join rows. An empty or null list means it is not restricted by organisation.
auctionProcessedDateDateDate and time the auction was processed, ie when bidding was closed off and the winner decided. Null while the auction is still running or waiting to be processed.
auctionReserveValueBigDecimalThe reserve, ie the minimum value bidding must reach for the item to sell. May be null, meaning there is no reserve.
auctionRewardRewardThe reward granted to the winner, for auctions that pay out a reward rather than an order. Null if the auction is not linked to a reward, and lazily loaded.
auctionSetAuctionSetThe set this auction is part of, used to run a group of auctions together as one event. Null if the auction stands alone.
auctionStartDateDateDate and time bidding opens. An auction only counts as active once this has passed and its status is ACTIVE.
auctionStartValueBigDecimalThe opening bid value, ie where bidding starts. Defaults to 1 when the auction is created.
auctionTypeStringThe bidding rules for this auction, as one of the short codes held in the HighestBidAuction (HBA), LowestUniqueBidAuction (LUB) and HighestUniqueBidAuction (HUB) constants.
bidFeeBigDecimalFee charged to the bidder each time they place a bid, for pay-to-bid auctions. Null means bidding is free.
branchBranchThe content repository branch holding this auction's pages and assets. Never null, and lazily loaded.
createdByProfileThe administrator profile that created the auction. Never null, and lazily loaded.
createdDateDateDate and time the auction record was created, which is not the same as the date bidding opens.
currentBidCountIntegerRunning count of bids placed on this auction, kept on the auction so a listing does not have to count the bid rows. Starts at zero when the auction is created.
currentBidValueBigDecimalThe value bidding has currently reached, cached on the auction so a listing does not have to read the bid rows. Null until the first bid is placed.
deletedbooleanWhether the auction has been soft deleted. Deleted auctions are excluded from the standard lookups but the row and its bids are retained.
deletedByProfileThe profile that soft deleted the auction, or null if it has not been deleted.
deletedDateDateDate and time the auction was soft deleted, or null if it has not been deleted.
idlongUnique database identifier for this auction.
imagesList<AuctionImage>Images of the item being auctioned. May be null if no images have been uploaded; getPrimaryImageId names the one to lead with.
incrementValueBigDecimalMinimum amount by which a new bid must beat the current bid. Defaults to 1 when the auction is created.
leadingBidAuctionBidThe bid currently in front under this auction's bidding rules, which for a unique bid auction is not simply the highest. Null until the first bid is placed.
nameStringPath-safe identifier for the auction, used as the URL segment on the website and as the lookup key within an organisation or website. Use the title for display instead.
notesStringInternal administrator notes about the auction, not shown to bidders. Limited to 2048 characters.
primaryImageIdLongIdentifier of the image to show as the auction's main picture, chosen from its images. Null if no primary image has been nominated.
relatedCartCartThe cart created when an order was placed for this auction, linking the win through to fulfilment. Null until an order is placed, and lazily loaded.
skuStringProduct SKU code of the item being auctioned, for tying the auction back to stock. Free text of up to 1000 characters and not validated against the product catalogue.
statusSTATUSPublication status of the auction: DRAFT while it is being set up, ACTIVE once it is live. Only ACTIVE auctions inside their bidding window are counted as running.
templateStringName of the template used to render this auction's page to bidders. Set to an empty string when the auction is created, meaning the website's default rendering is used.
titleStringFree-text display title of the auction, shown as the heading on the auction page. Carries no uniqueness guarantee, unlike the name.
websiteWebsiteThe website the auction is published on, which scopes both its URL and who can see it. Never null, and lazily loaded.
winningBidAuctionBidThe bid that won the auction. Only set once the auction has been processed, and null before then or if nobody met the reserve.

Methods

getId() · getTitle() · setTitle(String title) · setOrganisation(Organisation organisation) · getName() · setName(String name) · getNotes() · setNotes(String notes) · getTemplate() · setTemplate(String template) · getCreatedDate() · setCreatedDate(Date createdDate) · getCreatedBy() · setCreatedBy(Profile createdBy) · isDeleted() · setDeleted(boolean deleted) · getDeletedDate() · setDeletedDate(Date deletedDate) · getDeletedBy() · setDeletedBy(Profile deletedBy) · setAuctionStartDate(Date auctionStartDate) · getAuctionStartDate() · setAuctionEndDate(Date auctionEndDate) · getAuctionEndDate() · setAuctionType(String auctionType) · getAuctionType() · setAuctionReserveValue(BigDecimal auctionReserveValue) · getAuctionReserveValue() · setAuctionStartValue(BigDecimal auctionStartValue) · getAuctionStartValue() · setBidFee(BigDecimal bidFee) · getBidFee() · setCurrentBidCount(Integer CurrentBidCount) · getCurrentBidCount() · setCurrentBidValue(BigDecimal CurrentBidValue) · getCurrentBidValue() · setIncrementValue(BigDecimal auctionIncrementValue) · getIncrementValue() · getAuctionDescription() · setAuctionDescription(String auctionDescription) · getWebsite() · setWebsite(Website website) · getAuctionGroups() · setAuctionGroups(List<AuctionGroup> auctionGroups) · addGroup(Group group) · getAuctionOrganisations() · setAuctionOrganisations(List<AuctionOrganisation> auctionOrganisations) · getAuctionProcessedDate() · setAuctionProcessedDate(Date auctionProcessedDate) · getWinningBid() · setWinningBid(AuctionBid winningBid) · getLeadingBid() · setLeadingBid(AuctionBid leadingBid) · getAuctionReward() · setAuctionReward(Reward auctionReward) · getBranch() · setBranch(Branch branch) · getRelatedCart() · setRelatedCart(Cart relatedCart) · getImages() · setImages(List<AuctionImage> images) · addImage(String fname, String hash, String orientation) · image(String childName) · getPrimaryImageId() · setPrimaryImageId(Long primaryImageId) · getStatus() · setStatus(STATUS status) · getSku() · setSku(String sku) · getAuctionSet() · setAuctionSet(AuctionSet auctionSet) · findBid(Long id) · rowId()

getId()

Returns: long

Unique database identifier for this auction.

getTitle()

Returns: String

Free-text display title of the auction, shown as the heading on the auction page. Carries no uniqueness guarantee, unlike the name.

setTitle(String title)

Returns: void

Sets the free-text display title shown on the auction page.

ParameterDescription
titlethe display title to use

setOrganisation(Organisation organisation)

Returns: void

Sets the organisation this auction falls under.

ParameterDescription
organisationthe organisation this auction falls under

getName()

Returns: String

Path-safe identifier for the auction, used as the URL segment on the website and as the lookup key within an organisation or website. Use the title for display instead.

setName(String name)

Returns: void

Sets the path-safe name used in the auction's URL and as its lookup key.

ParameterDescription
namethe auction name to use

getNotes()

Returns: String

Internal administrator notes about the auction, not shown to bidders. Limited to 2048 characters.

setNotes(String notes)

Returns: void

Sets the internal administrator notes held against the auction.

ParameterDescription
notesthe administrator notes to store

getTemplate()

Returns: String

Name of the template used to render this auction's page to bidders. Set to an empty string when the auction is created, meaning the website's default rendering is used.

setTemplate(String template)

Returns: void

Sets the template used to render the auction's page.

ParameterDescription
templatethe template name to use

getCreatedDate()

Returns: Date

Date and time the auction record was created, which is not the same as the date bidding opens.

setCreatedDate(Date createdDate)

Returns: void

Sets the date and time the auction record was created.

ParameterDescription
createdDatethe creation timestamp to record

getCreatedBy()

Returns: Profile

The administrator profile that created the auction. Never null, and lazily loaded.

setCreatedBy(Profile createdBy)

Returns: void

Sets the profile recorded as having created the auction.

ParameterDescription
createdBythe creating profile

isDeleted()

Returns: boolean

Whether the auction has been soft deleted. Deleted auctions are excluded from the standard lookups but the row and its bids are retained.

setDeleted(boolean deleted)

Returns: void

Marks the auction as soft deleted or restores it.

ParameterDescription
deletedtrue to soft delete the auction, false to restore it

getDeletedDate()

Returns: Date

Date and time the auction was soft deleted, or null if it has not been deleted.

setDeletedDate(Date deletedDate)

Returns: void

Sets the date and time the auction was soft deleted.

ParameterDescription
deletedDatethe deletion timestamp to record

getDeletedBy()

Returns: Profile

The profile that soft deleted the auction, or null if it has not been deleted.

setDeletedBy(Profile deletedBy)

Returns: void

Sets the profile recorded as having soft deleted the auction.

ParameterDescription
deletedBythe deleting profile

setAuctionStartDate(Date auctionStartDate)

Returns: void

Sets the date and time bidding opens.

ParameterDescription
auctionStartDatethe moment bidding opens

getAuctionStartDate()

Returns: Date

Date and time bidding opens. An auction only counts as active once this has passed and its status is ACTIVE.

setAuctionEndDate(Date auctionEndDate)

Returns: void

Sets the date and time bidding closes.

ParameterDescription
auctionEndDatethe moment bidding closes

getAuctionEndDate()

Returns: Date

Date and time bidding closes. Bids are no longer accepted after this, but the winner is not decided until the auction is processed.

setAuctionType(String auctionType)

Returns: void

Sets the bidding rules for this auction.

ParameterDescription
auctionTypethe auction type code, one of the HighestBidAuction, LowestUniqueBidAuction or HighestUniqueBidAuction constants

getAuctionType()

Returns: String

The bidding rules for this auction, as one of the short codes held in the HighestBidAuction (HBA), LowestUniqueBidAuction (LUB) and HighestUniqueBidAuction (HUB) constants.

setAuctionReserveValue(BigDecimal auctionReserveValue)

Returns: void

Sets the reserve, the minimum bid the auction must reach to be won.

ParameterDescription
auctionReserveValuethe reserve value to set

getAuctionReserveValue()

Returns: BigDecimal

The reserve, ie the minimum value bidding must reach for the item to sell. May be null, meaning there is no reserve.

setAuctionStartValue(BigDecimal auctionStartValue)

Returns: void

Sets the opening bid value for the auction.

ParameterDescription
auctionStartValuethe opening bid value to set

getAuctionStartValue()

Returns: BigDecimal

The opening bid value, ie where bidding starts. Defaults to 1 when the auction is created.

setBidFee(BigDecimal bidFee)

Returns: void

Sets the fee charged to a bidder for placing a bid.

ParameterDescription
bidFeethe fee charged per bid

getBidFee()

Returns: BigDecimal

Fee charged to the bidder each time they place a bid, for pay-to-bid auctions. Null means bidding is free.

setCurrentBidCount(Integer CurrentBidCount)

Returns: void

Sets the running count of bids placed on this auction.

ParameterDescription
CurrentBidCountthe number of bids placed so far

getCurrentBidCount()

Returns: Integer

Running count of bids placed on this auction, kept on the auction so a listing does not have to count the bid rows. Starts at zero when the auction is created.

setCurrentBidValue(BigDecimal CurrentBidValue)

Returns: void

Sets the cached value of the current bid.

ParameterDescription
CurrentBidValuethe value of the current bid

getCurrentBidValue()

Returns: BigDecimal

The value bidding has currently reached, cached on the auction so a listing does not have to read the bid rows. Null until the first bid is placed.

setIncrementValue(BigDecimal auctionIncrementValue)

Returns: void

Sets the minimum amount by which each new bid must beat the current one.

ParameterDescription
auctionIncrementValuethe minimum bid increment

getIncrementValue()

Returns: BigDecimal

Minimum amount by which a new bid must beat the current bid. Defaults to 1 when the auction is created.

getAuctionDescription()

Returns: String

Description of the item being auctioned, shown to bidders on the auction page. Also searched by the auction search.

setAuctionDescription(String auctionDescription)

Returns: void

Sets the description of the item being auctioned.

ParameterDescription
auctionDescriptionthe description shown to bidders

getWebsite()

Returns: Website

The website the auction is published on, which scopes both its URL and who can see it. Never null, and lazily loaded.

setWebsite(Website website)

Returns: void

Sets the website the auction is published on.

ParameterDescription
websitethe website to publish the auction on

getAuctionGroups()

Returns: List<AuctionGroup>

The groups the auction is restricted to, as join rows. An empty or null list means it is not restricted by group.

setAuctionGroups(List<AuctionGroup> auctionGroups)

Returns: void

Replaces the collection of group restrictions on the auction.

ParameterDescription
auctionGroupsthe group restriction rows to hold against the auction

addGroup(Group group)

Returns: void

Restricts the auction to an additional group, saving the join row immediately in the current session. Does nothing if the group is already linked.

ParameterDescription
groupthe group to grant access to the auction

getAuctionOrganisations()

Returns: List<AuctionOrganisation>

The organisations the auction is restricted to, as join rows. An empty or null list means it is not restricted by organisation.

setAuctionOrganisations(List<AuctionOrganisation> auctionOrganisations)

Returns: void

Replaces the collection of organisation restrictions on the auction.

ParameterDescription
auctionOrganisationsthe organisation restriction rows to hold against the auction

getAuctionProcessedDate()

Returns: Date

Date and time the auction was processed, ie when bidding was closed off and the winner decided. Null while the auction is still running or waiting to be processed.

setAuctionProcessedDate(Date auctionProcessedDate)

Returns: void

Sets the date and time the auction was processed and the winner decided.

ParameterDescription
auctionProcessedDatethe processing timestamp to record

getWinningBid()

Returns: AuctionBid

The bid that won the auction. Only set once the auction has been processed, and null before then or if nobody met the reserve.

setWinningBid(AuctionBid winningBid)

Returns: void

Records the bid that won the auction.

ParameterDescription
winningBidthe winning bid

getLeadingBid()

Returns: AuctionBid

The bid currently in front under this auction's bidding rules, which for a unique bid auction is not simply the highest. Null until the first bid is placed.

setLeadingBid(AuctionBid leadingBid)

Returns: void

Records which bid is currently in front.

ParameterDescription
leadingBidthe currently leading bid

getAuctionReward()

Returns: Reward

The reward granted to the winner, for auctions that pay out a reward rather than an order. Null if the auction is not linked to a reward, and lazily loaded.

setAuctionReward(Reward auctionReward)

Returns: void

Sets the reward granted to the winner of the auction.

ParameterDescription
auctionRewardthe reward to grant to the winner

getBranch()

Returns: Branch

The content repository branch holding this auction's pages and assets. Never null, and lazily loaded.

setBranch(Branch branch)

Returns: void

Sets the content repository branch holding the auction's pages and assets.

ParameterDescription
branchthe branch the auction's content lives on

getRelatedCart()

Returns: Cart

The cart created when an order was placed for this auction, linking the win through to fulfilment. Null until an order is placed, and lazily loaded.

setRelatedCart(Cart relatedCart)

Returns: void

Links the auction to the cart created when an order was placed for it.

ParameterDescription
relatedCartthe order raised for this auction

getImages()

Returns: List<AuctionImage>

Images of the item being auctioned. May be null if no images have been uploaded; getPrimaryImageId names the one to lead with.

setImages(List<AuctionImage> images)

Returns: void

Replaces the collection of images held against the auction.

ParameterDescription
imagesthe images to hold against the auction

addImage(String fname, String hash, String orientation)

Returns: AuctionImage

Adds an image to the auction and saves it in the current session. Blank file names and orientations are ignored rather than stored.

ParameterDescription
fnamethe file name to store the image under, ignored if blank
hashthe content hash used to fetch the image data from the blob store
orientationthe image's orientation, ignored if blank

image(String childName)

Returns: AuctionImage

Finds one of the auction's images by its file name.

ParameterDescription
childNamethe file name of the image to find

getPrimaryImageId()

Returns: Long

Identifier of the image to show as the auction's main picture, chosen from its images. Null if no primary image has been nominated.

setPrimaryImageId(Long primaryImageId)

Returns: void

Nominates which of the auction's images is the main picture.

ParameterDescription
primaryImageIdthe id of the image to use as the main picture

getStatus()

Returns: STATUS

Publication status of the auction: DRAFT while it is being set up, ACTIVE once it is live. Only ACTIVE auctions inside their bidding window are counted as running.

setStatus(STATUS status)

Returns: void

Sets the auction's publication status.

ParameterDescription
statusDRAFT to keep it hidden, ACTIVE to make it live

getSku()

Returns: String

Product SKU code of the item being auctioned, for tying the auction back to stock. Free text of up to 1000 characters and not validated against the product catalogue.

setSku(String sku)

Returns: void

Sets the SKU code of the item being auctioned.

ParameterDescription
skuthe item's SKU code

getAuctionSet()

Returns: AuctionSet

The set this auction is part of, used to run a group of auctions together as one event. Null if the auction stands alone.

setAuctionSet(AuctionSet auctionSet)

Returns: void

Puts the auction into an auction set, or removes it from one by passing null.

ParameterDescription
auctionSetthe set this auction belongs to

findBid(Long id)

Returns: AuctionBid

Loads a bid by id and checks it actually belongs to this auction, so a bid id from elsewhere cannot be read through this auction. Reads from the database.

ParameterDescription
idthe id of the bid to load

rowId()

Returns: Long

The row's identifier as used by the generic relational reporting layer, which is the same value as getId.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.