javax.persistence.MapKey Java Examples

The following examples show how to use javax.persistence.MapKey. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JPAOverriddenAnnotationReader.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
private void getMapKey(List<Annotation> annotationList, Element element) {
	Element subelement = element != null ? element.element( "map-key" ) : null;
	if ( subelement != null ) {
		AnnotationDescriptor ad = new AnnotationDescriptor( MapKey.class );
		copyStringAttribute( ad, subelement, "name", false );
		annotationList.add( AnnotationFactory.create( ad ) );
	}
}
 
Example #2
Source File: JobData.java    From scheduling with GNU Affero General Public License v3.0 5 votes vote down vote up
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true, mappedBy = "jobData")
@Fetch(FetchMode.SELECT)
@BatchSize(size = 10)
@MapKey(name = "jobId")
@PrimaryKeyJoinColumn(name = "JOB_ID")
public List<JobContent> getJobContent() {
    return jobContent;
}
 
Example #3
Source File: CollectionBinder.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public void setMapKey(MapKey key) {
	if ( key != null ) {
		mapKeyPropertyName = key.name();
	}
}