本文整理匯總了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;
}