| //class @MappedSuperclass public abstract class ProjectSystemEntity<ID extends Serializable> extends CommonExtractorEntity<ID> { @Transient private static final long serialVersionUID = 1L; @EmbeddedId @FieldBridge(impl = testeBridge.class) @AttributeOverrides( { @AttributeOverride( name = "project", column = @Column(name = "project_id", insertable = false) ), @AttributeOverride( name = "system_id", column = @Column(name = "system_id", insertable = false) ), @AttributeOverride( name = "cid", column = @Column(name = "cid", columnDefinition = "bigserial", insertable = false, updatable = false, nullable = false) ) } ) private ProjectSystemEntityPk<Long> scope; @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "cid", columnDefinition = "bigserial", insertable = false, updatable = false, nullable = false) private Long cid; @ManyToOne @JoinColumn(name = "system_id", insertable = false, updatable = false) protected System system; @Column(columnDefinition = "bigserial", insertable = false, updatable = false, nullable = false) @GeneratedValue(strategy = GenerationType.IDENTITY) @DocumentId protected Long id; //class abstract @Entity @JsonIgnoreProperties( {"hibernateLazyInitializer", "handler"} ) @Table @Indexed @AnalyzerDef(name = "customAnalyzer", tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class), filters = { @TokenFilterDef(factory = LowerCaseFilterFactory.class), @TokenFilterDef(factory = ASCIIFoldingFilterFactory.class), // @TokenFilterDef(factory = MappingCharFilterFactory.class), @TokenFilterDef(factory = SnowballPorterFilterFactory.class, params = { @Parameter(name = "language", value = "English") } ) }) public class Medico extends ProjectSystemEntity<Long> { public Medico() { } /*-------------------------------------------------------------------
- ATTRIBUTES
-------------------------------------------------------------------/ // @Id // @GeneratedValue(strategy = GenerationType.IDENTITY) // @Basic(fetch = FetchType.LAZY) // private Long id;
@Column(length = 255) @Field//(index = Index.YES, analyze = Analyze.YES)//(index = Index.YES, store = Store.YES, analyze=Analyze.NO) @Analyzer(definition = "customAnalyzer") // @DocumentId private String nome; |