Java 类javax.persistence.CollectionTable 实例源码

项目:lams    文件:JPAOverriddenAnnotationReader.java   
private void getCollectionTable(List<Annotation> annotationList, Element element, XMLContext.Default defaults) {
    Element subelement = element != null ? element.element( "collection-table" ) : null;
    if ( subelement != null ) {
        AnnotationDescriptor annotation = new AnnotationDescriptor( CollectionTable.class );
        copyStringAttribute( annotation, subelement, "name", false );
        copyStringAttribute( annotation, subelement, "catalog", false );
        if ( StringHelper.isNotEmpty( defaults.getCatalog() )
                && StringHelper.isEmpty( (String) annotation.valueOf( "catalog" ) ) ) {
            annotation.setValue( "catalog", defaults.getCatalog() );
        }
        copyStringAttribute( annotation, subelement, "schema", false );
        if ( StringHelper.isNotEmpty( defaults.getSchema() )
                && StringHelper.isEmpty( (String) annotation.valueOf( "schema" ) ) ) {
            annotation.setValue( "schema", defaults.getSchema() );
        }
        JoinColumn[] joinColumns = getJoinColumns( subelement, false );
        if ( joinColumns.length > 0 ) {
            annotation.setValue( "joinColumns", joinColumns );
        }
        buildUniqueConstraints( annotation, subelement );
        buildIndex( annotation, subelement );
        annotationList.add( AnnotationFactory.create( annotation ) );
    }
}
项目:org.fastnate    文件:PluralProperty.java   
/**
 * Builds the name of the table of the association for the given field.
 *
 * @param attribute
 *            the inspected field
 * @param override
 *            contains optional override options
 * @param joinTable
 *            the optional join table
 * @param collectionTable
 *            the optional metadata of the table
 * @param defaultTableName
 *            the default name for the table
 * @return the table name
 */
protected static String buildTableName(final AttributeAccessor attribute, final AssociationOverride override,
        final JoinTable joinTable, final CollectionTable collectionTable, final String defaultTableName) {
    if (override != null) {
        final JoinTable joinTableOverride = override.joinTable();
        if (joinTableOverride != null && joinTableOverride.name().length() > 0) {
            return joinTableOverride.name();
        }
    }
    if (joinTable != null && joinTable.name().length() > 0) {
        return joinTable.name();
    }
    if (collectionTable != null && collectionTable.name().length() > 0) {
        return collectionTable.name();
    }
    return defaultTableName;
}
项目:metacat    文件:Info.java   
@ElementCollection
@MapKeyColumn(name = "parameters_idx")
@Column(name = "parameters_elt")
@CollectionTable(name = "info_parameters")
public Map<String, String> getParameters() {
    return parameters;
}
项目: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;
}
项目:mycore    文件:MCRJob.java   
/**
 * Returns all set parameters of the job.
 * 
 * @return the job parameters
 */
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "MCRJobParameter", joinColumns = @JoinColumn(name = "jobID"))
@MapKeyColumn(name = "paramKey", length = 128)
@Column(name = "paramValue", length = 255)
public Map<String, String> getParameters() {
    return parameters;
}
项目:mycore    文件:MCRCategoryImpl.java   
@Override
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "MCRCategoryLabels",
    joinColumns = @JoinColumn(name = "category"),
    uniqueConstraints = {
        @UniqueConstraint(columnNames = { "category", "lang" }) })
public Set<MCRLabel> getLabels() {
    return super.getLabels();
}
项目:my-paper    文件:Attribute.java   
/**
 * 获取可选项
 * 
 * @return 可选项
 */
@JsonProperty
@NotEmpty
@ElementCollection
@CollectionTable(name = "xx_attribute_option")
public List<String> getOptions() {
    return options;
}
项目:my-paper    文件:PluginConfig.java   
/**
 * 获取属性
 * 
 * @return 属性
 */
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "xx_plugin_config_attribute")
@MapKeyColumn(name = "name", length = 100)
public Map<String, String> getAttributes() {
    return attributes;
}
项目:my-paper    文件:Product.java   
/**
 * 获取商品图片
 * 
 * @return 商品图片
 */
@Valid
@ElementCollection
@CollectionTable(name = "xx_product_product_image")
public List<ProductImage> getProductImages() {
    return productImages;
}
项目:bookManager    文件:UserPrincipal.java   
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "UserPrincipal_Authority", joinColumns = {
        @JoinColumn(referencedColumnName = "Id", name = "UserId") })
