当前位置: 首页>>代码示例>>Java>>正文


Java IndexedEmbedded类代码示例

本文整理汇总了Java中org.hibernate.search.annotations.IndexedEmbedded的典型用法代码示例。如果您正苦于以下问题:Java IndexedEmbedded类的具体用法?Java IndexedEmbedded怎么用?Java IndexedEmbedded使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IndexedEmbedded类属于org.hibernate.search.annotations包,在下文中一共展示了IndexedEmbedded类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getIndexedFields

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
/**
 *
 * @param entity
 *          entity to inspect
 * @param prefix
 *          optional prefix for fieldNames (@see
 *          {@link #getIndexedEmbeddedFields(Class)}
 * @param declaredFields
 * @return String array containing all fieldNames of the given entity which
 *         are annotated with {@link Field} to mark them indexable.
 */
private List<String> getIndexedFields(Class<?> entity, Optional<String> prefix) {
  List<String> fieldNames = new ArrayList<>();

  for (Class<?> klass = entity; klass != null; klass = klass.getSuperclass()) {
    for (java.lang.reflect.Field field : klass.getDeclaredFields()) {
      if (field.getAnnotation(Field.class) != null) {
        fieldNames.add(prefix.isPresent() ? prefix.get() + "." + field.getName() : field.getName());
      } else if (field.getAnnotation(IndexedEmbedded.class) != null) {
        fieldNames.addAll(getIndexedFields(field.getType(),
            Optional.of((prefix.isPresent() ? prefix.get() + "." : "") + field.getName())));
      }
    }
  }

  return fieldNames;
}
 
开发者ID:BandwidthOnDemand,项目名称:bandwidth-on-demand,代码行数:28,代码来源:FullTextSearchContext.java

示例2: getAllObjects

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
@IndexedEmbedded(prefix = ALL_OBJECTS_PREFIX, includePaths = {HistoryValue.REFERENCE})
public Set<HistoryValue> getAllObjects() {
	Set<HistoryValue> result = Sets.newLinkedHashSet();
	for (HistoryValue value : new HistoryValue[] {mainObject, object1, object2, object3, object4}) {
		if (value != null) {
			result.add(value);
		}
	}
	return result;
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:11,代码来源:AbstractHistoryLog.java

示例3: getDisease

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
/**
 * @return disease disease to which given key perf. index belongs
 */
@ManyToOne(fetch = FetchType.LAZY, optional=false)
@JoinColumn(name = "disease_id", nullable = false)
@IndexedEmbedded
public Disease getDisease() {
	return this.disease;
}
 
开发者ID:MobileManAG,项目名称:Project-H-Backend,代码行数:10,代码来源:KeyPerformanceIndicatorType.java

示例4: getPzn

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
/**
 * @return pznNumber
 */
@IndexedEmbedded
@Embedded()
@AttributeOverrides(value={
       @AttributeOverride(name="number", [email protected](name="pzn", length = 7, nullable = true, unique = true))
   })
public PznBarcode getPzn() {
	return this.pznBarcode;
}
 
开发者ID:MobileManAG,项目名称:Project-H-Backend,代码行数:12,代码来源:Medication.java

示例5: getPlace

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
@ContainedIn
@ManyToOne(cascade = CascadeType.ALL)
@JoinTable(name = "Place_Sorcerer")
@UpdateInfo(tableName = "Place_Sorcerer", updateTableName = "PlaceSorcererUpdatesHsearch", updateTableIdColumn = "updateid", updateTableEventTypeColumn = "eventCase", idInfos = {
		@IdInfo(entity = Place.class, columns = @IdColumn(column = "Place_ID", updateTableColumn = "placefk", columnType = ColumnType.INTEGER)),
		@IdInfo(entity = Sorcerer.class, columns = @IdColumn(column = "Sorcerer_ID", updateTableColumn = "sorcererfk", columnType = ColumnType.INTEGER))
})
@IndexedEmbedded(includeEmbeddedObjectId = true)
public Place getPlace() {
	return place;
}
 
开发者ID:Hotware,项目名称:Hibernate-Search-GenericJPA,代码行数:12,代码来源:Sorcerer.java

示例6: getVendors

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
@IndexedEmbedded(includeEmbeddedObjectId = true, targetElement = Vendor.class)
@ManyToMany
@JoinTable(name = "Game_Vendor")
@UpdateInfo(tableName = "Game_Vendor", idInfos = {
		@IdInfo(entity = Game.class, columns = @IdColumn(column = "Game_ID", columnType = ColumnType.LONG)),
		@IdInfo(entity = Vendor.class, columns = @IdColumn(column = "vendors_ID", columnType = ColumnType.LONG))
})
public List<Vendor> getVendors() {
	return vendors;
}
 
开发者ID:Hotware,项目名称:Hibernate-Search-GenericJPA,代码行数:11,代码来源:Game.java

示例7: getName

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
/**
 * @return user's name
 */
@Embedded
@IndexedEmbedded
public Name getName() {
	return this.name;
}
 
开发者ID:MobileManAG,项目名称:Project-H-Backend,代码行数:9,代码来源:User.java

示例8: getAddress

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
@Embedded
@IndexedEmbedded
public Address getAddress() {
    return address;
}
 
开发者ID:SMVBE,项目名称:ldadmin,代码行数:6,代码来源:User.java

示例9: getTransactions

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
@IndexedEmbedded 
public List<Transaction> getTransactions() {
 return this.transactions;
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:5,代码来源:Leg.java

示例10: getProducer

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
/**
 * @return the producer
 */
   @Embedded
   @IndexedEmbedded
public Producer getProducer() {
	return producer;
}
 
开发者ID:dlwhitehurst,项目名称:musicrecital,代码行数:9,代码来源:MusicProgram.java

示例11: getAuthors

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
@IndexedEmbedded
@ManyToMany
public Set<Author> getAuthors()
{
    return authors;
}
 
开发者ID:windup,项目名称:windup-rulesets,代码行数:7,代码来源:Book.java

示例12: getSorcerers

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
@IndexedEmbedded(depth = 3, includeEmbeddedObjectId = true)
@ContainedIn
@OneToMany(cascade = CascadeType.ALL, mappedBy = "place")
public Set<Sorcerer> getSorcerers() {
	return sorcerers;
}
 
开发者ID:Hotware,项目名称:Hibernate-Search-GenericJPA,代码行数:7,代码来源:Place.java

示例13: getEmbedded

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
@IndexedEmbedded
public Embedded getEmbedded() {
	return embedded;
}
 
开发者ID:Hotware,项目名称:Hibernate-Search-GenericJPA,代码行数:5,代码来源:SearchFactoryTest.java

示例14: getEmbedded2

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
@IndexedEmbedded
public List<Embedded2> getEmbedded2() {
	return embedded2;
}
 
开发者ID:Hotware,项目名称:Hibernate-Search-GenericJPA,代码行数:5,代码来源:SearchFactoryTest.java

示例15: getSorcerers

import org.hibernate.search.annotations.IndexedEmbedded; //导入依赖的package包/类
/**
 * @return the sorcerers
 */
@IndexedEmbedded(includeEmbeddedObjectId = true)
public Set<Sorcerer> getSorcerers() {
	return sorcerers;
}
 
开发者ID:Hotware,项目名称:Hibernate-Search-GenericJPA,代码行数:8,代码来源:Place.java


注:本文中的org.hibernate.search.annotations.IndexedEmbedded类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。