File | Line |
---|
org/hibernate/impl/QueryImpl.java | 117 |
org/hibernate/impl/SQLQueryImpl.java | 362 |
Query countQuery = ((Session)this.session).createSQLQuery(sqlQueryBuffer.toString());
//SET NAMED PARAMS
Map parameters = this.getNamedParams();
Set parameterNames = parameters.keySet();
Iterator iter = parameterNames.iterator();
while (iter.hasNext()) {
String name = (String)iter.next();
TypedValue typedValue = (TypedValue)parameters.get(name);
countQuery.setParameter(name, typedValue.getValue(), typedValue.getType());
}
//SET POSITIONAL PARAMS
List paramTypes = this.getTypes();
List paramValues = this.getValues();
if (paramTypes != null && paramTypes.size() > 0) {
for (int i = 0; i < paramTypes.size(); i++) {
countQuery.setParameter(i, paramValues.get(i), (Type)paramTypes.get(i));
}
}
int count = ((BigInteger)countQuery.uniqueResult()).intValue(); |
File | Line |
---|
net/smartlab/web/AbstractArchiveAction.java | 195 |
net/smartlab/web/AbstractArchiveAction.java | 223 |
((DynaActionForm)form).set(name, new String[0]);
} else {
try {
PropertyDescriptor[] descriptors = Introspector.getBeanInfo(form.getClass()).getPropertyDescriptors();
for (int i = 0; i < descriptors.length; i++) {
if (descriptors[i].getName().equals(name)) {
Method setter = descriptors[i].getWriteMethod();
Class[] types = setter.getParameterTypes();
if (types.length == 1 && types[0].isArray() && types[0] == String.class) {
setter.invoke(form, new String[0]); |