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

org.jvnet.hyperjaxb3.ejb.strategy.mapping.EmbeddedMapping 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.Embedded;
import com.sun.tools.xjc.Options;
import com.sun.tools.xjc.outline.FieldOutline;

public class EmbeddedMapping implements FieldOutlineMapping {

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

		final Embedded embedded = context.getCustomizing().getEmbedded(
				fieldOutline);

		createEmbedded$Name(context, fieldOutline, embedded);

		context.getAttributeMapping().createAttributeOverride(context,
				fieldOutline, embedded.getAttributeOverride());

		context.getAssociationMapping().createAssociationOverride(context,
				fieldOutline, embedded.getAssociationOverride());

		return embedded;
	}

	public void createEmbedded$Name(Mapping context, FieldOutline fieldOutline,
			final Embedded embedded) {
		embedded.setName(context.getNaming().getPropertyName(context,
				fieldOutline));
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy