1 21 package oracle.toplink.essentials.queryframework; 23 24 import oracle.toplink.essentials.internal.queryframework.*; 25 import oracle.toplink.essentials.exceptions.*; 26 27 39 public class ValueReadQuery extends DirectReadQuery { 40 41 45 public ValueReadQuery() { 46 super(); 47 } 48 49 53 public ValueReadQuery(String sqlString) { 54 super(sqlString); 55 } 56 57 61 public ValueReadQuery(Call call) { 62 super(call); 63 } 64 65 72 public Object executeDatabaseQuery() throws DatabaseException { 73 Object values = super.executeDatabaseQuery(); 74 ContainerPolicy cp = getContainerPolicy(); 75 if (cp.sizeFor(values) == 0) { 76 return null; 77 } else { 78 return cp.next(cp.iteratorFor(values), getSession()); 79 } 80 } 81 } 82 | Popular Tags |