Example usage for org.apache.commons.collections.functors InvokerTransformer getInstance

List of usage examples for org.apache.commons.collections.functors InvokerTransformer getInstance

Introduction

In this page you can find the example usage for org.apache.commons.collections.functors InvokerTransformer getInstance.

Prototype

public static Transformer getInstance(String methodName) 

Source Link

Document

Gets an instance of this transformer calling a specific method with no arguments.

Usage

From source file:com.abiquo.abiserver.business.hibernate.pojohb.PojoUtils.java

@SuppressWarnings("unchecked")
public static Collection<? extends IPojo> allToPojo(final Collection<? extends IPojoHB> source) {
    Transformer transformer = InvokerTransformer.getInstance("toPojo");
    return CollectionUtils.collect(source, transformer);
}

From source file:com.abiquo.abiserver.business.hibernate.pojohb.PojoUtils.java

@SuppressWarnings("unchecked")
public static Collection<? extends IPojoHB> allToPojoHB(final Collection<? extends IPojo> source) {
    Transformer transformer = InvokerTransformer.getInstance("toPojoHB");
    return CollectionUtils.collect(source, transformer);
}

From source file:com.abiquo.abiserver.persistence.dao.virtualappliance.hibernate.NodeVirtualImageDAOHibernate.java

@SuppressWarnings("unchecked")
public Collection<NodeVirtualImage> getNodesDecorated(final Collection<Integer> nodeIds) {
    Collection<NodeVirtualImageHB> nodes = getSession().createQuery(FIND_BY_IDS)
            .setParameterList("ids", nodeIds).list();

    return CollectionUtils.collect(nodes, InvokerTransformer.getInstance("toDecorator"));
}