Created
June 1, 2012 08:14
-
-
Save keating/2850222 to your computer and use it in GitHub Desktop.
build dto for a list (for MayFramework@BYHT)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
import com.beiyanght.utils.dto.DtoException; | |
import com.beiyanght.utils.dto.DtoHelper; | |
/** | |
* | |
* @author keating_andy_given | |
*/ | |
public class DtoHelp { | |
public static <T,O> List<T> buildDto(Class<T> t, List<O> list) | |
throws DtoException { | |
List<T> dtos = new ArrayList<T>(); | |
for (Object obj : list) { | |
dtos.add(DtoHelper.build(t, obj)); | |
} | |
return dtos; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment