本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: getBundle
import org.hibernate.annotations.Index; //导入依赖的package包/类
@JoinColumn(nullable = false)
@ManyToOne(fetch = FetchType.LAZY)
@Index(name = "bundleIndex")
public LanguageBundle getBundle()
{
return bundle;
}
示例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 )
);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}