com.buschmais.xo.impl.proxy.entity.property.EntityReferencePropertySetMethod Maven / Gradle / Ivy
The newest version!
package com.buschmais.xo.impl.proxy.entity.property;
import com.buschmais.xo.api.metadata.method.EntityReferencePropertyMethodMetadata;
import com.buschmais.xo.impl.EntityPropertyManager;
import com.buschmais.xo.impl.proxy.common.property.AbstractPropertyMethod;
public class EntityReferencePropertySetMethod
extends AbstractPropertyMethod, EntityReferencePropertyMethodMetadata> {
public EntityReferencePropertySetMethod(EntityPropertyManager propertyManager, EntityReferencePropertyMethodMetadata metadata) {
super(propertyManager, metadata);
}
public Object invoke(Entity entity, Object instance, Object[] args) {
Object value = args[0];
getPropertyManager().createEntityReference(entity, getMetadata(), value);
return null;
}
}