/** * @param locator * the locator * @param columnTransformer * the column transformer * * @since 2.0.0 */ public ColumnTransformerMetadataImpl(AbstractLocator locator, ColumnTransformer columnTransformer) { super(); this.locator = locator; this.read = columnTransformer.read(); this.write = columnTransformer.write(); }
/** * @param locator * the java locator * @param annotation * the annotation * * @since 2.0.0 */ public IndexMetadataImpl(AbstractLocator locator, Index annotation) { super(); this.locator = locator; this.name = annotation.name(); this.columnNames = annotation.columns(); this.table = annotation.table(); }
/** * @param locator * the java locator * @param annotation * the annotation * @param name * field column name * * @since 2.0.0 */ public IndexMetadataImpl(AbstractLocator locator, Index annotation, String name) { super(); this.locator = locator; this.name = annotation.name(); this.columnNames = new String[] { name }; this.table = annotation.table(); }
/** * The Class Department. */ @Entity @Table(name = "department_") public class Department { @ManyToOne Company company; @OneToMany @Index(name = "_index") List<Employee> employees; @Id int id; String name; }
/** * Handles the index definitions of the entity. * * @param metadata * the metadata * @param parsed * the set of annotations parsed * * @since 2.0.0 */ private void handleIndexes(EntityMetadata metadata, Set<Class<? extends Annotation>> parsed) { final Indexes indexes = this.getClazz().getAnnotation(Indexes.class); if ((indexes != null) && (indexes.value().length > 0)) { parsed.add(Indexes.class); for (final Index index : indexes.value()) { this.indexes.add(new IndexMetadataImpl(this.getLocator(), index)); } } else { final Index index = this.getClazz().getAnnotation(Index.class); parsed.add(Index.class); if (index != null) { this.indexes.add(new IndexMetadataImpl(this.getLocator(), index)); } } }
/** * @param locator * the java locator * @param annotation * the annotation * * @since 2.0.0 */ public IndexMetadataImpl(AbstractLocator locator, Index annotation) { super(); this.locator = locator; this.name = annotation.name(); this.columnNames = annotation.columns(); this.table = annotation.table(); }
/** * @param locator * the locator * @param columnTransformer * the column transformer * * @since 2.0.0 */ public ColumnTransformerMetadataImpl(AbstractLocator locator, ColumnTransformer columnTransformer) { super(); this.locator = locator; this.read = columnTransformer.read(); this.write = columnTransformer.write(); }
/** * @param locator * the java locator * @param annotation * the annotation * @param name * field column name * * @since 2.0.0 */ public IndexMetadataImpl(AbstractLocator locator, Index annotation, String name) { super(); this.locator = locator; this.name = annotation.name(); this.columnNames = new String[] { name }; this.table = annotation.table(); }
@Index(name = "_index") public List<Department> departments;
/** * Handles the index definitions of the entity. * * @param metadata * the metadata * @param parsed * the set of annotations parsed * * @since 2.0.0 */ private void handleIndexes(EntityMetadata metadata, Set<Class<? extends Annotation>> parsed) { final Indexes indexes = this.getClazz().getAnnotation(Indexes.class); if ((indexes != null) && (indexes.value().length > 0)) { parsed.add(Indexes.class); for (final Index index : indexes.value()) { this.indexes.add(new IndexMetadataImpl(this.getLocator(), index)); } } else { final Index index = this.getClazz().getAnnotation(Index.class); parsed.add(Index.class); if (index != null) { this.indexes.add(new IndexMetadataImpl(this.getLocator(), index)); } } }
/** * @param locator * the java locator * @param annotation * the annotation * * @since 2.0.0 */ public IndexMetadataImpl(AbstractLocator locator, Index annotation) { super(); this.locator = locator; this.name = annotation.name(); this.columnNames = annotation.columns(); this.table = annotation.table(); }
/** * @param locator * the locator * @param columnTransformer * the column transformer * * @since 2.0.0 */ public ColumnTransformerMetadataImpl(AbstractLocator locator, ColumnTransformer columnTransformer) { super(); this.locator = locator; this.read = columnTransformer.read(); this.write = columnTransformer.write(); }
/** * @param locator * the java locator * @param annotation * the annotation * @param name * field column name * * @since 2.0.0 */ public IndexMetadataImpl(AbstractLocator locator, Index annotation, String name) { super(); this.locator = locator; this.name = annotation.name(); this.columnNames = new String[] { name }; this.table = annotation.table(); }
@Index(name = "_index") public List<Department> departments;
/** * Handles the index definitions of the entity. * * @param metadata * the metadata * @param parsed * the set of annotations parsed * * @since 2.0.0 */ private void handleIndexes(EntityMetadata metadata, Set<Class<? extends Annotation>> parsed) { final Indexes indexes = this.getClazz().getAnnotation(Indexes.class); if ((indexes != null) && (indexes.value().length > 0)) { parsed.add(Indexes.class); for (final Index index : indexes.value()) { this.indexes.add(new IndexMetadataImpl(this.getLocator(), index)); } } else { final Index index = this.getClazz().getAnnotation(Index.class); parsed.add(Index.class); if (index != null) { this.indexes.add(new IndexMetadataImpl(this.getLocator(), index)); } } }
/** * The Class Department. */ @Entity @Table(name="department_") public class Department { @ManyToOne Company company; @OneToMany @Index(name = "_index") List<Employee> employees; @Id int id; String name; }