1 21 package oracle.toplink.essentials.queryframework; 23 24 import java.util.ArrayList ; 25 import java.util.List ; 26 import java.util.Iterator ; 27 28 import oracle.toplink.essentials.internal.localization.ExceptionLocalization; 29 30 40 41 public class SQLResultSetMapping { 42 45 protected String name; 46 47 50 protected List results; 51 52 53 public SQLResultSetMapping(String name){ 54 this.name = name; 55 if (this.name == null){ 56 throw new IllegalArgumentException (ExceptionLocalization.buildMessage("null_value_in_sqlresultsetmapping")); 57 } 58 } 59 60 67 public void convertClassNamesToClasses(ClassLoader classLoader){ 68 Iterator iterator = getResults().iterator(); 69 while (iterator.hasNext()){ 70 ((SQLResult)iterator.next()).convertClassNamesToClasses(classLoader); 71 } 72 }; 73 74 public String getName(){ 75 return this.name; 76 } 77 78 public void addResult(SQLResult result){ 79 if (result == null){ 80 return; 81 } 82 getResults().add(result); 83 } 84 85 89 public List getResults(){ 90 if (this.results == null){ 91 this.results = new ArrayList (); 92 } 93 return this.results; 94 } 95 96 } 97 | Popular Tags |