Showing
1 changed file
with
81 additions
and
0 deletions
1 | +/** | |
2 | + * Copyright © 2016-2018 The Thingsboard Authors | |
3 | + * | |
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | + * you may not use this file except in compliance with the License. | |
6 | + * You may obtain a copy of the License at | |
7 | + * | |
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | + * | |
10 | + * Unless required by applicable law or agreed to in writing, software | |
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | + * See the License for the specific language governing permissions and | |
14 | + * limitations under the License. | |
15 | + */ | |
16 | +package org.thingsboard.server.dao.entityview; | |
17 | + | |
18 | +import org.thingsboard.server.common.data.EntityView; | |
19 | +import org.thingsboard.server.common.data.page.TextPageLink; | |
20 | +import org.thingsboard.server.dao.Dao; | |
21 | + | |
22 | +import java.util.List; | |
23 | +import java.util.Optional; | |
24 | +import java.util.UUID; | |
25 | + | |
26 | +/** | |
27 | + * Created by Victor Basanets on 8/28/2017. | |
28 | + */ | |
29 | +public interface EntityViewDao extends Dao<EntityView> { | |
30 | + | |
31 | + /** | |
32 | + * Find entity views by tenantId and page link. | |
33 | + * | |
34 | + * @param tenantId the tenantId | |
35 | + * @param pageLink the page link | |
36 | + * @return the list of entity view objects | |
37 | + */ | |
38 | + List<EntityView> findEntityViewByTenantId(UUID tenantId, TextPageLink pageLink); | |
39 | + | |
40 | + /** | |
41 | + * Find entity views by tenantId and entity view name. | |
42 | + * | |
43 | + * @param tenantId the tenantId | |
44 | + * @param name the entity view name | |
45 | + * @return the optional entity view object | |
46 | + */ | |
47 | + Optional<EntityView> findEntityViewByTenantIdAndName(UUID tenantId, String name); | |
48 | + | |
49 | + /** | |
50 | + * Find entity views by tenantId, type and page link. | |
51 | + * | |
52 | + * @param tenantId the tenantId | |
53 | + * @param type the type | |
54 | + * @param pageLink the page link | |
55 | + * @return the list of entity view objects | |
56 | + */ | |
57 | + List<EntityView> findEntityViewByTenantIdAndType(UUID tenantId, String type, TextPageLink pageLink); | |
58 | + | |
59 | + /** | |
60 | + * Find entity views by tenantId, customerId and page link. | |
61 | + * | |
62 | + * @param tenantId the tenantId | |
63 | + * @param customerId the customerId | |
64 | + * @param pageLink the page link | |
65 | + * @return the list of entity view objects | |
66 | + */ | |
67 | + List<EntityView> findEntityViewsByTenantIdAndCustomerId(UUID tenantId, UUID customerId, TextPageLink pageLink); | |
68 | + | |
69 | + /** | |
70 | + * Find entity views by tenantId, customerId, type and page link. | |
71 | + * | |
72 | + * @param tenantId the tenantId | |
73 | + * @param customerId the customerId | |
74 | + * @param type the type | |
75 | + * @param pageLink the page link | |
76 | + * @return the list of entity view objects | |
77 | + */ | |
78 | + List<EntityView> findEntityViewsByTenantIdAndCustomerIdAndType(UUID tenantId, UUID customerId, String type, | |
79 | + TextPageLink pageLink); | |
80 | + | |
81 | +} | ... | ... |