A single image file that can be attached to a catalogue item, most commonly a product through ProductImage. The bytes are not held on the row, only the hash of the stored file, so showing the image means reading that hash from the blob store. The ordinal orders the images within the item, so an item's gallery and its main image are decided by ordinal rather than by insertion order. Deleting the owning ProductImage deletes the ItemImage with it.

Group: Database Entities

Implements: Serializable


Properties

PropertyReturnsDescription
idlongDatabase identifier for this image, assigned when it is first saved.
imageHashStringHash of the image file in the blob store. The bytes are not on this row, so use the hash to read the image from the content repository. Never null.
nameStringFile name of the image, used to identify it and as the name it is served under. Never null.
ordinalIntegerPosition of this image within the item's images, used to order a gallery and to pick the main image. Null if no position has been set, so check for null before comparing.

Methods

getId()

Returns: long

Database identifier for this image, assigned when it is first saved.

getOrdinal()

Returns: Integer

Position of this image within the item's images, used to order a gallery and to pick the main image. Null if no position has been set, so check for null before comparing.

getName()

Returns: String

File name of the image, used to identify it and as the name it is served under. Never null.

getImageHash()

Returns: String

Hash of the image file in the blob store. The bytes are not on this row, so use the hash to read the image from the content repository. Never null.

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