@AttributeAccessor( "org.hibernate.test.annotations.access.AttributeAccessorTest$BasicAttributeAccessor" ) public String getName() { return name; }
@AttributeAccessor( "org.hibernate.envers.test.integration.accesstype.AttributeAccessorTest$BasicAttributeAccessor" ) public String getName() { return name; }
@Entity(name = "animals") @AttributeAccessor( "field" ) @SuppressWarnings( "serial" ) static class Animal implements Serializable { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) public Long id; public String name; public Animal() { } public Animal( final String name ) { this.name = name; } @Override public String toString() { return "Animal [id=" + id + ", name=" + name + "]"; } }
@Entity(name = "persons") @AttributeAccessor("field") @SuppressWarnings( "serial" ) static class Person implements Serializable { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) public Long id; public String name; @OneToMany( cascade = CascadeType.ALL ) public Set<Animal> animals; public Person() { } public Person( final String name, final Set<Animal> animals ) { this.name = name; this.animals = animals; } @Override public String toString() { return "Person [id=" + id + ", name=" + name + ", animals=" + animals + "]"; } }
@Override @javax.persistence.Lob @AttributeAccessor("field") @ElementCollection(fetch = FetchType.EAGER) @JoinTable(name = "HTextFlowTargetContentHistory", joinColumns = @JoinColumn(name = "text_flow_target_history_id") ) @OrderColumn(name = "pos", nullable = false) @ListIndexBase @Column(name = "content", nullable = false) public List<String> getContents() { return contents; }
@NotEmpty @javax.persistence.Lob @AttributeAccessor("field") @ElementCollection(fetch = FetchType.EAGER) @JoinTable(name = "HTextFlowContentHistory", joinColumns = @JoinColumn( name = "text_flow_history_id")) @OrderColumn(name = "pos", nullable = false) @ListIndexBase @Column(name = "content", nullable = false) @Override public List<String> getContents() { return contents; }
@ManyToOne @JoinColumn(name = "document_id", insertable = false, updatable = false, nullable = false) @NaturalId @AttributeAccessor("field") @Field(analyze = Analyze.NO) @FieldBridge(impl = ContainingWorkspaceBridge.class) public HDocument getDocument() { return document; }