All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jvnet.hyperjaxb3.ejb.strategy.mapping.EmbeddedIdMapping Maven / Gradle / Ivy

There is a newer version: 0.6.2
Show newest version
package org.jvnet.hyperjaxb3.ejb.strategy.mapping;

import com.sun.java.xml.ns.persistence.orm.EmbeddedId;
import com.sun.tools.xjc.Options;
import com.sun.tools.xjc.outline.FieldOutline;

public class EmbeddedIdMapping implements FieldOutlineMapping {

	public EmbeddedId process(Mapping context, FieldOutline fieldOutline,
			Options options) {

		final EmbeddedId embeddedId = context.getCustomizing().getEmbeddedId(
				fieldOutline);

		createEmbeddedId$Name(context, fieldOutline, embeddedId);
		context.getAttributeMapping().createAttributeOverride(context,
				fieldOutline, embeddedId.getAttributeOverride());

		return embeddedId;
	}

	public void createEmbeddedId$Name(Mapping context,
			FieldOutline fieldOutline, final EmbeddedId embeddedId) {
		embeddedId.setName(context.getNaming().getPropertyName(context,
				fieldOutline));
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy