当前位置: 首页>>代码示例>>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;未经允许,请勿转载。