Java 类javax.persistence.Index 实例源码

项目:lams    文件:JPAIndexHolder.java   
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 );
}
项目:lams    文件:JPAOverriddenAnnotationReader.java   
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 );
}
项目:mycore    文件:MCRUser.java   
/**
 * @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;
}
项目:requery    文件:EntityType.java   
@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[]{});
}
项目:scheduling    文件:TaskData.java   
@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;
}
项目:scheduling    文件:TaskData.java   
@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;
}
项目:openyu-mix    文件:WuxingPlayLogImpl.java   
@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;
}
项目:openyu-mix    文件:WuxingPlayLogImpl.java   
@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;
}
项目:openyu-mix    文件:WuxingPutLogImpl.java   
@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;
}
项目:openyu-mix    文件:WuxingPutLogImpl.java   
@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;
}
项目:openyu-mix    文件:WuxingFamousLogImpl.java   
@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;
}
项目:openyu-mix    文件:WuxingFamousLogImpl.java   
@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;
}
项目:openyu-mix    文件:TrainLogImpl.java   
@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;
}
项目:openyu-mix    文件:TrainLogImpl.java   
@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;
}
项目:openyu-mix    文件:CoreConnectLogImpl.java   
@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;
}
项目:openyu-mix    文件:RolePoImpl.java   
@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;
}
项目:saos    文件:SupremeCourtJudgment.java   
@ManyToMany(fetch = FetchType.LAZY, cascade={CascadeType.REFRESH})
@JoinTable(name = "supreme_court_judgment_chamber",
        indexes = { @Index(name = "sc_chamber_fk_judgment_index", columnList = "fk_judgment") },
        joinColumns = {@JoinColumn(name = "fk_judgment", nullable = false, updatable = true) }, 
        inverseJoinColumns = {@JoinColumn(name = "fk_chamber", nullable = false, updatable = true) })
private List<SupremeCourtChamber> getScChambers_() {
    return scChambers;
}
项目:openyu-mix    文件:RolePoImpl.java   
@Column(name = "treasure_info", length = 1024)
@Type(type = "org.openyu.mix.treasure.po.usertype.TreasureInfoUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = TreasureInfoBridge.class)
public TreasureInfo getTreasureInfo() {
    return treasureInfo;
}
项目:openyu-mix    文件:RolePoImpl.java   
@Column(name = "train_info", length = 512)
@Type(type = "org.openyu.mix.train.po.usertype.TrainInfoUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = TrainInfoBridge.class)
public TrainInfo getTrainInfo() {
    return trainInfo;
}
项目:openyu-mix    文件:RolePoImpl.java   
@Column(name = "wuxing_info", length = 1024)
@Type(type = "org.openyu.mix.wuxing.po.usertype.WuxingInfoUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = WuxingInfoBridge.class)
public WuxingInfo getWuxingInfo() {
    return wuxingInfo;
}
项目:openyu-mix    文件:RoleGoldLogImpl.java   
@Column(name = "action_type", length = 13)
@Type(type = "org.openyu.mix.role.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;
}
项目:openyu-mix    文件:RoleGoldLogImpl.java   
@Column(name = "gold_type", length = 13)
@Type(type = "org.openyu.mix.role.po.usertype.GoldTypeUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = GoldTypeBridge.class)
public GoldType getGoldType() {
    return goldType;
}
项目:openyu-mix    文件:ManorLandLogImpl.java   
@Column(name = "action_type", length = 13)
@Type(type = "org.openyu.mix.manor.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;
}
项目:openyu-mix    文件:ManorLandLogImpl.java   
@Column(name = "land", length = 1024)
@Type(type = "org.openyu.mix.item.po.usertype.ItemUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = ItemBridge.class)
public Land getLand() {
    return land;
}
项目:openyu-mix    文件:ManorSeedLogImpl.java   
@Column(name = "culture_type", length = 13)
@Type(type = "org.openyu.mix.manor.po.usertype.CultureTypeUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = CultureTypeBridge.class)
public CultureType getCultureType() {
    return cultureType;
}
项目:saos    文件:Judgment.java   
@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@JoinTable(name = "assigned_judgment_keyword",
        indexes = {@Index(name = "assigned_keyword_fk_judgment_index", columnList = "fk_judgment")},
        joinColumns = {@JoinColumn(name = "fk_judgment", nullable = false, updatable = false) }, 
        inverseJoinColumns = {@JoinColumn(name = "fk_keyword", nullable = false, updatable = false) })
@OrderBy("phrase")
private List<JudgmentKeyword> getKeywords_() {
    return keywords;
}
项目:openyu-mix    文件:ManorSeedLogImpl.java   
@Column(name = "seed", length = 1024)
@Type(type = "org.openyu.mix.item.po.usertype.ItemUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = ItemBridge.class)
public Seed getSeed() {
    return seed;
}
项目:openyu-mix    文件:ManorSeedLogImpl.java   
@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;
}
项目:openyu-mix    文件:ItemEnhanceLogImpl.java   
@Column(name = "action_type", length = 13)
@Type(type = "org.openyu.mix.item.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;
}
项目:openyu-mix    文件:ItemEnhanceLogImpl.java   
@Column(name = "item", length = 1024)
@Type(type = "org.openyu.mix.item.po.usertype.ItemUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = ItemBridge.class)
public Item getItem() {
    return item;
}
项目:openyu-mix    文件:ItemEnhanceLogImpl.java   
@Column(name = "spend_item", length = 1024)
@Type(type = "org.openyu.mix.item.po.usertype.ItemUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = ItemBridge.class)
public Item getSpendItem() {
    return spendItem;
}
项目:openyu-mix    文件:SasangPutLogImpl.java   
@Column(name = "put_type", length = 13)
@Type(type = "org.openyu.mix.sasang.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;
}
项目:openyu-mix    文件:SasangPutLogImpl.java   
@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;
}
项目:openyu-mix    文件:SasangFamousLogImpl.java   
@Column(name = "play_type", length = 13)
@Type(type = "org.openyu.mix.sasang.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;
}
项目:openyu-mix    文件:SasangFamousLogImpl.java   
@Column(name = "outcome", length = 255)
@Type(type = "org.openyu.mix.sasang.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;
}
项目:openyu-mix    文件:SasangPlayLogImpl.java   
@Column(name = "play_type", length = 13)
@Type(type = "org.openyu.mix.sasang.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;
}
项目:openyu-mix    文件:SasangPlayLogImpl.java   
@Column(name = "outcome", length = 255)
@Type(type = "org.openyu.mix.sasang.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;
}
项目:openyu-mix    文件:SasangPlayLogImpl.java   
@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;
}
项目:openyu-mix    文件:AccountCoinLogImpl.java   
@Column(name = "action_type", length = 13)
@Type(type = "org.openyu.mix.account.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;
}
项目:openyu-mix    文件:AccountCoinLogImpl.java   
@Column(name = "coin_type", length = 13)
@Type(type = "org.openyu.mix.account.po.usertype.CoinTypeUserType")
@Field(store = Store.YES, index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.NO)
@FieldBridge(impl = CoinTypeBridge.class)
public CoinType getCoinType() {
    return coinType;
}