Example usage for com.mongodb.client.model Filters eq

List of usage examples for com.mongodb.client.model Filters eq

Introduction

In this page you can find the example usage for com.mongodb.client.model Filters eq.

Prototype

public static <TItem> Bson eq(final String fieldName, @Nullable final TItem value) 

Source Link

Document

Creates a filter that matches all documents where the value of the field name equals the specified value.

Usage

From source file:io.lumeer.storage.mongodb.dao.system.MongoUserDao.java

License:Open Source License

private List<Bson> arrayFilters(final String organizationId) {
    Bson filter = Filters.eq(MongoUtils.concatParams(ELEMENT_NAME, UserCodec.ORGANIZATION_ID), organizationId);
    return Collections.singletonList(filter);
}

From source file:io.lumeer.storage.mongodb.dao.system.MongoUserDao.java

License:Open Source License

@Override
public User getUserByEmail(final String email) {
    Bson emailFilter = Filters.eq(UserCodec.EMAIL, email);

    return databaseCollection().find(emailFilter).first();
}

From source file:io.lumeer.storage.mongodb.dao.system.MongoUserDao.java

License:Open Source License

@Override
public User getUserByAuthId(final String authId) {
    Bson authIdFilter = Filters.eq(UserCodec.AUTH_IDS, authId);

    return databaseCollection().find(authIdFilter).first();
}

From source file:io.lumeer.storage.mongodb.dao.system.MongoUserDao.java

License:Open Source License

private Bson organizationIdFilter(final String organizationId) {
    return Filters.elemMatch(UserCodec.ALL_GROUPS, Filters.eq(UserCodec.ORGANIZATION_ID, organizationId));
}

From source file:io.lumeer.storage.mongodb.util.MongoFilters.java

License:Open Source License

public static Bson idFilter(String id) {
    return Filters.eq(ID, new ObjectId(id));
}

From source file:io.lumeer.storage.mongodb.util.MongoFilters.java

License:Open Source License

public static Bson paymentIdFilter(final String paymentId) {
    return Filters.eq(Payment.PAYMENT_ID, paymentId);
}

From source file:io.lumeer.storage.mongodb.util.MongoFilters.java

License:Open Source License

public static Bson paymentStateFilter(final int stateId) {
    return Filters.eq(Payment.STATE, stateId);
}

From source file:io.lumeer.storage.mongodb.util.MongoFilters.java

License:Open Source License

public static Bson companyOrganizationIdFilter(final String organizationId) {
    return Filters.eq(CompanyContact.ORGANIZATION_ID, organizationId);
}

From source file:io.lumeer.storage.mongodb.util.MongoFilters.java

License:Open Source License

public static Bson codeFilter(String code) {
    return Filters.eq(CODE, code);
}

From source file:io.lumeer.storage.mongodb.util.MongoFilters.java

License:Open Source License

private static Bson entityNameFilter(String name) {
    return Filters.eq(PermissionCodec.ID, name);
}