Package org.company.recordshop.domain

Examples of org.company.recordshop.domain.RecordExample


   *
   * @return {@link RecordExample}, the resulting businessclass object.
   */
  public RecordExample exampleFromDto(final SimpleRecordDto source) {
    Assert.notNull(source, "argument [source] may not be null");
    RecordExample result = new RecordExample();

    if (source.getAsin() != null) {
      result.setAsin(source.getAsin());
    }
    if (source.getPrice() != null) {
      result.setPrice(source.getPrice());
    }
    if (source.getType() != null) {
      result.setType(typeTranslator.fromDto(source.getType()));
    }

    return result;
  }
View Full Code Here


   *
   * @return {@link RecordExample}, the resulting businessclass object.
   */
  public RecordExample exampleFromDto(final FullRecordDto source) {
    Assert.notNull(source, "argument [source] may not be null");
    RecordExample result = new RecordExample();

    if (source.getAsin() != null) {
      result.setAsin(source.getAsin());
    }
    if (source.getTitle() != null) {
      result.setTitle(source.getTitle());
    }
    if (source.getMediumCode() != null) {
      result.setMediumCode(source.getMediumCode());
    }
    if (source.getPrice() != null) {
      result.setPrice(source.getPrice());
    }
    if (source.getType() != null) {
      result.setType(typeTranslator.fromDto(source.getType()));
    }

    return result;
  }
View Full Code Here

   */
  public List<FullRecordDto> findRecords(FullRecordDto filter) {
    List<Record> found = null;
    List<FullRecordDto> result = new ArrayList<FullRecordDto>();

    RecordExample example = fullRecordDtoTranslator.exampleFromDto(filter);
    found = recordsDomainService.findRecordByExample(example);

    for (Record object : found) {
      FullRecordDto item = fullRecordDtoTranslator.toDto(object);
      result.add(item);
View Full Code Here

   */
  public List<FullRecordDto> findRecords(final FullRecordDto exampleDto,
      final int firstResult, final int maxResults,
      final String sortProperty, final boolean isAscending) {

    RecordExample example = fullRecordDtoTranslator
        .exampleFromDto(exampleDto);

    List<Record> range = recordsDomainService.findRecordByExampleCount(
        example, firstResult, maxResults, sortProperty, isAscending);
    List<FullRecordDto> result = new ArrayList<FullRecordDto>();
View Full Code Here

TOP

Related Classes of org.company.recordshop.domain.RecordExample

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.