Criteria criteria = new Criteria();
criteria.addAlias("bc", BintBcharTypePeer.TABLE_NAME);
criteria.addJoin(
BintBcharTypePeer.ID,
new ColumnImpl("bc.id"));
criteria.where(new ColumnImpl("bc.BINT_VALUE"), new Boolean(false))
.and(new ColumnImpl("bc.BCHAR_VALUE"), new Boolean(false))
.and(new ColumnImpl("bc.BINT_OBJECT_VALUE"), new Boolean(false))
.and(new ColumnImpl("bc.BCHAR_OBJECT_VALUE"), new Boolean(false));
List<BintBcharType> selectedList
= BintBcharTypePeer.doSelect(criteria);
assertTrue("Should have read 1 dataset with both values false "
+ "but read " + selectedList.size(),
selectedList.size() == 1);