Changed classes to use more appropriate constants from OnmsCriteria.
Got rid of unnecessary casts, warning cleanup.