1 package org.hibernate.engine; 3 4 import java.util.ArrayList ; 5 import java.util.List ; 6 import java.io.Serializable ; 7 8 import org.hibernate.loader.custom.SQLQueryReturn; 9 import org.hibernate.loader.custom.SQLQueryScalarReturn; 10 11 16 public class ResultSetMappingDefinition implements Serializable { 17 18 private List entityQueryReturns = new ArrayList (); 19 20 private List scalarQueryReturns = new ArrayList (); 21 private String name; 22 23 public String getName() { 24 return name; 25 } 26 27 public ResultSetMappingDefinition(String name) { 28 this.name = name; 29 } 30 31 public void addEntityQueryReturn(SQLQueryReturn entityQueryReturn) { 32 entityQueryReturns.add(entityQueryReturn); 33 } 34 35 public void addScalarQueryReturn(SQLQueryScalarReturn scalarQueryReturn) { 36 scalarQueryReturns.add(scalarQueryReturn); 37 } 38 39 public SQLQueryReturn[] getEntityQueryReturns() { 40 return (SQLQueryReturn[]) entityQueryReturns.toArray( new SQLQueryReturn[0] ); 41 } 42 43 public SQLQueryScalarReturn[] getScalarQueryReturns() { 44 return (SQLQueryScalarReturn[]) scalarQueryReturns.toArray( new SQLQueryScalarReturn[0] ); 45 } 46 } 47 | Popular Tags |