protected LikeExpression( String propertyName, String value, MatchMode matchMode, Character escapeChar, boolean ignoreCase) { this( propertyName, matchMode.toMatchString( value ), escapeChar, ignoreCase ); }
protected IlikeExpression(String propertyName, String value, MatchMode matchMode) { this( propertyName, matchMode.toMatchString( value ) ); }
/** * Apply an "ilike" constraint * * @deprecated since 5.2, use {@link #ilike(String, MatchMode)}. */ @Deprecated public AuditCriterion ilike(String value, org.hibernate.criterion.MatchMode matchMode) { return new IlikeAuditExpression( alias, propertyNameGetter, matchMode.toMatchString( value ) ); }
/** * Apply a "like" constraint * * @deprecated since 5.2, use {@link #like(String, MatchMode)}. */ @Deprecated public AuditCriterion like(String value, org.hibernate.criterion.MatchMode matchMode) { return new SimpleAuditExpression( alias, propertyNameGetter, matchMode.toMatchString( value ), " like" ); }
/** * Apply a "like" constraint to the named property using the provided match mode * * @param propertyName The name of the property * @param value The value to use in comparison * @param matchMode The match mode to use in comparison * * @return The Criterion * * @see SimpleExpression */ public static SimpleExpression like(String propertyName, String value, MatchMode matchMode) { // todo : update this to use LikeExpression return new SimpleExpression( propertyName, matchMode.toMatchString( value ), " like " ); }
protected void addPropertyTypedValue(Object value, Type type, List<TypedValue> list) { if ( value != null ) { if ( value instanceof String ) { String string = (String) value; if ( isIgnoreCaseEnabled ) { string = string.toLowerCase(Locale.ROOT); } if ( isLikeEnabled ) { string = matchMode.toMatchString( string ); } value = string; } list.add( new TypedValue( type, value ) ); } }
protected LikeExpression( String propertyName, String value, MatchMode matchMode, Character escapeChar, boolean ignoreCase) { this( propertyName, matchMode.toMatchString( value ), escapeChar, ignoreCase ); }
protected LikeExpression( String propertyName, String value, MatchMode matchMode) { this( propertyName, matchMode.toMatchString( value ) ); }
protected LikeExpression( String propertyName, String value, MatchMode matchMode, Character escapeChar, boolean ignoreCase) { this( propertyName, matchMode.toMatchString( value ), escapeChar, ignoreCase ); }
protected LikeExpression( String propertyName, String value, MatchMode matchMode) { this( propertyName, matchMode.toMatchString( value ) ); }
protected void addPropertyTypedValue(Object value, Type type, List list) { if ( value!=null ) { if ( value instanceof String ) { String string = (String) value; if (isIgnoreCaseEnabled) string = string.toLowerCase(); if (isLikeEnabled) string = matchMode.toMatchString(string); value = string; } list.add( new TypedValue(type, value, null) ); } }
/** * Apply a "like" constraint to the named property * @param propertyName * @param value * @return Criterion */ public static SimpleExpression like(String propertyName, String value, MatchMode matchMode) { return new SimpleExpression(propertyName, matchMode.toMatchString(value), " like " ); } /**
/** * Apply a "like" constraint to the named property * @param propertyName * @param value * @return Criterion */ public static SimpleExpression like(String propertyName, String value, MatchMode matchMode) { return new SimpleExpression(propertyName, matchMode.toMatchString(value), " like " ); } /**
protected void addPropertyTypedValue(Object value, Type type, List list) { if ( value!=null ) { if ( value instanceof String ) { String string = (String) value; if (isIgnoreCaseEnabled) string = string.toLowerCase(); if (isLikeEnabled) string = matchMode.toMatchString(string); value = string; } list.add( new TypedValue(type, value, null) ); } }
/** * Apply a "like" constraint to the named property * @param propertyName * @param value * @return Criterion */ public static SimpleExpression like(String propertyName, String value, MatchMode matchMode) { return new SimpleExpression(propertyName, matchMode.toMatchString(value), " like " ); } /**
protected void addPropertyTypedValue(Object value, Type type, List list) { if ( value!=null ) { if ( value instanceof String ) { String string = (String) value; if (isIgnoreCaseEnabled) string = string.toLowerCase(); if (isLikeEnabled) string = matchMode.toMatchString(string); value = string; } list.add( new TypedValue(type, value, null) ); } }
/** * Apply a "like" constraint to the named property * @param propertyName * @param value * @return Criterion */ public static SimpleExpression like(String propertyName, String value, MatchMode matchMode) { return new SimpleExpression(propertyName, matchMode.toMatchString(value), " like " ); } /**
protected void addPropertyTypedValue(Object value, Type type, List list) { if ( value!=null ) { if ( value instanceof String ) { String string = (String) value; if (isIgnoreCaseEnabled) string = string.toLowerCase(); if (isLikeEnabled) string = matchMode.toMatchString(string); value = string; } list.add( new TypedValue(type, value, null) ); } }
/** like条件を付与します。(値がnullの時は無視されます) */ public OrmCriteria<T> like(String field, String value, MatchMode mode) { if (isValid(value)) { add(builder.like(root.get(field), mode.toMatchString(value))); } return this; }
/** like条件を付与します。[複数フィールドに対するOR結合](値がnullの時は無視されます) */ public OrmCriteria<T> like(String[] fields, String value, MatchMode mode) { if (isValid(value)) { Predicate[] predicates = new Predicate[fields.length]; for (int i = 0; i < fields.length; i++) { predicates[i] = builder.like(root.get(fields[i]), mode.toMatchString(value)); } add(builder.or(predicates)); } return this; }