Code:
rootCriteria = session.createCriteria( Entity.class );
rootCriteria.add( Restrictions.eq( "entityTypeId", entityTypeId ) );
rootCriteria.createAlias( "attributes","Attribute1" );
rootCriteria.add(Restrictions.eq( "Attribute1.entityAttributeTypeId", new Long(160004) ));
rootCriteria.add(Restrictions.eq( "Attribute1.booleanValue", new Integer( 1 ) ) );
matchedEntities = updateMatchedEntities( matchedEntities, rootCriteria.list() );
I took the option of creating alias for attributes collection and assume entityAttributeTypeId, booleanValue are attributes in the collection element. Also I have placed wrappers Long, Integer for 160004 and 1 because without that you will get compile errors.