private SearchableQuery createSimpleQueryWithWildcards( SearchableQuery query ) { return DaoUtils.autoAddWildcards( query ); }
public static boolean isValueForLike( String value ) { String replacedValue = replaceWildcardsByPercent( value ); return ( replacedValue.startsWith( "%" ) || replacedValue.endsWith( "%" ) ); }
public static boolean isValueForLike( String value ) { String replacedValue = replaceWildcardsByPercent( value ); return ( replacedValue.startsWith( "%" ) || replacedValue.endsWith( "%" ) ); }
private SearchableQuery createSimpleQueryWithWildcards( SearchableQuery query ) { return DaoUtils.autoAddWildcards( query ); }
public List<Interaction> getInteractionsForExperimentWithAcExcludingLike( String ac, String[] excludedAcsLike, int firstResult, int maxResults ) { Criteria crit = getSession().createCriteria( InteractionImpl.class ) .addOrder(org.hibernate.criterion.Order.asc("ac")) .setFirstResult( firstResult ) .setMaxResults( maxResults ); for ( String excludedAc : excludedAcsLike ) { excludedAc = DaoUtils.replaceWildcardsByPercent( excludedAc ); crit.add( Restrictions.not( Restrictions.like( "ac", excludedAc ) ) ); } crit.createCriteria( "experiments" ) .add( Restrictions.idEq( ac ) ); return crit.list(); }
/** * Adds wildcards to a searchable query using the standard AutoAddWildcardConverter * * @param query the query to convert * * @return a query with wildcards where necessary */ public static SearchableQuery autoAddWildcards( SearchableQuery query ) { return autoAddWildcards( query, new StandardAutoAddWildcardConverter() ); }
public List<Interaction> getInteractionsForExperimentWithAcExcludingLike( String ac, String[] excludedAcsLike, int firstResult, int maxResults ) { Criteria crit = getSession().createCriteria( InteractionImpl.class ) .addOrder(org.hibernate.criterion.Order.asc("ac")) .setFirstResult( firstResult ) .setMaxResults( maxResults ); for ( String excludedAc : excludedAcsLike ) { excludedAc = DaoUtils.replaceWildcardsByPercent( excludedAc ); crit.add( Restrictions.not( Restrictions.like( "ac", excludedAc ) ) ); } crit.createCriteria( "experiments" ) .add( Restrictions.idEq( ac ) ); return crit.list(); }
/** * Adds wildcards to a searchable query using the standard AutoAddWildcardConverter * * @param query the query to convert * * @return a query with wildcards where necessary */ public static SearchableQuery autoAddWildcards( SearchableQuery query ) { return autoAddWildcards( query, new StandardAutoAddWildcardConverter() ); }