Package org.dmlite.exception

Examples of org.dmlite.exception.OrderException


        destinationEntities.add(collection);
        modelMeta.setParents(destinationEntities, this);
        destinationEntities.setSourceEntities(this);
      } else {
        String error = "There is no domain model.";
        throw new OrderException(error);
      }
    } catch (Exception e) {
      log.error("Error in OrderedEntities.getEntities: " + entitiesClass
          + " === " + e.getMessage());
      throw new OrderException(e.getMessage());
    }
    return (IOrderedEntities<T>) destinationEntities;
  }
View Full Code Here


   */
  protected Collection<T> getCollection(OrderCriteria<T> orderCriteria)
      throws OrderException {
    if (orderCriteria == null) {
      String error = "Order criteria cannot be null.";
      throw new OrderException(error);
    }

    Collection<T> result = new ArrayList<T>();
    String propertyCode = orderCriteria.getPropertyCode();
    boolean ascending = orderCriteria.isAscending();
    Comparator<T> specificComparator = orderCriteria
        .getEntityComparator();

    Sorter<T> sorter = new Sorter<T>();
    if (specificComparator == null) {
      if (propertyCode == null) {
        String error = "Order criteria property code cannot be null.";
        throw new OrderException(error);
      }
      if (ascending) {
        result = sorter.sort(getList(), propertyCode, true);
      } else {
        result = sorter.sort(getList(), propertyCode, false);
View Full Code Here

      IOrderedEntities orderedEntities = null;
      if (entities instanceof IOrderedEntities) {
        orderedEntities = (IOrderedEntities) entities;
      } else {
        throw new OrderException(entities.getConceptConfig()
            .getEntitiesCode()
            + " entities are not ordered.");
      }
      List propertyValueList = orderedEntities
          .getPropertyList(propertyCode);
View Full Code Here

    IOrderedEntities orderedContextEntities = null;
    try {
      if (getContextEntities() instanceof IOrderedEntities) {
        orderedContextEntities = (IOrderedEntities) getContextEntities();
      } else {
        throw new OrderException("Context entities are not ordered: "
            + getContextEntities().getConceptConfig()
                .getEntitiesCode());
      }
    } catch (OrderException e) {
      log.error("Error in ModelContext: " + " - " + e.getMessage());
View Full Code Here

    IOrderedEntities orderedEntities = null;
    try {
      if (getEntities() instanceof IOrderedEntities) {
        orderedEntities = (IOrderedEntities) getEntities();
      } else {
        throw new OrderException("Entities are not ordered: "
            + getEntities().getConceptConfig().getEntitiesCode());
      }
    } catch (OrderException e) {
      log.error("Error in ModelContext: " + " - " + e.getMessage());
    }
View Full Code Here

    IOrderedEntities orderedLookupEntities = null;
    try {
      if (getLookupEntities() instanceof IOrderedEntities) {
        orderedLookupEntities = (IOrderedEntities) getLookupEntities();
      } else {
        throw new OrderException("Lookup entities are not ordered: "
            + getLookupEntities().getConceptConfig()
                .getEntitiesCode());
      }
    } catch (OrderException e) {
      log.error("Error in ModelContext: " + " - " + e.getMessage());
View Full Code Here

            IOrderedEntities validationTypeEntitiesOrderedByCode = orderedValidationTypeEntities
                .getOrderByCode();
            validationTypeList = validationTypeEntitiesOrderedByCode
                .getCodeList();
          } else {
            throw new OrderException(validationTypeEntities
                .getConceptConfig().getEntitiesCode()
                + " entities are not ordered.");
          }
          PropertyModel propertyModel = new PropertyModel(entity,
              propertyCode, propertyClass);
View Full Code Here

TOP

Related Classes of org.dmlite.exception.OrderException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.