當前位置: 首頁>>代碼示例>>Java>>正文


Java Index類代碼示例

本文整理匯總了Java中javax.persistence.Index的典型用法代碼示例。如果您正苦於以下問題:Java Index類的具體用法?Java Index怎麽用?Java Index使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Index類屬於javax.persistence包,在下文中一共展示了Index類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: JPAIndexHolder

import javax.persistence.Index; //導入依賴的package包/類
public JPAIndexHolder(Index index) {
	StringTokenizer tokenizer = new StringTokenizer( index.columnList(), "," );
	List<String> tmp = new ArrayList<String>();
	while ( tokenizer.hasMoreElements() ) {
		tmp.add( tokenizer.nextToken().trim() );
	}
	this.name = index.name();
	this.columns = new String[tmp.size()];
	this.ordering = new String[tmp.size()];
	this.unique = index.unique();
	initializeColumns( columns, ordering, tmp );
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:13,代碼來源:JPAIndexHolder.java

示例2: buildIndex

import javax.persistence.Index; //導入依賴的package包/類
private static void buildIndex(AnnotationDescriptor annotation, Element element){
	List indexElementList = element.elements( "index" );
	Index[] indexes = new Index[indexElementList.size()];
	for(int i=0;i<indexElementList.size();i++){
		Element subelement = (Element)indexElementList.get( i );
		AnnotationDescriptor indexAnn = new AnnotationDescriptor( Index.class );
		copyStringAttribute( indexAnn, subelement, "name", false );
		copyStringAttribute( indexAnn, subelement, "column-list", true );
		copyBooleanAttribute( indexAnn, subelement, "unique" );
		indexes[i] = AnnotationFactory.create( indexAnn );
	}
	annotation.setValue( "indexes", indexes );
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:14,代碼來源:JPAOverriddenAnnotationReader.java

示例3: getAttributes

import javax.persistence.Index; //導入依賴的package包/類
/**
 * @return the attributes
 */
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "MCRUserAttr",
    joinColumns = @JoinColumn(name = "id"),
    indexes = { @Index(name = "MCRUserAttributes", columnList = "name, value"),
        @Index(name = "MCRUserValues", columnList = "value") })
@MapKeyColumn(name = "name", length = 128)
@Column(name = "value", length = 255)
public Map<String, String> getAttributes() {
    return attributes;
}
 
開發者ID:MyCoRe-Org,項目名稱:mycore,代碼行數:14,代碼來源:MCRUser.java

示例4: tableUniqueIndexes

import javax.persistence.Index; //導入依賴的package包/類
@Override
public String[] tableUniqueIndexes() {
    if (annotationOf(javax.persistence.Table.class).isPresent()) {
        Index[] indexes = annotationOf(javax.persistence.Table.class)
                .map(javax.persistence.Table::indexes)
                .orElse(new Index[0]);
        Set<String> names = Stream.of(indexes).filter(Index::unique)
                .map(Index::name).collect(Collectors.toSet());
        return names.toArray(new String[names.size()]);
    }
    return annotationOf(Table.class).map(Table::uniqueIndexes).orElse(new String[]{});
}
 
開發者ID:requery,項目名稱:requery,代碼行數:13,代碼來源:EntityType.java

示例5: getDependentTasks

import javax.persistence.Index; //導入依賴的package包/類
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "TASK_DATA_DEPENDENCIES", joinColumns = { @JoinColumn(name = "JOB_ID", referencedColumnName = "TASK_ID_JOB"),
                                                                  @JoinColumn(name = "TASK_ID", referencedColumnName = "TASK_ID_TASK") }, indexes = { @Index(name = "TASK_DATA_DEP_JOB_ID", columnList = "JOB_ID"),
                                                                                                                                                      @Index(name = "TASK_DATA_DEP_TASK_ID", columnList = "TASK_ID"), })
@BatchSize(size = 100)
public List<DBTaskId> getDependentTasks() {
    return dependentTasks;
}
 
開發者ID:ow2-proactive,項目名稱:scheduling,代碼行數:9,代碼來源:TaskData.java

示例6: getJoinedBranches

import javax.persistence.Index; //導入依賴的package包/類
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "TASK_DATA_JOINED_BRANCHES", joinColumns = { @JoinColumn(name = "JOB_ID", referencedColumnName = "TASK_ID_JOB"),
                                                                     @JoinColumn(name = "TASK_ID", referencedColumnName = "TASK_ID_TASK") }, indexes = { @Index(name = "TASK_DATA_JB_JOB_ID", columnList = "JOB_ID"),
                                                                                                                                                         @Index(name = "TASK_DATA_JB_TASK_ID", columnList = "TASK_ID"), })
