1 package org.hibernate.loader.custom; 3 4 import java.io.Serializable ; 5 import java.util.Collections ; 6 import java.util.HashMap ; 7 import java.util.Map ; 8 9 import org.hibernate.HibernateException; 10 import org.hibernate.LockMode; 11 12 18 public abstract class SQLQueryReturn implements Serializable { 19 private String alias; 20 private LockMode lockMode; 21 protected Map propertyResults = new HashMap (); 22 23 protected SQLQueryReturn(String alias, Map propertyResults, LockMode lockMode) { 24 this.alias = alias; 25 if(alias==null) throw new HibernateException("alias must be specified"); 26 this.lockMode = lockMode; 27 if(propertyResults!=null) { 28 this.propertyResults = propertyResults; 29 } 30 } 31 32 public String getAlias() { 33 return alias; 34 } 35 36 public LockMode getLockMode() { 37 return lockMode; 38 } 39 40 public Map getPropertyResultsMap() { 41 return Collections.unmodifiableMap(propertyResults); 42 } 43 } 44 | Popular Tags |