package org.whole.lang.xsd.mapping.reflect;
import org.whole.lang.reflect.AbstractLanguageDeployer;
import org.whole.lang.reflect.ReflectionFactory;
import org.whole.lang.builders.IBuilderFactory;
import org.whole.lang.builders.IBuilder;
import org.whole.lang.contexts.IEntityContext;
import org.whole.lang.xsd.mapping.builders.IMappingBuilder;
import org.whole.lang.xsd.mapping.builders.MappingGenericBuilderAdapter;
import org.whole.lang.builders.GenericBuilderAdapterOperation;
import org.whole.lang.xsd.mapping.builders.MappingSpecificBuilderAdapter;
import org.whole.lang.builders.SpecificBuilderAdapterOperation;
/**
* @generator Whole
*/
public class MappingLanguageDeployer extends AbstractLanguageDeployer {
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new MappingLanguageKit());
platform.addOperationFactory(MappingLanguageKit.URI,
GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy,
IEntityContext entityContext) {
return new MappingGenericBuilderAdapter(
(IMappingBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(MappingLanguageKit.URI,
SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy,
IEntityContext entityContext) {
return new MappingSpecificBuilderAdapter(strategy,
entityContext);
}
});
}
public void undeploy(ReflectionFactory platform) {
platform.removeLanguageKit(MappingLanguageKit.URI);
}
}