@BatchSize(size = 100)
public List<DBTaskId> getJoinedBranches() {
    return joinedBranches;
}
 
開發者ID:ow2-proactive,項目名稱:scheduling,代碼行數:9,代碼來源:TaskData.java

示例7: getOutcome

import javax.persistence.Index; //導入依賴的package包/類
@Column(name = "outcome", length = 255)
@Type(type = "org.openyu.mix.wuxing.po.usertype.OutcomeUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = OutcomeBridge.class)
public Outcome getOutcome() {
	return outcome;
}
 
開發者ID:mixaceh,項目名稱:openyu-mix,代碼行數:8,代碼來源:WuxingPlayLogImpl.java

示例8: getSpendItems

import javax.persistence.Index; //導入依賴的package包/類
@Column(name = "spend_items", length = 1024)
@Type(type = "org.openyu.mix.item.po.usertype.ItemListUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = ItemListBridge.class)
public List<Item> getSpendItems() {
	return spendItems;
}
 
開發者ID:mixaceh,項目名稱:openyu-mix,代碼行數:8,代碼來源:WuxingPlayLogImpl.java

示例9: getPutType

import javax.persistence.Index; //導入依賴的package包/類
@Column(name = "put_type", length = 13)
@Type(type = "org.openyu.mix.wuxing.po.usertype.PutTypeUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = PutTypeBridge.class)
public PutType getPutType() {
	return putType;
}
 
開發者ID:mixaceh,項目名稱:openyu-mix,代碼行數:8,代碼來源:WuxingPutLogImpl.java

示例10: getAwards

import javax.persistence.Index; //導入依賴的package包/類
@Column(name = "awards", length = 1024)
@Type(type = "org.openyu.commons.entity.usertype.StringIntegerUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = StringIntegerBridge.class)
public Map<String, Integer> getAwards() {
	return awards;
}
 
開發者ID:mixaceh,項目名稱:openyu-mix,代碼行數:8,代碼來源:WuxingPutLogImpl.java

示例11: getPlayType

import javax.persistence.Index; //導入依賴的package包/類
@Column(name = "play_type", length = 13)
@Type(type = "org.openyu.mix.wuxing.po.usertype.PlayTypeUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = PlayTypeBridge.class)
public PlayType getPlayType()
{
	return playType;
}
 
開發者ID:mixaceh,項目名稱:openyu-mix,代碼行數:9,代碼來源:WuxingFamousLogImpl.java

示例12: getOutcome

import javax.persistence.Index; //導入依賴的package包/類
@Column(name = "outcome", length = 255)
@Type(type = "org.openyu.mix.wuxing.po.usertype.OutcomeUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = OutcomeBridge.class)
public Outcome getOutcome()
{
	return outcome;
}
 
開發者ID:mixaceh,項目名稱:openyu-mix,代碼行數:9,代碼來源:WuxingFamousLogImpl.java

示例13: getActionType

import javax.persistence.Index; //導入依賴的package包/類
@Column(name = "action_type", length = 13)
@Type(type = "org.openyu.mix.train.po.usertype.ActionTypeUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = ActionTypeBridge.class)
public ActionType getActionType() {
	return actionType;
}
 
開發者ID:mixaceh,項目名稱:openyu-mix,代碼行數:8,代碼來源:TrainLogImpl.java

示例14: getConnectAction

import javax.persistence.Index; //導入依賴的package包/類
@Column(name = "connect_action", length = 13)
@Type(type = "org.openyu.mix.core.po.usertype.ConnectActionUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = ConnectActionBridge.class)
public ConnectAction getConnectAction() {
	return connectAction;
}
 
開發者ID:mixaceh,項目名稱:openyu-mix,代碼行數:8,代碼來源:CoreConnectLogImpl.java

示例15: getBagInfo

import javax.persistence.Index; //導入依賴的package包/類
@Column(name = "bag_info", length = 8192)
@Type(type = "org.openyu.mix.role.po.usertype.BagInfoUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = BagInfoBridge.class)
public BagInfo getBagInfo() {
	return bagInfo;
}
 
開發者ID:mixaceh,項目名稱:openyu-mix,代碼行數:8,代碼來源:RolePoImpl.java


注:本文中的javax.persistence.Index類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。