Java 类org.hibernate.annotations.Index 实例源码

项目:engerek    文件:ClassDefinitionParser.java   
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;
}
项目:midpoint    文件:ClassDefinitionParser.java   
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;
}
项目:rainbownlp    文件:Artifact.java   
@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;
}
项目:rainbownlp    文件:Artifact.java   
/**
 * 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;
}
项目:midpoint    文件:ClassDefinitionParser.java   
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;
}
项目:Equella    文件:LanguageString.java   
@JoinColumn(nullable = false)
@ManyToOne(fetch = FetchType.LAZY)
@Index(name = "bundleIndex")
public LanguageBundle getBundle()
{
    return bundle;
}
项目:lams    文件:TableBinder.java   
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 )
        );
    }
}
项目:lams    文件:TableBinder.java   
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;
}
项目:domui    文件:Artist.java   
/**
 * 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;
}
项目:engerek    文件:ROrgClosure.java   
@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;
}
项目:engerek    文件:ROrgClosure.java   
@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;
}
项目:greenpepper    文件:Execution.java   
/**
 * <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;
}
项目:gisgraphy    文件:AlternateOsmName.java   
/**
    * 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;
   }
项目:gisgraphy    文件:Adm.java   
/**
    * 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;
   }
项目:gisgraphy    文件:ZipCode.java   
/**
    * @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;
   }
项目:gisgraphy    文件:HouseNumber.java   
/**
 * @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;
}
项目:gisgraphy    文件:GisFeature.java   
/**
    * @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;
   }
项目:gisgraphy    文件:AlternateName.java   
/**
    * The GisFeature, the Alternate name refers to
    * 
    * @return the GisFeature, the AlternateName refers to
    */
   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(nullable = false, name = "gisFeature")
   @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
   @Index(name = "AlternatenameGisFeatureindex")
   public GisFeature getGisFeature() {
return gisFeature;
   }
项目:testcube-server    文件:TestPlan.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTPLANS_PRODUCTS")
@Index(name = "IDX_TESTPLANS_PRODUCTS")
public Product getProduct() {
    return (Product) super.getProduct();
}
项目:testcube-server    文件:TestPlan.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@JoinColumn(updatable = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTPLANS_USERS")
@Index(name = "IDX_TESTPLANS_USERS")
public User getCreatedBy() {
    return (User) super.getCreatedBy();
}
项目:testcube-server    文件:TestPlan.java   
@Override
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTPLANS_PLANTYPES")
@Index(name = "FK_TESTPLANS_PLANTYPES")
public PlanType getPlanType() {
    return (PlanType) super.getPlanType();
}
项目:testcube-server    文件:TestPlan.java   
@Override
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTPLANS_VERSIONS")
@Index(name = "FK_TESTPLANS_VERSIONS")
public Version getProductVersion() {
    return (Version) super.getProductVersion();
}
项目:testcube-server    文件:Version.java   
/**
 * Version name is not unique in order to allow multiple names for different products.
 */
@Override
@Column(length = FIELD_NAME_LENGTH, nullable = false)
@Index(name = "IDX_NAME")
public String getName() {
    return super.getName();
}
项目:testcube-server    文件:Version.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_VERSIONS_PRODUCTS")
@Index(name = "IDX_VERSIONS_PRODUCTS")
public Product getProduct() {
    return (Product) super.getProduct();
}
项目:testcube-server    文件:Environment.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_ENVIRONMENTS_PRODUCTS")
@Index(name = "IDX_ENVIRONMENTS_PRODUCTS")
public Product getProduct() {
    return (Product) super.getProduct();
}
项目:testcube-server    文件:Component.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_COMPONENTS_PRODUCTS")
@Index(name = "IDX_COMPONENTS_PRODUCTS")
public Product getProduct() {
    return (Product) super.getProduct();
}
项目:testcube-server    文件:Component.java   
@Override
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_COMPONENTS_USERS")
@Index(name = "IDX_COMPONENTS_USERS")
public User getDefaultAssignee() {
    return (User) super.getDefaultAssignee();
}
项目:testcube-server    文件:Category.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_CATEGORIES_PRODUCTS")
@Index(name = "IDX_CATEGORIES_PRODUCTS")
public Product getProduct() {
    return (Product) super.getProduct();
}
项目:testcube-server    文件:Build.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_BUILDS_PRODUCTS")
@Index(name = "IDX_BUILDS_PRODUCTS")
public Product getProduct() {
    return (Product) super.getProduct();
}
项目:testcube-server    文件:TestCase.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTCASES_TESTPLAN")
@Index(name = "IDX_TESTCASES_TESTPLAN")
public TestPlan getTestPlan() {
    return (TestPlan) super.getTestPlan();
}
项目:testcube-server    文件:TestCase.java   
@Override
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_ASSIGNEE_USERS")
@Index(name = "IDX_ASSIGNEE_USERS")
public User getAssignee() {
    return (User) super.getAssignee();
}
项目:testcube-server    文件:TestCase.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@JoinColumn(updatable = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_CREATEDBY_USERS")
@Index(name = "IDX_CREATEDBY_USERS")
public User getCreatedBy() {
    return (User) super.getCreatedBy();
}
项目:testcube-server    文件:TestCase.java   
@Override
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTCASES_PRIORITY")
@Index(name = "IDX_TESTCASES_PRIORITY")
public CasePriority getPriority() {
    return (CasePriority) super.getPriority();
}
项目:testcube-server    文件:TestCase.java   
@Override
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTCASES_CATEGORY")
@Index(name = "IDX_TESTCASES_CATEGORY")
public Category getCategory() {
    return (Category) super.getCategory();
}
项目:testcube-server    文件:TestCase.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTCASES_STATUS")
@Index(name = "IDX_TESTCASES_STATUS")
public CaseStatus getStatus() {
    return (CaseStatus) super.getStatus();
}
项目:testcube-server    文件:TestRun.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_TESTRUNS_TESTPLAN")
@Index(name = "IDX_TESTRUNS_TESTPLAN")
public TestPlan getTestPlan() {
    return (TestPlan) super.getTestPlan();
}
项目:testcube-server    文件:TestRun.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@JoinColumn(updatable = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_CREATEDBY_USERS")
@Index(name = "IDX_CREATEDBY_USERS")
public User getCreatedBy() {
    return (User) super.getCreatedBy();
}
项目:testcube-server    文件:TestRun.java   
@Override
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_ASSIGNEE_USERS")
@Index(name = "IDX_ASSIGNEE_USERS")
public User getAssignee() {
    return (User) super.getAssignee();
}
项目:testcube-server    文件:TestRun.java   
@Override
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_PRODUCT_VERSION")
@Index(name = "IDX_PRODUCT_VERSION")
public Version getProductVersion() {
    return (Version) super.getProductVersion();
}
项目:testcube-server    文件:TestRun.java   
@Override
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@ForeignKey(name = "FK_PRODUCT_BUILD")
@Index(name = "IDX_PRODUCT_BUILD")
public Build getProductBuild() {
    return (Build) super.getProductBuild();
}