findAllMappings.groovy

import oracle.odi.domain.mapping.Mapping;
import oracle.odi.domain.mapping.finder.IMappingFinder;
import oracle.odi.core.OdiInstance;
import oracle.odi.core.persistence.transaction.ITransactionManager;
import oracle.odi.core.persistence.transaction.ITransactionStatus;
import oracle.odi.core.persistence.transaction.support.DefaultTransactionDefinition;
import java.util.Collection;

IMappingFinder finder = (IMappingFinder) odiInstance.getTransactionalEntityManager().getFinder(Mapping.class);

println "start"

for (Mapping m :(Collection<Mapping>) finder.findAll()) {
          if(m.getName().startsWith("SEARCH_KEY")){
              println m.getName() + " " + m.getParent().getName() + " " +m.getParentFolder().getName()
          }
}

println "finished"