@Table(name = "user") @Include(rootLevel = true) @SharePermission
@Table(name = "user") @Include(rootLevel = true) @SharePermission
@Table(name = "comment") @Include @SharePermission public class Comment { private long id;
@Table(name = "comment") @Include @SharePermission public class Comment { private long id;
@Entity @Include(rootLevel = true, type = "tractor") @SharePermission public class Tractor extends BaseId implements Device { @Getter @Setter private int horsepower; }
@Entity @Include(rootLevel = true, type = "noShareBid") @SharePermission(sharable = false) public class NoShareBiDirectional extends BaseId { private NoShareBiDirectional other; @OneToOne(fetch = FetchType.LAZY) public NoShareBiDirectional getOther() { return other; } public void setOther(NoShareBiDirectional other) { this.other = other; } }
@Entity @Include(rootLevel = true, type = "property") @SharePermission public class Property extends BaseId { @Setter private Device myStuff; @Any(metaColumn = @Column(name = "property_type")) @AnyMetaDef(idType = "long", metaType = "string", metaValues = { @MetaValue(targetEntity = example.Tractor.class, value = "tractor"), @MetaValue(targetEntity = example.Smartphone.class, value = "smartphone") }) @JoinColumn(name = "property_id") @ToOne public Device getMyStuff() { return myStuff; } }
/** * A shareable bean. */ @Entity @SharePermission @Table(name = "shareable") @Include(rootLevel = true, type = "shareable") public class Shareable extends BaseId { private Container container; @ManyToOne(fetch = FetchType.LAZY) public Container getContainer() { return container; } public void setContainer(Container container) { this.container = container; } }
/** * Bean with Map of Enums. */ @Entity @Table(name = "color_shape") @Include(rootLevel = true) @SharePermission public class MapColorShape extends BaseId { private Map<Color, Shape> colorShapeMap = new LinkedHashMap<>(); @ElementCollection @MapKeyColumn(name = "color") @Column(name = "shape") public Map<Color, Shape> getColorShapeMap() { return colorShapeMap; } public void setColorShapeMap(Map<Color, Shape> colorShapeMap) { this.colorShapeMap = colorShapeMap; } }
@Entity @Include(rootLevel = true, type = "smartphone") @SharePermission public class Smartphone extends BaseId implements Device { @Getter @Setter private String type; @ComputedAttribute @Transient public String getOperatingSystem() { String os; switch (type) { case "android": os = "some dessert"; break; case "iphone": os = "iOS"; break; default: os = "who cares?"; break; } return os; } }
@Entity @Include(rootLevel = true, type = "chapter") @SharePermission
@Table(name = "author") @Include(rootLevel = true) @SharePermission @Paginate @Audit(action = Audit.Action.CREATE,
@Table(name = "editor") @Include(rootLevel = true) @SharePermission @Audit(action = Audit.Action.CREATE, operation = 10,
@SharePermission @Table(name = "anotherFilterExpressionCheckObj") @ReadPermission(expression = "checkActsLikeFilter")
@Table(name = "filterExpressionCheckObj") @Include(rootLevel = true) @SharePermission @ReadPermission(expression = "checkLE OR deny all") //ReadPermission for object id <= 2 public class FilterExpressionCheckObj extends BaseId {
@SharePermission @Table(name = "book") @Include(rootLevel = true)
@UpdatePermission(expression = "allow all") @DeletePermission(expression = "allow all") @SharePermission public class AuditEntityInverse extends BaseId { private List<AuditEntity> entities;
@DeletePermission(expression = "allow all") @UpdatePermission(expression = "allow all") @SharePermission public class AuditEntity extends BaseId { private AuditEntity otherEntity;
@SharePermission @ReadPermission(expression = "negativeChildId AND negativeIntegerUser AND initCheckOp AND initCheckFilter") @Include(rootLevel = true, type = "child")
@UpdatePermission(expression = "parentInitCheck OR allow all OR deny all") @DeletePermission(expression = "parentInitCheckOp OR allow all OR deny all") @SharePermission @Include(rootLevel = true, type = "parent") // optional here because class has this name @Paginate(maxLimit = 100000)