コード例 #1
0
  public TrackingConfigurationVo getTrackingConfig(LocationRefVo locationRef) {
    if (locationRef == null)
      throw new CodingRuntimeException(
          "Can not get TrackingConfiguration value on null locationID.");

    StringBuffer hql = new StringBuffer();
    hql.append("select trackConfig from TrackingConfiguration as trackConfig ");
    hql.append("where trackConfig.eDLocation.id = :locationID ");

    DomainFactory factory = getDomainFactory();
    List<?> list =
        factory.find(
            hql.toString(),
            new String[] {"locationID"},
            new Object[] {locationRef.getID_Location()});

    if (list != null && list.size() > 0) {
      return TrackingConfigurationVoAssembler
          .createTrackingConfigurationVoCollectionFromTrackingConfiguration(list)
          .get(0);
    }
    return null;
  }