public class ItemImageLanguageDAO extends ItemImage {
private static final long serialVersionUID = -4387572002213977743L;
public static ItemImageLanguage load(String siteId, Long imageId) throws SecurityException, Exception {
EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
ItemImageLanguage itemImageLanguage = (ItemImageLanguage) em.find(ItemImageLanguage.class, imageId);
if (!itemImageLanguage.getItemLanguage().getItem().getSiteId().equals(siteId)) {
throw new SecurityException();
}
return itemImageLanguage;
}