Class OBDao

  • public class OBDao
    extends Object
    Util class for DAL
    • Constructor Detail

      • OBDao

        public OBDao()
    • Method Detail

      • getFilteredCriteria

        public static <T extends BaseOBObjectOBCriteria<T> getFilteredCriteria​(Class<T> clazz,
                                                                                 org.hibernate.criterion.Criterion... constraints)
        Generic OBCriteria.
        clazz - Class (entity).
        constraints - List of hibernate Criterion instances which are used as filters
        An OBCriteria object with the constraints.
      • getActiveOBObjectList

        public static <T extends BaseOBObjectList<T> getActiveOBObjectList​(BaseOBObject obj,
                                                                             String property)
        Returns a List of BaseOBOBjects of the Property identified by the property from the BaseOBObject obj. This method enables the activeFilter so inactive BaseOBObjects are not included on the returned List.
        obj - BaseOBObject from which the values are requested
        property - the name of the Property for which the value is requested
      • getOBObjectListFromString

        public static <T extends BaseOBObjectList<T> getOBObjectListFromString​(Class<T> t,
                                                                                 String _IDs)
        Parses the string of comma separated id's to return a List with the BaseOBObjects of the given class. If there is an invalid id a null value is added to the List.
        t - class of the BaseOBObject the id's belong to
        _IDs - String containing the comma separated list of id's
        a List object containing the parsed OBObjects