Created
March 15, 2011 10:09
-
-
Save ketankhairnar/870540 to your computer and use it in GitHub Desktop.
ResultSet Processor
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
public class ResultSeProcessor extends CamelProcessor<MyJPAEntity> | |
{ | |
public void process(Exchange exchange) throws Exception | |
{ | |
process(exchange, getRowMapper()); | |
} | |
private static ResultMapper<MyJPAEntity> getRowMapper() | |
{ | |
ResultMapper<MyJPAEntity> mapper = new ResultMapper<MyJPAEntity>() | |
{ | |
public MyJPAEntityvalueOf(HashMap<String, Object> data) | |
{ | |
MyJPAEntity txn = new MyJPAEntity(); | |
// from resultset set the values to jpa entity and return it | |
//txn.setXXX((String)data.get("xxx")) | |
return txn ; | |
} | |
}; | |
return mapper; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment