當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。