@Override
public Set<UserAuthority> getAuthorities() {
    return this.authorities;
}
项目:NewsBotIRC    文件:DBEntry.java   
@Override
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name="Categories")
public List<String> getCategories()
{
    return this.categories;
}
项目:LSChatServer    文件:LSPayload.java   
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "User_Message_Attr", joinColumns = {
        @JoinColumn(referencedColumnName = "Id", name = "PayloadId") })
@Column(name = "Value")
@MapKeyColumn(name = "Key")
public Map<String, String> getAttr() {
    return attr;
}
项目:LSChatServer    文件:User.java   
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "User_Associate", joinColumns = {
        @JoinColumn(referencedColumnName = "Id", name = "UserId") })
@Column(name = "name")
public Set<String> getAssociates() {
    return associates;
}
项目:Project-H-Backend    文件:PatientKeyPerformanceIndicatorValidation.java   
/**
 * @return data
 */
@ElementCollection(fetch=FetchType.LAZY)
   @CollectionTable(name = "patient_kpi_validation_data", joinColumns = @JoinColumn(name = "patient_kpi_id"))
   @ForeignKey(name="fk_patient_kpi_data_pat_kpi_id")
   @OrderColumn(name="idx")
public List<BigDecimal> getData() {
    return this.data;
}
项目:Project-H-Backend    文件:QuestionType.java   
/**
 * @return tags
 */
@ElementCollection
@CollectionTable(name="question_type_tag")
@Column(name="tag", length=255, nullable = false)
@JoinColumn(name="question_type_id", nullable=false)
@ForeignKey(name = "fk_qtt_question_type_id")
public List<String> getTags() {
    return this.tags;
}
项目:blaze-storage    文件:BucketObjectVersion.java   
@ElementCollection
@CollectionTable(name = "bucket_object_version_tags", 
    foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "bucket_object_version_tags_fk_bucket_object_version"),
    joinColumns = {
        @JoinColumn(name = "bucket_id", referencedColumnName = "bucket_id"),
        @JoinColumn(name = "object_name", referencedColumnName = "object_name"),
        @JoinColumn(name = "version_uuid", referencedColumnName = "version_uuid")
})
@MapKeyColumn(name = "tag", nullable = false)
@Column(name = "value", nullable = false)
public Map<String, String> getTags() {
    return tags;
}
项目:blaze-storage    文件:Account.java   
@ElementCollection
@CollectionTable(name = "account_tags", 
    foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "account_tags_fk_user_account"),
    joinColumns = {
        @JoinColumn(name = "account_id", referencedColumnName = "id")
})
@MapKeyColumn(name = "tag", nullable = false)
@Column(name = "value", nullable = false)
public Map<String, String> getTags() {
    return tags;
}
项目:blaze-storage    文件:Storage.java   
@ElementCollection
@CollectionTable(name = "storage_tags", 
    foreignKey = @ForeignKey(name = RdbmsConstants.PREFIX + "storage_tags_fk_storage"),
    joinColumns = {
        @JoinColumn(name = "owner_id", referencedColumnName = "owner_id"),
        @JoinColumn(name = "storage_name", referencedColumnName = "name")
})
@MapKeyColumn(name = "tag", nullable = false)
@Column(name = "value", nullable = false)
public Map<String, String> getTags() {
    return tags;
}
项目: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;
}
项目:cloudconductor-server    文件:EServerOptions.java   
/**
 * @return the disallowUninstall
 */
@ElementCollection
@CollectionTable(name = "serveroptions_disallowuninstall", joinColumns = @JoinColumn(name = "id"), schema = "cloudconductor")
@Column(name = "disallowuninstall")
public Set<String> getDisallowUninstall() {
    return this.disallowUninstall;
}
项目:saos    文件:Judge.java   
@Enumerated(EnumType.STRING)
@ElementCollection
@CollectionTable(name="judge_role", joinColumns = @JoinColumn(name = "fk_judge"),
    indexes = @Index(name = "judge_role_fk_judge_index", columnList = "fk_judge"))
