@LocalizedField private String title; @LocalizedField private String description;
@PluralForm("news") public class Article implements Entity, HasAddons, HasModel, HasFeaturedImage @Index @NotNull @Size(min = 1) private String slug; @LocalizedField @Index @NotNull public String title; @Index private Boolean published = null;
@Index @NotNull @Size(min = 1) private String slug; @Index private Boolean published; @LocalizedField @Index @NotNull private String title; @LocalizedField @Index private String content;
@Index public class Product implements Entity, HasAddons, HasModel, HasFeaturedImage, Taxable, Localized, HasType, Child @DoNotIndex private UUID id; @DoNotIndex private UUID parentId = null; @DoNotIndex private UUID tenantId = null; @LocalizedField @NotNull @Size(min = 1) private String title; @LocalizedField private transient String description; @DoNotIndex private UUID featuredImageId; @DoNotIndex private Optional<String> model = Optional.absent(); @DoNotIndex private Optional<String> type = Optional.absent(); @DoNotIndex
@DoNotIndex private UUID tenantId = null; @Index @NotNull @Size(min = 1)
@Index @NotNull @Size(min = 1)
@DoNotIndex private UUID id; @DoNotIndex private UUID parentId; private String featureSlug; @LocalizedField @NotNull @Size(min = 1)
@DoNotIndex private UUID id; @DoNotIndex private UUID parentId;
protected String getPluralForm(E entity) { if (entity.getClass().isAnnotationPresent(PluralForm.class)) { return entity.getClass().getAnnotation(PluralForm.class).value(); } return Noun.pluralOf(getEntityName(entity)); }
@Index @NotNull @Size(min = 1) private String slug; @LocalizedField @Index @NotNull private String title; @LocalizedField @Index private String description;
@DoNotIndex private UUID id;