1 package org.hibernate.criterion; 3 4 import org.hibernate.type.Type; 5 import org.hibernate.util.ArrayHelper; 6 7 8 14 public final class Expression extends Restrictions { 15 16 private Expression() { 17 } 19 20 30 public static Criterion sql(String sql, Object [] values, Type[] types) { 31 return new SQLCriterion(sql, values, types); 32 } 33 43 public static Criterion sql(String sql, Object value, Type type) { 44 return new SQLCriterion(sql, new Object [] { value }, new Type[] { type } ); 45 } 46 53 public static Criterion sql(String sql) { 54 return new SQLCriterion(sql, ArrayHelper.EMPTY_OBJECT_ARRAY, ArrayHelper.EMPTY_TYPE_ARRAY); 55 } 56 57 } 58 | Popular Tags |