Java 类javax.persistence.MapKeyJoinColumns 实例源码
项目:lams
文件:JPAOverriddenAnnotationReader.java
private void buildMapKeyJoinColumns(List<Annotation> annotationList, Element element) {
MapKeyJoinColumn[] joinColumns = getMapKeyJoinColumns( element );
if ( joinColumns.length > 0 ) {
AnnotationDescriptor ad = new AnnotationDescriptor( MapKeyJoinColumns.class );
ad.setValue( "value", joinColumns );
annotationList.add( AnnotationFactory.create( ad ) );
}
}
项目:hyperjaxb3
文件:CreateXAnnotations.java
public XAnnotation<?> createMapKeyJoinColumns(
Collection<MapKeyJoinColumn> source) {
return transform(
MapKeyJoinColumns.class,
javax.persistence.MapKeyJoinColumn.class,
source,
new Transformer<MapKeyJoinColumn, XAnnotation<javax.persistence.MapKeyJoinColumn>>() {
public XAnnotation<javax.persistence.MapKeyJoinColumn> transform(
MapKeyJoinColumn input) {
return createMapKeyJoinColumn(input);
}
});
}
项目:pm
文件:AbstractSharesList.java
@OneToMany(mappedBy="portfolio",cascade = {CascadeType.ALL}, fetch = FetchType.EAGER, orphanRemoval=true)
@Fetch(FetchMode.SUBSELECT)
@MapKeyJoinColumns({
@MapKeyJoinColumn(name="symbol",referencedColumnName="symbol"),
@MapKeyJoinColumn(name="isin",referencedColumnName="isin")
})
public Map<Stock, PortfolioShare> getListShares() {
return listShares;
}