@Entity(name = "Task") @BatchSize(size = 5) public static class Task { @Id private long id; public Task() { } }
@BatchSize( size = 32 ) public class BatchLoadableEntity { private Integer id;
@Entity(name = "SpecialPerson") public static class SpecialPerson extends Person { @Column(name = "special") private String special; @OneToMany(orphanRemoval = true, cascade = { CascadeType.PERSIST, CascadeType.REMOVE }) @JoinColumn(name = "PERSONID", referencedColumnName = "ID", nullable = false, updatable = false) @BatchSize(size = 100) private Set<Address> addresses = new HashSet<Address>(); public void addAddress(Address address) { this.addresses.add( address ); } }
@Entity @IdClass(BId.class) @BatchSize(size = 1000) public class B {
@Column(name="FIELD_VALUE") @CollectionTable(name="BLC_OFFER_INFO_FIELDS", joinColumns=@JoinColumn(name="OFFER_INFO_FIELDS_ID")) @BatchSize(size = 50) protected Map<String, String> fieldValues = new HashMap<String, String>();
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blCMSElements") @OrderBy("fieldOrder") @BatchSize(size = 20) protected List<FieldEnumerationItem> enumerationItems;
@Entity @Table(name = "EmployeeGroup") @BatchSize(size = 1000) private static class EmployeeGroup { @Id
@Entity(name = "Person") @Access(AccessType.FIELD) @Table(name = "PERSON") @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) @DiscriminatorColumn(name = "CLASSINDICATOR", discriminatorType = DiscriminatorType.INTEGER) @DiscriminatorValue("1") public static class Person { @Id @Column(name = "ID", nullable = false) @SequenceGenerator(name = "ID_2", sequenceName = "PERSON_SEQ") @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ID_2") private Long id; @OneToMany(orphanRemoval = true, cascade = { CascadeType.PERSIST, CascadeType.REMOVE }) @JoinColumn(name = "PERSONID", referencedColumnName = "ID", nullable = false, updatable = false) @BatchSize(size = 100) private Set<Address> addresses = new HashSet<Address>(); public void addAddress(Address address) { this.addresses.add( address ); } }
@Entity(name = "Person") @Access(AccessType.FIELD) @Table(name = "PERSON") @Inheritance(strategy = InheritanceType.JOINED) @DiscriminatorColumn(name = "CLASSINDICATOR", discriminatorType = DiscriminatorType.INTEGER) @DiscriminatorValue("1") public static class Person { @Id @Column(name = "ID", nullable = false) @SequenceGenerator(name = "ID_2", sequenceName = "PERSON_SEQ") @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ID_2") private Long id; @OneToMany(orphanRemoval = true, cascade = { CascadeType.PERSIST, CascadeType.REMOVE }) @JoinColumn(name = "PERSONID", referencedColumnName = "ID", nullable = false, updatable = false) @BatchSize(size = 100) private Set<Address> addresses = new HashSet<Address>(); public void addAddress(Address address) { this.addresses.add( address ); } }
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blCMSElements") @OrderBy("groupOrder") @BatchSize(size = 20) protected List<StructuredContentFieldGroupXref> fieldGroupXrefs = new ArrayList<StructuredContentFieldGroupXref>();
@Entity(name = "Parent") @Audited public static class Parent { @Id @GeneratedValue private Integer id; @OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER) @OrderBy("index1, index2 desc") @AuditMappedBy(mappedBy = "parent", positionMappedBy = "index1") @Fetch(FetchMode.SELECT) @BatchSize(size = 100) private List<Child> children = new ArrayList<>(); public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public List<Child> getChildren() { return children; } public void setChildren(List<Child> children) { this.children = children; } }
@Entity(name = "Parent") @Audited public static class Parent { @Id @GeneratedValue private Integer id; @Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED) @ManyToMany(mappedBy = "parents", cascade = CascadeType.ALL, fetch = FetchType.EAGER) @OrderBy("index1, index2 desc") @Fetch(FetchMode.SELECT) @BatchSize(size = 100) private List<Child> children = new ArrayList<>(); public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public List<Child> getChildren() { return children; } public void setChildren(List<Child> children) { this.children = children; } }
@JoinTable(name = "BLC_ADMIN_USER_ROLE_XREF", joinColumns = @JoinColumn(name = "ADMIN_ROLE_ID", referencedColumnName = "ADMIN_ROLE_ID"), inverseJoinColumns = @JoinColumn(name = "ADMIN_USER_ID", referencedColumnName = "ADMIN_USER_ID")) @Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blAdminSecurityVolatile") @BatchSize(size = 50) protected Set<AdminUser> allUsers = new HashSet<AdminUser>(); @JoinTable(name = "BLC_ADMIN_ROLE_PERMISSION_XREF", joinColumns = @JoinColumn(name = "ADMIN_ROLE_ID", referencedColumnName = "ADMIN_ROLE_ID"), inverseJoinColumns = @JoinColumn(name = "ADMIN_PERMISSION_ID", referencedColumnName = "ADMIN_PERMISSION_ID")) @Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blAdminSecurityVolatile") @BatchSize(size = 50) @AdminPresentationCollection(friendlyName = "permissionListTitle", group = GroupName.Permissions, order = FieldOrder.PERMISSIONS,
@Entity(name = "Parent") @Audited public static class Parent { @Id @GeneratedValue private Integer id; @ManyToMany(mappedBy = "parents", cascade = CascadeType.ALL, fetch = FetchType.EAGER) @OrderBy("index1, index2 desc") @AuditMappedBy(mappedBy = "parents", positionMappedBy = "index1") @Fetch(FetchMode.SELECT) @BatchSize(size = 100) private List<Child> children = new ArrayList<>(); public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public List<Child> getChildren() { return children; } public void setChildren(List<Child> children) { this.children = children; } }
@BatchSize(size = 50) protected List<AdminSection> sections = new ArrayList<AdminSection>();
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blCMSElements") @OrderBy("groupOrder") @BatchSize(size = 20) @ClonePolicyCollectionOverride protected List<PageTemplateFieldGroupXref> fieldGroups = new ArrayList<PageTemplateFieldGroupXref>();
@BatchSize(size = 50) @AdminPresentationCollection(friendlyName = "IndexFieldImpl_fieldTypes", order = 1000) protected List<IndexFieldType> fieldTypes = new ArrayList<>();
@Cascade(value = { org.hibernate.annotations.CascadeType.MERGE, org.hibernate.annotations.CascadeType.PERSIST }) @Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "blSiteElements") @BatchSize(size = 50) protected List<SiteCatalogXref> siteXrefs = new ArrayList<SiteCatalogXref>();
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blCMSElements") @OrderBy("fieldOrder") @BatchSize(size = 20) @ClonePolicyCollectionOverride @ClonePolicyArchive
@BatchSize(size = 5) @org.hibernate.annotations.Entity( selectBeforeUpdate = true,