An image belonging to a blog article, created when the article is approved from the meta fields in its content file. The image bytes are not held here, only the hash of the stored file, so displaying one means reading the hash from the blob store. The orientation field says which shape the image is cropped for, using the ORIENTATION constants on this class; a null orientation marks the primary image. When rendering for a given orientation the preferred image is used if there is one, otherwise the primary, otherwise any image on the article.
Group: Database Entities
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| article | BlogArticle | The article this image belongs to. Never null. |
| id | long | Database identifier for this image, assigned when it is first saved. |
| imageHash | 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. |
| name | String | File name of the image as it appeared in the article's content, used to identify it within the article. Never null. |
| orientation | String | The shape this image is cropped for, one of the ORIENTATION constants on this class, being square, vertical or horizontal. Null means this is the primary image, which is used when no image matches the wanted shape. |
Methods
getId()
Returns: long
Database identifier for this image, assigned when it is first saved.
getName()
Returns: String
File name of the image as it appeared in the article's content, used to identify it within the article. Never null.
getArticle()
Returns: BlogArticle
The article this image belongs to. 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.
getOrientation()
Returns: String
The shape this image is cropped for, one of the ORIENTATION constants on this class, being square, vertical or horizontal. Null means this is the primary image, which is used when no image matches the wanted shape.