當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。