package consumer;

import provider.Entity;
import provider.EntityProvider;
import provider.Pojo;
import provider.PojoProvider;

public class ConsumerBacking {

    private PojoProvider pojoProvider = (PojoProvider) ConsumerUtils.lookup(PojoProvider.class.getName());

    private EntityProvider entityProvider = (EntityProvider) ConsumerUtils.lookup(EntityProvider.class.getName());

    public void testPojoProvider() {
        Pojo pojo = pojoProvider.service();

        this.pojoId = pojo.getId();
    }

    public void testEntityProvider() {
        Entity entity = entityProvider.service();

        this.entityId = entity.getId();
    }

    private Long pojoId;

    public Long getPojoId() {
        return pojoId;
    }

    public void setPojoId(Long pojoId) {
        this.pojoId = pojoId;
    }

    private Long entityId;

    public Long getEntityId() {
        return entityId;
    }

    public void setEntityId(Long entityId) {
        this.entityId = entityId;
    }

}
