public class InternalAccountQuery extends InternalQuery<AccountState>
Instances are one-time-use. Other singleton classes should inject a Provider rather than holding on to a single instance.
indexConfig
Modifier and Type | Method and Description |
---|---|
java.util.List<AccountState> |
byDefault(java.lang.String query) |
java.util.List<AccountState> |
byExternalId(ExternalId.Key externalId) |
java.util.List<AccountState> |
byExternalId(java.lang.String scheme,
java.lang.String id) |
java.util.List<AccountState> |
byFullName(java.lang.String fullName) |
com.google.common.collect.Multimap<java.lang.String,AccountState> |
byPreferredEmail(java.lang.String... emails)
Makes multiple queries for accounts by preferred email (exact match).
|
java.util.List<AccountState> |
byPreferredEmail(java.lang.String email)
Queries for accounts that have a preferred email that exactly matches the given email.
|
java.util.List<AccountState> |
byWatchedProject(Project.NameKey project) |
InternalAccountQuery |
enforceVisibility(boolean enforce) |
InternalAccountQuery |
noFields() |
AccountState |
oneByExternalId(ExternalId.Key externalId) |
InternalAccountQuery |
setLimit(int n) |
InternalAccountQuery |
setRequestedFields(FieldDef<AccountState,?>... fields) |
query, query, schema
public InternalAccountQuery setLimit(int n)
setLimit
in class InternalQuery<AccountState>
public InternalAccountQuery enforceVisibility(boolean enforce)
enforceVisibility
in class InternalQuery<AccountState>
@SafeVarargs public final InternalAccountQuery setRequestedFields(FieldDef<AccountState,?>... fields)
setRequestedFields
in class InternalQuery<AccountState>
public InternalAccountQuery noFields()
noFields
in class InternalQuery<AccountState>
public java.util.List<AccountState> byDefault(java.lang.String query) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.List<AccountState> byExternalId(java.lang.String scheme, java.lang.String id) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.List<AccountState> byExternalId(ExternalId.Key externalId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public AccountState oneByExternalId(ExternalId.Key externalId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.List<AccountState> byFullName(java.lang.String fullName) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public java.util.List<AccountState> byPreferredEmail(java.lang.String email) throws com.google.gwtorm.server.OrmException
email
- preferred email by which accounts should be foundcom.google.gwtorm.server.OrmException
- if query cannot be parsedpublic com.google.common.collect.Multimap<java.lang.String,AccountState> byPreferredEmail(java.lang.String... emails) throws com.google.gwtorm.server.OrmException
emails
- preferred emails by which accounts should be foundcom.google.gwtorm.server.OrmException
- if query cannot be parsedpublic java.util.List<AccountState> byWatchedProject(Project.NameKey project) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException