当前位置: 首页>>代码示例>>Java>>正文


Java CollectionTable类代码示例

本文整理汇总了Java中javax.persistence.CollectionTable的典型用法代码示例。如果您正苦于以下问题:Java CollectionTable类的具体用法?Java CollectionTable怎么用?Java CollectionTable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CollectionTable类属于javax.persistence包,在下文中一共展示了CollectionTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getCollectionTable

import javax.persistence.CollectionTable; //导入依赖的package包/类
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 ) );
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:25,代码来源:JPAOverriddenAnnotationReader.java

示例2: getLabels

import javax.persistence.CollectionTable; //导入依赖的package包/类
@Override
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "MCRCategoryLabels",
    joinColumns = @JoinColumn(name = "category"),
    uniqueConstraints = {
        @UniqueConstraint(columnNames = { "category", "lang" }) })
public Set<MCRLabel> getLabels() {
    return super.getLabels();
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:10,代码来源:MCRCategoryImpl.java

示例3: buildTableName

import javax.persistence.CollectionTable; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:liefke,项目名称:org.fastnate,代码行数:32,代码来源:PluralProperty.java

示例4: getParameters

import javax.persistence.CollectionTable; //导入依赖的package包/类
@ElementCollection
@MapKeyColumn(name = "parameters_idx")
@Column(name = "parameters_elt")
@CollectionTable(name = "info_parameters")
public Map<String, String> getParameters() {
    return parameters;
}
 
开发者ID:Netflix,项目名称:metacat,代码行数:8,代码来源:Info.java

示例5: getAttributes

import javax.persistence.CollectionTable; //导入依赖的package包/类
/**
 * @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;
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:14,代码来源:MCRUser.java

示例6: getParameters

import javax.persistence.CollectionTable; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:MyCoRe-Org,项目名称:mycore,代码行数:13,代码来源:MCRJob.java

示例7: getOptions

import javax.persistence.CollectionTable; //导入依赖的package包/类
/**
 * 获取可选项
 * 
 * @return 可选项
 */
@JsonProperty
@NotEmpty
@ElementCollection
@CollectionTable(name = "xx_attribute_option")
public List<String> getOptions() {
	return options;
}
 
开发者ID:justinbaby,项目名称:my-paper,代码行数:13,代码来源:Attribute.java

示例8: getAttributes

import javax.persistence.CollectionTable; //导入依赖的package包/类
/**
 * 获取属性
 * 
 * @return 属性
 */
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "xx_plugin_config_attribute")
@MapKeyColumn(name = "name", length = 100)
public Map<String, String> getAttributes() {
	return attributes;
}
 
开发者ID:justinbaby,项目名称:my-paper,代码行数:12,代码来源:PluginConfig.java

示例9: getProductImages

import javax.persistence.CollectionTable; //导入依赖的package包/类
/**
 * 获取商品图片
 * 
 * @return 商品图片
 */
@Valid
@ElementCollection
@CollectionTable(name = "xx_product_product_image")
public List<ProductImage> getProductImages() {
	return productImages;
}
 
开发者ID:justinbaby,项目名称:my-paper,代码行数:12,代码来源:Product.java

示例10: getAuthorities

import javax.persistence.CollectionTable; //导入依赖的package包/类
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "UserPrincipal_Authority", joinColumns = {
		@JoinColumn(referencedColumnName = "Id", name = "UserId") })
@Override
public Set<UserAuthority> getAuthorities() {
	return this.authorities;
}
 
开发者ID:shilongdai,项目名称:bookManager,代码行数:8,代码来源:UserPrincipal.java

示例11: getCategories

import javax.persistence.CollectionTable; //导入依赖的package包/类
@Override
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name="Categories")
public List<String> getCategories()
{
    return this.categories;
}
 
开发者ID:MadCoderZ,项目名称:NewsBotIRC,代码行数:8,代码来源:DBEntry.java

示例12: getAttr

import javax.persistence.CollectionTable; //导入依赖的package包/类
@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;
}
 
开发者ID:shilongdai,项目名称:LSChatServer,代码行数:9,代码来源:LSPayload.java

示例13: getAssociates

import javax.persistence.CollectionTable; //导入依赖的package包/类
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "User_Associate", joinColumns = {
		@JoinColumn(referencedColumnName = "Id", name = "UserId") })
@Column(name = "name")
public Set<String> getAssociates() {
	return associates;
}
 
开发者ID:shilongdai,项目名称:LSChatServer,代码行数:8,代码来源:User.java

示例14: getData

import javax.persistence.CollectionTable; //导入依赖的package包/类
/**
 * @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;
}
 
开发者ID:MobileManAG,项目名称:Project-H-Backend,代码行数:11,代码来源:PatientKeyPerformanceIndicatorValidation.java

示例15: getTags

import javax.persistence.CollectionTable; //导入依赖的package包/类
/**
 * @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;
}
 
开发者ID:MobileManAG,项目名称:Project-H-Backend,代码行数:12,代码来源:QuestionType.java


注:本文中的javax.persistence.CollectionTable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。