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( "%" ) ); }
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(); }
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(); }