code: @Override
  	public CPMeasurementUnit fetchByG_P_T_Last(long groupId, boolean primary,
  		int type, OrderByComparator<CPMeasurementUnit> orderByComparator) {
  		int count = countByG_P_T(groupId, primary, type);
  
  		if (count == 0) {
  			return null;
  		}
  
  		List<CPMeasurementUnit> list = findByG_P_T(groupId, primary, type,
  				count - 1, count, orderByComparator);
  
  		if (!list.isEmpty()) {
  			return list.get(0);
  		}
  
  		return null;
  	}
docs: Returns the last cp measurement unit in the ordered set where groupId = &#63; and primary = &#63; and type = &#63;.
  
  @param groupId the group ID
  @param primary the primary
  @param type the type
  @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
  @return the last matching cp measurement unit, or <code>null</code> if a matching cp measurement unit could not be found