1 19 package org.apache.cayenne.query; 20 21 import java.util.ArrayList ; 22 import java.util.Collections ; 23 import java.util.List ; 24 25 34 public class SQLResultSetMapping { 36 37 protected String name; 38 protected List columnResults; 39 40 public SQLResultSetMapping() { 41 42 } 43 44 public SQLResultSetMapping(String name) { 45 this.name = name; 46 } 47 48 public String getName() { 49 return name; 50 } 51 52 public void setName(String name) { 53 this.name = name; 54 } 55 56 59 public List getColumnResults() { 60 return columnResults != null ? columnResults : Collections.EMPTY_LIST; 61 } 62 63 66 public void addColumnResult(String column) { 67 if (columnResults == null) { 68 columnResults = new ArrayList (3); 69 } 70 71 columnResults.add(column); 72 } 73 } 74 | Popular Tags |