當前位置: 首頁>>代碼示例>>Java>>正文


Java MapKeyColumn類代碼示例

本文整理匯總了Java中javax.persistence.MapKeyColumn的典型用法代碼示例。如果您正苦於以下問題:Java MapKeyColumn類的具體用法?Java MapKeyColumn怎麽用?Java MapKeyColumn使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MapKeyColumn類屬於javax.persistence包,在下文中一共展示了MapKeyColumn類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getMapKeyColumn

import javax.persistence.MapKeyColumn; //導入依賴的package包/類
private void getMapKeyColumn(List<Annotation> annotationList, Element element) {
	Element subelement = element != null ? element.element( "map-key-column" ) : null;
	if ( subelement != null ) {
		AnnotationDescriptor ad = new AnnotationDescriptor( MapKeyColumn.class );
		copyStringAttribute( ad, subelement, "name", false );
		copyBooleanAttribute( ad, subelement, "unique" );
		copyBooleanAttribute( ad, subelement, "nullable" );
		copyBooleanAttribute( ad, subelement, "insertable" );
		copyBooleanAttribute( ad, subelement, "updatable" );
		copyStringAttribute( ad, subelement, "column-definition", false );
		copyStringAttribute( ad, subelement, "table", false );
		copyIntegerAttribute( ad, subelement, "length" );
		copyIntegerAttribute( ad, subelement, "precision" );
		copyIntegerAttribute( ad, subelement, "scale" );
		annotationList.add( AnnotationFactory.create( ad ) );
	}
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:18,代碼來源:JPAOverriddenAnnotationReader.java

示例2: getParameters

import javax.persistence.MapKeyColumn; //導入依賴的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

示例3: getAttributes

import javax.persistence.MapKeyColumn; //導入依賴的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

示例4: getParameters

import javax.persistence.MapKeyColumn; //導入依賴的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

示例5: getAttributes

import javax.persistence.MapKeyColumn; //導入依賴的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

示例6: getAttr

import javax.persistence.MapKeyColumn; //導入依賴的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

示例7: getTags

import javax.persistence.MapKeyColumn; //導入依賴的package包/類
@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;
}
 
開發者ID:Blazebit,項目名稱:blaze-storage,代碼行數:14,代碼來源:BucketObjectVersion.java

示例8: getTags

import javax.persistence.MapKeyColumn; //導入依賴的package包/類
@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;
}
 
開發者ID:Blazebit,項目名稱:blaze-storage,代碼行數:12,代碼來源:Account.java

示例9: getTags

import javax.persistence.MapKeyColumn; //導入依賴的package包/類
@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;
}
 
開發者ID:Blazebit,項目名稱:blaze-storage,代碼行數:13,代碼來源:Storage.java

示例10: buildKeyColumn

import javax.persistence.MapKeyColumn; //導入依賴的package包/類
private static GeneratorColumn buildKeyColumn(final GeneratorTable table, final MapKeyColumn keyColumn,
		final String defaultKeyColumn) {
	if (keyColumn != null && keyColumn.name().length() > 0) {
		return table.resolveColumn(keyColumn.name());
	}
	return table.resolveColumn(defaultKeyColumn);
}
 
開發者ID:liefke,項目名稱:org.fastnate,代碼行數:8,代碼來源:MapProperty.java

示例11: MapProperty

import javax.persistence.MapKeyColumn; //導入依賴的package包/類
/**
 * Creates a new map property.
 *
 * @param sourceClass
 *            the description of the current inspected class that contains this property
 * @param attribute
 *            the accessor of the represented attribute
 * @param override
 *            the configured assocation override
 */
@SuppressWarnings("unchecked")
public MapProperty(final EntityClass<?> sourceClass, final AttributeAccessor attribute,
		final AssociationOverride override) {
	super(sourceClass, attribute, override, 1);

	// Initialize the key description
	final MapKeyClass keyClassAnnotation = attribute.getAnnotation(MapKeyClass.class);
	this.keyClass = getPropertyArgument(attribute,
			keyClassAnnotation != null ? keyClassAnnotation.value() : (Class<K>) void.class, 0);
	this.keyEntityClass = sourceClass.getContext().getDescription(this.keyClass);

	if (getMappedBy() != null) {
		this.keyConverter = null;
		this.keyColumn = null;
	} else {
		if (this.keyEntityClass != null) {
			// Entity key
			this.keyConverter = null;
			this.keyColumn = buildKeyColumn(getTable(), attribute.getAnnotation(MapKeyJoinColumn.class),
					attribute.getName() + "_KEY");
		} else {
			// Primitive key
			this.keyConverter = PrimitiveProperty.createConverter(attribute, this.keyClass, true);
			this.keyColumn = buildKeyColumn(getTable(), attribute.getAnnotation(MapKeyColumn.class),
					attribute.getName() + "_KEY");
		}
	}
}
 
開發者ID:liefke,項目名稱:org.fastnate,代碼行數:39,代碼來源:MapProperty.java

示例12: getMetadata

import javax.persistence.MapKeyColumn; //導入依賴的package包/類
@EagerFetch
@ElementCollection
@JoinTable(name = "resource_instance_metadata", joinColumns = @JoinColumn(name = "resource_instance_id"))
@MapKeyColumn(name = "meta_name")
@Column(name = "meta_val")
public Map<String, String> getMetadata()
{
	return metadata;
}
 
開發者ID:petergeneric,項目名稱:stdlib,代碼行數:10,代碼來源:ResourceInstanceEntity.java

示例13: getValues

import javax.persistence.MapKeyColumn; //導入依賴的package包/類
@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;
}
 
開發者ID:BassJel,項目名稱:Jouve-Project,代碼行數:9,代碼來源:I18NLabel.java

示例14: getLocales

import javax.persistence.MapKeyColumn; //導入依賴的package包/類
@ElementCollection
@CollectionTable(name = "RecordCollection_Locales", joinColumns = @JoinColumn(name = "recordCollection_id"))
@MapKeyColumn(name = "locale", length = 128)
@MapKeyClass(Locale.class)
public Set<Locale> getLocales() {
    return locales;
}
 
開發者ID:BassJel,項目名稱:Jouve-Project,代碼行數:8,代碼來源:RecordCollection.java

示例15: MapKeyColumnDelegator

import javax.persistence.MapKeyColumn; //導入依賴的package包/類
public MapKeyColumnDelegator(MapKeyColumn column) {
	this.column = column;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:4,代碼來源:MapKeyColumnDelegator.java


注:本文中的javax.persistence.MapKeyColumn類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。