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


Java Index类代码示例

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


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

示例1: updatePropertyDefinition

import org.hibernate.annotations.Index; //导入依赖的package包/类
private PropertyDefinition updatePropertyDefinition(PropertyDefinition definition, AnnotatedElement object) {
    if (object.isAnnotationPresent(Lob.class)) {
        definition.setLob(true);
    }

    if (object.isAnnotationPresent(Enumerated.class)) {
        definition.setEnumerated(true);
    }

    //todo implement also lookup for @Table indexes
    if (object.isAnnotationPresent(Index.class)) {
        definition.setIndexed(true);
    }

    return definition;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:17,代码来源:ClassDefinitionParser.java

示例2: getStartIndex

import org.hibernate.annotations.Index; //导入依赖的package包/类
@Index(name = "index_start_index")
public Integer getStartIndex() {
	if (this.getArtifactType() == Type.Document) {
		startIndex = 0;
	} else if (startIndex == null) {
		int _previousArtifactsLength = 0;
		Artifact previous = this.getPreviousArtifact();
		while (previous != null) {
			_previousArtifactsLength += previous.getContent().length() + 1;
			previous = previous.getPreviousArtifact();
		}
		if(getParentArtifact()!=null)
			startIndex = parentArtifact.getStartIndex()
					+ _previousArtifactsLength + 1;
		
	}
	return startIndex;
}
 
开发者ID:ehsane,项目名称:rainbownlp,代码行数:19,代码来源:Artifact.java

示例3: getWordIndex

import org.hibernate.annotations.Index; //导入依赖的package包/类
/**
 * starts from 0
 * @return
 */
@Index(name = "index_word_index")
public Integer getWordIndex() {
	if(wordOffset==null)
	{
		if(artifactType==Type.Word)
		{
		
			wordOffset=0;
			Artifact preWord = getPreviousArtifact();
			while(preWord!=null)
			{
				wordOffset++;
				preWord = preWord.getPreviousArtifact();
				previousArtifact = null;
			}
		}
		
	}
	return wordOffset;
}
 
开发者ID:ehsane,项目名称:rainbownlp,代码行数:25,代码来源:Artifact.java

示例4: getBundle

import org.hibernate.annotations.Index; //导入依赖的package包/类
@JoinColumn(nullable = false)
@ManyToOne(fetch = FetchType.LAZY)
@Index(name = "bundleIndex")
public LanguageBundle getBundle()
{
	return bundle;
}
 
开发者ID:equella,项目名称:Equella,代码行数:8,代码来源:LanguageString.java

示例5: addIndexes

import org.hibernate.annotations.Index; //导入依赖的package包/类
public static void addIndexes(Table hibTable, Index[] indexes, Mappings mappings) {
	for (Index index : indexes) {
		//no need to handle inSecondPass here since it is only called from EntityBinder
		mappings.addSecondPass(
				new IndexOrUniqueKeySecondPass( hibTable, index.name(), index.columnNames(), mappings )
		);
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:TableBinder.java

示例6: buildJpaIndexHolder

import org.hibernate.annotations.Index; //导入依赖的package包/类
public static List<JPAIndexHolder> buildJpaIndexHolder(javax.persistence.Index[] indexes){
	List<JPAIndexHolder> holders = new ArrayList<JPAIndexHolder>( indexes.length );
	for(javax.persistence.Index index : indexes){
		holders.add( new JPAIndexHolder( index ) );
	}
	return holders;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:TableBinder.java

示例7: getName

import org.hibernate.annotations.Index; //导入依赖的package包/类
/**
 * IMPORTANT: Keep SearchPropertyType.SEARCH_FIELD or JUnit tests will fail.
 * @return
 */
@MetaSearch(order = 1, searchType = SearchPropertyType.SEARCH_FIELD)
@Column(length = 120, nullable = false, unique = true)
@Index(name = "Name")
public String getName() {
	return m_name;
}
 
开发者ID:fjalvingh,项目名称:domui,代码行数:11,代码来源:Artist.java

示例8: getAncestorOid

import org.hibernate.annotations.Index; //导入依赖的package包/类
@Id
@Index(name = "iAncestor")
@Column(name = "ancestor_oid", length = RUtil.COLUMN_LENGTH_OID, insertable = false, updatable = false)
@NotQueryable
public String getAncestorOid() {
    if (ancestorOid == null && ancestor.getOid() != null) {
        ancestorOid = ancestor.getOid();
    }
    return ancestorOid;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:11,代码来源:ROrgClosure.java

示例9: getDescendantOid

import org.hibernate.annotations.Index; //导入依赖的package包/类
@Id
@Index(name = "iDescendant")
@Column(name = "descendant_oid", length = RUtil.COLUMN_LENGTH_OID, insertable = false, updatable = false)
@NotQueryable
public String getDescendantOid() {
    if (descendantOid == null && descendant.getOid() != null) {
        descendantOid = descendant.getOid();
    }
    return descendantOid;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:11,代码来源:ROrgClosure.java

示例10: getExecutionDate

import org.hibernate.annotations.Index; //导入依赖的package包/类
/**
 * <p>Getter for the field <code>executionDate</code>.</p>
 *
 * @return a {@link java.sql.Timestamp} object.
 */
@Basic
@Column(name = "EXECUTION_DATE")
@Index(name="executionDateIndex")
public Timestamp getExecutionDate()
{
    return executionDate;
}
 
开发者ID:strator-dev,项目名称:greenpepper,代码行数:13,代码来源:Execution.java

示例11: getStreet

import org.hibernate.annotations.Index; //导入依赖的package包/类
/**
    * The GisFeature, the Alternate name refers to
    * 
    * @return the GisFeature, the AlternateName refers to
    */
   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(nullable = false, name = "street")
   @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
   @Index(name = "Alternatenameosmnameindex")
   public OpenStreetMap getStreet() {
return street;
   }
 
开发者ID:gisgraphy,项目名称:gisgraphy,代码行数:13,代码来源:AlternateOsmName.java

示例12: getParent

import org.hibernate.annotations.Index; //导入依赖的package包/类
/**
    * Returns The parent Adm in the Adm tree structure
    * 
    * @return The parent Adm (with lower Level)
    */
   @ManyToOne(fetch = FetchType.EAGER)
   @JoinColumn(nullable = true, name = "parent")
   @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
   @Index(name = "admadmindex")
   public Adm getParent() {
return parent;
   }
 
开发者ID:gisgraphy,项目名称:gisgraphy,代码行数:13,代码来源:Adm.java

示例13: getGisFeature

import org.hibernate.annotations.Index; //导入依赖的package包/类
/**
    * @return the gisFeature associated to this zip code
    */
   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(nullable = true, name = "gisFeature")
   @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
   @Index(name = "zipcodefeatureidindex")
   public GisFeature getGisFeature() {
return this.gisFeature;
   }
 
开发者ID:gisgraphy,项目名称:gisgraphy,代码行数:11,代码来源:ZipCode.java

示例14: getStreet

import org.hibernate.annotations.Index; //导入依赖的package包/类
/**
 * @return the street associated to this house number
 */
 @ManyToOne(fetch = FetchType.LAZY)//TODO HN
 @JoinColumn(nullable = false, name = "street")
 @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
 @Index(name = "housenumberstreetindex")
public OpenStreetMap getStreet() {
	return street;
}
 
开发者ID:gisgraphy,项目名称:gisgraphy,代码行数:11,代码来源:HouseNumber.java

示例15: getAdm

import org.hibernate.annotations.Index; //导入依赖的package包/类
/**
    * @return The Adm with the higher Level that this GisFeature is linked to
    *         (the deeper in the Adm tree). See Important Notes for admXcode
    *         for {@link GisFeature}
    */
   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(name = "adm", unique = false, referencedColumnName = "id", nullable = true)
   @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
   @Index(name = "gisfeatureadmindex")
   public Adm getAdm() {
return adm;
   }
 
开发者ID:gisgraphy,项目名称:gisgraphy,代码行数:13,代码来源:GisFeature.java


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