Places one product in one category, forming the many to many link between products and the catalogue tree. A product is in a category only if one of these rows exists, so a product in three categories has three rows and removing it from a category deletes the row rather than changing the product. The link also records who filed the product there and when. Both sides hold the link in their productInCategorys list, so create and delete through the helpers on this class rather than adding to those lists directly, and changes are audited.

Group: Database Entities

Implements: Serializable, Auditable


Properties

PropertyReturnsDescription
auditOrgOrganisationThe organisation which audit records for this link are filed against, which is the organisation owning the category.
categoryCategoryThe category the product is filed in. Never null, and it is the category which carries the owning organisation.
createdByProfileThe profile which filed this product into the category. Can be null when the link was created by the system rather than by a person.
createdDateDateWhen the product was filed into the category. Stored as a date only, so the time of day is not kept. Never null.
idlongUnique database identifier for this product to category link.
productProductThe product filed in the category. Never null.

Methods

getId() · setId(long id) · getCategory() · setCategory(Category category) · getProduct() · setProduct(Product product) · getCreatedBy() · setCreatedBy(Profile createdBy) · getCreatedDate() · setCreatedDate(Date createdDate) · getAuditOrg()

getId()

Returns: long

Unique database identifier for this product to category link.

setId(long id)

Returns: void

Sets the database identifier. The database assigns this when the link is first saved, so it is not normally set by hand.

ParameterDescription
idthe primary key to use

getCategory()

Returns: Category

The category the product is filed in. Never null, and it is the category which carries the owning organisation.

setCategory(Category category)

Returns: void

Sets the category the product is filed in.

ParameterDescription
categorythe category the product is in

getProduct()

Returns: Product

The product filed in the category. Never null.

setProduct(Product product)

Returns: void

Sets the product filed in the category.

ParameterDescription
productthe product in the category

getCreatedBy()

Returns: Profile

The profile which filed this product into the category. Can be null when the link was created by the system rather than by a person.

setCreatedBy(Profile createdBy)

Returns: void

Sets the profile recorded as having filed the product into the category.

ParameterDescription
createdBythe profile which created the link

getCreatedDate()

Returns: Date

When the product was filed into the category. Stored as a date only, so the time of day is not kept. Never null.

setCreatedDate(Date createdDate)

Returns: void

Sets the date the product was filed into the category.

ParameterDescription
createdDatethe date the link was created

getAuditOrg()

Returns: Organisation

The organisation which audit records for this link are filed against, which is the organisation owning the category.

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