@Column(name="role")
public List<JudgeRole> getSpecialRoles() {
    return specialRoles;
}
项目:saos    文件:Judgment.java   
@ElementCollection
@CollectionTable(name="judgment_court_reporter", uniqueConstraints={@UniqueConstraint(name="judgment_court_reporter_unique", columnNames={"fk_judgment", "court_reporter"})})
@Column(name="court_reporter")
@OrderBy("court_reporter")
private List<String> getCourtReporters_() {
    return courtReporters;
}
项目:saos    文件:Judgment.java   
@ElementCollection
@CollectionTable(name="judgment_legal_bases", uniqueConstraints={@UniqueConstraint(name="judgment_legal_base_unique", columnNames={"fk_judgment", "legal_base"})})
@Column(name="legal_base")
@OrderBy("legal_base")
private List<String> getLegalBases_() {
    return legalBases;
}
项目:saos    文件:Judgment.java   
@ElementCollection
@CollectionTable(name="judgment_lower_court_judgments", uniqueConstraints={@UniqueConstraint(name="judgment_lower_court_judgment_unique", columnNames={"fk_judgment", "lower_court_judgment"})})
@Column(name="lower_court_judgment")
@OrderBy("lower_court_judgment")
private List<String> getLowerCourtJudgments_() {
    return lowerCourtJudgments;
}
项目:saos    文件:ConstitutionalTribunalJudgmentDissentingOpinion.java   
@ElementCollection
@CollectionTable(name="ct_judgment_opinion_author",
                joinColumns = {@JoinColumn(name = "fk_ct_judgment_opinion", nullable = false)},
                uniqueConstraints={@UniqueConstraint(name="ct_judgment_opinion_author_unique", columnNames={"fk_ct_judgment_opinion", "author"})})
@Column(name="author", nullable=false)
private List<String> getAuthors_() {
    return authors;
}
项目:stdlib    文件:HavingAlternateIdEntity.java   
@EagerFetch
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "asset_alternate_id", joinColumns = @JoinColumn(name = "asset_id"))
public Set<AlternateIdEmbeddedEntity> getAlternateIds()
{
    return alternateIds;
}
项目:Jouve-Project    文件:FeaturedLink.java   
@ElementCollection(targetClass = String.class)
   @CollectionTable(name =  "FeaturedLink_Keywords", joinColumns = @JoinColumn(name = "featuredLink_id"))
   @MapKeyClass(String.class)
   @Column(name="keyword", length = 10 * 1024)
public Set<String> getKeywords() {
    return keywords;
}
项目:Jouve-Project    文件:FeaturedLink.java   
@ElementCollection(targetClass = String.class)
   @CollectionTable(name =  "FeaturedLink_KeywordsAnalyzed", joinColumns = @JoinColumn(name = "featuredLink_id"))
   @MapKeyClass(String.class)
   @Column(name="keyword", length = 10 * 1024)
public Set<String> getKeywordsAnalyzed() {
    return keywordsAnalyzed;
}
项目:Jouve-Project    文件:I18NLabel.java   
@ElementCollection(targetClass = String.class)
@CollectionTable(name =  "I18NLabel_Values")
@MapKeyColumn(name="locale", length = 128)
@MapKeyClass(Locale.class)
@Column(name="value", length = 10 * 1024)
public Map<Locale, String> getValues() {
    return values;
}
项目:Jouve-Project    文件:RecordCollection.java   
@ElementCollection
@CollectionTable(name = "RecordCollection_Locales", joinColumns = @JoinColumn(name = "recordCollection_id"))
@MapKeyColumn(name = "locale", length = 128)
@MapKeyClass(Locale.class)
public Set<Locale> getLocales() {
    return locales;
}
项目:my-paper    文件:Product.java   
/**
 * 获取会员价
 * 
 * @return 会员价
 */
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "xx_product_member_price")
public Map<MemberRank, BigDecimal> getMemberPrice() {
    return memberPrice;
}
项目:my-paper    文件:Product.java   
/**
 * 获取参数值
 * 
 * @return 参数值
 */
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "xx_product_parameter_value")
public Map<Parameter, String> getParameterValue() {
    return parameterValue;
}
项目:my-paper    文件:Role.java   
/**
 * 获取权限
 * 
 * @return 权限
 */
@ElementCollection
@CollectionTable(name = "xx_role_authority")
public List<String> getAuthorities() {
    return authorities;
}
项目:my-paper    文件:MemberAttribute.java   
/**
 * 获取可选项
 * 
 * @return 可选项
 */
@ElementCollection
@CollectionTable(name = "xx_member_attribute_option")
public List<String> getOptions() {
    return options;
}
项目:Jouve-Project    文件:ConstellioUser.java   
@ElementCollection
@CollectionTable(name = "ConstellioUser_Roles", joinColumns = @JoinColumn(name = "constellioUser_id"))
@Column(name = "role")
public Set<String> getRoles() {
    return roles;
}