Project

General

Profile

Revision d791337a

IDd791337a746067661787eab047a7b7c9f8a5c401
Parent 13ec97db
Child 024d9b21

Added by Andreas Kohlbecker over 2 years ago

Revert "ref #7527 renaming CdmEntityDaoBase.ByParam methods"

This reverts commit 13ec97dbc071864563698e422a15ad725e28a55b.

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/CdmEntityDaoBase.java
966 966
     * @param propertyPaths
967 967
     * @return
968 968
     *
969
     * @deprecated consider using {@link #findByParam(Class, String, String, MatchMode, List, Integer, Integer, List, List))
969
     * @deprecated consider using {@link #findByParamWithRestrictions(Class, String, String, MatchMode, List, Integer, Integer, List, List))
970 970
     */
971 971
    @Deprecated
972
    protected List<T> findByParamWithCriterion(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode,
972
    protected List<T> findByParam(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode,
973 973
            List<Criterion> criterion, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints,
974 974
            List<String> propertyPaths) {
975 975

  
......
1017 1017
     * @param criterion
1018 1018
     * @return
1019 1019
     *
1020
     * @deprecated consider using {@link #countByParam(Class, String, String, MatchMode, List)}
1020
     * @deprecated consider using {@link #countByParamWithRestrictions(Class, String, String, MatchMode, List)}
1021 1021
     */
1022 1022
    @Deprecated
1023
    protected long countByParamWithCriterion(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode,
1023
    protected long countByParam(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode,
1024 1024
            List<Criterion> criterion) {
1025 1025

  
1026 1026
        Criteria criteria = null;
......
1114 1114
        return criteria;
1115 1115
    }
1116 1116

  
1117
    protected List<T> findByParam(Class<? extends T> clazz, String param, String queryString,
1117
    protected List<T> findByParamWithRestrictions(Class<? extends T> clazz, String param, String queryString,
1118 1118
            MatchMode matchmode, List<Restriction<?>> restrictions, Integer pageSize, Integer pageNumber,
1119 1119
            List<OrderHint> orderHints, List<String> propertyPaths) {
1120 1120

  
......
1138 1138

  
1139 1139
    }
1140 1140

  
1141
    protected long countByParam(Class<? extends T> clazz, String param, String queryString,
1141
    protected long countByParamWithRestrictions(Class<? extends T> clazz, String param, String queryString,
1142 1142
            MatchMode matchmode, List<Restriction<?>> restrictions) {
1143 1143

  
1144 1144
        Criteria criteria = createCriteria(clazz, param, queryString, matchmode, restrictions, true);
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/GroupDaoImpl.java
81 81

  
82 82
	@Override
83 83
    public long countByName(String queryString,	MatchMode matchmode, List<Criterion> criterion) {
84
		return countByParamWithCriterion(type, "name",queryString,matchmode,criterion);
84
		return countByParam(type, "name",queryString,matchmode,criterion);
85 85
	}
86 86

  
87 87
	@Override
88 88
    public List<Group> findByName(String queryString, MatchMode matchmode, List<Criterion> criterion, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths) {
89
		return findByParamWithCriterion(type, "name", queryString, matchmode, criterion, pageSize, pageNumber, orderHints, propertyPaths);
89
		return findByParam(type, "name", queryString, matchmode, criterion, pageSize, pageNumber, orderHints, propertyPaths);
90 90
	}
91 91
}
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/IdentifiableDaoBase.java
150 150

  
151 151
    @Override
152 152
    public List<T> findByTitle(Class<? extends T> clazz, String queryString, MatchMode matchmode, List<Restriction<?>> restrictions, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths) {
153
        return findByParam(clazz, "titleCache", queryString, matchmode, restrictions, pageSize, pageNumber, orderHints, propertyPaths);
153
        return findByParamWithRestrictions(clazz, "titleCache", queryString, matchmode, restrictions, pageSize, pageNumber, orderHints, propertyPaths);
154 154
    }
155 155

  
156 156
    @Override
157 157
    public List<T> findByReferenceTitle(Class<? extends T> clazz, String queryString, MatchMode matchmode, List<Restriction<?>> restrictions, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths) {
158
        return findByParam(clazz, "title", queryString, matchmode, restrictions, pageSize, pageNumber, orderHints, propertyPaths);
158
        return findByParamWithRestrictions(clazz, "title", queryString, matchmode, restrictions, pageSize, pageNumber, orderHints, propertyPaths);
159 159
    }
160 160

  
161 161
    @Override
......
315 315

  
316 316
    @Override
317 317
    public long countByTitle(Class<? extends T> clazz, String queryString,	MatchMode matchmode, List<Restriction<?>> restrictions) {
318
        return countByParam(clazz, "titleCache", queryString, matchmode, restrictions);
318
        return countByParamWithRestrictions(clazz, "titleCache", queryString, matchmode, restrictions);
319 319
    }
320 320

  
321 321
    @Override
322 322
    public long countByReferenceTitle(Class<? extends T> clazz, String queryString,	MatchMode matchmode, List<Restriction<?>> restrictions) {
323
        return countByParam(clazz, "title", queryString, matchmode, restrictions);
323
        return countByParamWithRestrictions(clazz, "title", queryString, matchmode, restrictions);
324 324
    }
325 325

  
326 326
    @Override
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/UserDaoImpl.java
50 50

  
51 51
    @Override
52 52
    public long countByUsername(String queryString,	MatchMode matchmode, List<Criterion> criterion) {
53
        return countByParamWithCriterion(type, "username",queryString,matchmode,criterion);
53
        return countByParam(type, "username",queryString,matchmode,criterion);
54 54
    }
55 55

  
56 56
    @Override
57 57
    public List<User> findByUsername(String queryString, MatchMode matchmode, List<Criterion> criterion, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths) {
58
        return findByParamWithCriterion(type, "username", queryString, matchmode, criterion, pageSize, pageNumber, orderHints, propertyPaths);
58
        return findByParam(type, "username", queryString, matchmode, criterion, pageSize, pageNumber, orderHints, propertyPaths);
59 59
    }
60 60

  
61 61
}
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/VersionableDaoBase.java
75 75
	}
76 76

  
77 77
    @Override
78
	protected List<T> findByParamWithCriterion(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode, List<Criterion> criterion, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths) {
78
	protected List<T> findByParam(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode, List<Criterion> criterion, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths) {
79 79
    	checkNotInPriorView("IdentifiableDaoBase.findByParam(Class<? extends T> clazz, String queryString, MatchMode matchmode, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)");
80
    	return super.findByParamWithCriterion(clazz, param, queryString, matchmode, criterion, pageSize, pageNumber, orderHints, propertyPaths);
80
    	return super.findByParam(clazz, param, queryString, matchmode, criterion, pageSize, pageNumber, orderHints, propertyPaths);
81 81
    }
82 82

  
83 83
    @Override
84
    protected List<T> findByParam(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode, List<Restriction<?>> restrictions, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths) {
84
    protected List<T> findByParamWithRestrictions(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode, List<Restriction<?>> restrictions, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths) {
85 85
            checkNotInPriorView("IdentifiableDaoBase.findByParam(Class<? extends T> clazz, String queryString, MatchMode matchmode, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)");
86
        return super.findByParam(clazz, param, queryString, matchmode, restrictions, pageSize, pageNumber, orderHints, propertyPaths);
86
        return super.findByParamWithRestrictions(clazz, param, queryString, matchmode, restrictions, pageSize, pageNumber, orderHints, propertyPaths);
87 87
    }
88 88

  
89 89
	@Override
......
383 383
	}
384 384

  
385 385
	@Override
386
	protected long countByParamWithCriterion(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode, List<Criterion> criterion) {
386
	protected long countByParam(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode, List<Criterion> criterion) {
387 387
    	checkNotInPriorView("IdentifiableDaoBase.findByParam(Class<? extends T> clazz, String queryString, MatchMode matchmode, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)");
388
    	return super.countByParamWithCriterion(clazz, param, queryString, matchmode, criterion);
388
    	return super.countByParam(clazz, param, queryString, matchmode, criterion);
389 389
	}
390 390

  
391 391
	@Override
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/molecular/AmplificationDaoHibernateImpl.java
69 69

  
70 70
    @Override
71 71
    public long countByTitle(String queryString, MatchMode matchmode, List<Criterion> criteria) {
72
        return countByParamWithCriterion(Amplification.class, "labelCache", queryString, matchmode, criteria);
72
        return countByParam(Amplification.class, "labelCache", queryString, matchmode, criteria);
73 73
    }
74 74

  
75 75
    @Override
76 76
    public List<Amplification> findByTitle(String queryString, MatchMode matchmode, List<Criterion> criteria,
77 77
            Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths) {
78
        return findByParamWithCriterion(Amplification.class, "labelCache", queryString, matchmode, criteria, pageSize, pageNumber, orderHints, propertyPaths);
78
        return findByParam(Amplification.class, "labelCache", queryString, matchmode, criteria, pageSize, pageNumber, orderHints, propertyPaths);
79 79
    }
80 80
}
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/molecular/PrimerDaoHibernateImpl.java
62 62

  
63 63
    @Override
64 64
    public long countByTitle(String queryString, MatchMode matchmode, List<Criterion> criteria) {
65
        return countByParamWithCriterion(Primer.class, "label", queryString, matchmode, criteria);
65
        return countByParam(Primer.class, "label", queryString, matchmode, criteria);
66 66
    }
67 67

  
68 68
    @Override
69 69
    public List<Primer> findByTitle(String queryString, MatchMode matchmode, List<Criterion> criteria,
70 70
            Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths) {
71
        return findByParamWithCriterion(Primer.class, "label", queryString, matchmode, criteria, pageSize, pageNumber, orderHints, propertyPaths);
71
        return findByParam(Primer.class, "label", queryString, matchmode, criteria, pageSize, pageNumber, orderHints, propertyPaths);
72 72
    }
73 73

  
74 74
    /**
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/name/TaxonNameDaoHibernateImpl.java
781 781

  
782 782
    @Override
783 783
    public long countByName(Class<TaxonName> clazz,String queryString, MatchMode matchmode, List<Criterion> criteria) {
784
        return super.countByParamWithCriterion(clazz, "nameCache", queryString, matchmode, criteria);
784
        return super.countByParam(clazz, "nameCache", queryString, matchmode, criteria);
785 785
    }
786 786

  
787 787
    @Override
788 788
    public List<TaxonName> findByName(Class<TaxonName> clazz,	String queryString, MatchMode matchmode, List<Criterion> criteria,Integer pageSize, Integer pageNumber, List<OrderHint> orderHints,	List<String> propertyPaths) {
789
        return super.findByParamWithCriterion(clazz, "nameCache", queryString, matchmode, criteria, pageSize, pageNumber, orderHints, propertyPaths);
789
        return super.findByParam(clazz, "nameCache", queryString, matchmode, criteria, pageSize, pageNumber, orderHints, propertyPaths);
790 790
    }
791 791

  
792 792
    @Override

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)