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; }
@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; }
/** * 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; }
@JoinColumn(nullable = false) @ManyToOne(fetch = FetchType.LAZY) @Index(name = "bundleIndex") public LanguageBundle getBundle() { return bundle; }
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 ) ); } }
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; }
/** * 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; }
@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; }
@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; }
/** * <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; }
/** * 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; }
/** * 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; }
/** * @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; }
/** * @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; }
/** * @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; }
/** * 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; }
@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(); }
@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(); }
@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(); }
@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(); }
/** * 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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }
@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(); }