org.exoplatform.services.organization.Query.getUserName()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(235)

本文整理了Java中org.exoplatform.services.organization.Query.getUserName方法的一些代码示例,展示了Query.getUserName的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getUserName方法的具体详情如下:
包路径:org.exoplatform.services.organization.Query
类名称:Query
方法名:getUserName

Query.getUserName介绍

暂无

代码示例

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

String getQueryKey(Query query, UserStatus userStatus) {
    StringBuilder sb = new StringBuilder();
    String SEP = ":::";

    sb.append(query.getEmail()).append(SEP).append(query.getFirstName()).append(SEP).append(query.getLastName())
        .append(SEP).append(query.getUserName()).append(SEP).append(query.getFromLoginDate()).append(SEP)
        .append(query.getToLoginDate()).append(SEP).append(userStatus.name()).append(SEP);

    return sb.toString();
  }
}

代码示例来源:origin: org.exoplatform.core/exo.core.component.organization.ldap

if (q.getUserName() != null && q.getUserName().length() > 0)
  list.add("(" + ldapAttrMapping.userUsernameAttr + "=" + addAsterisks(q.getUserName()) + ")");

代码示例来源:origin: org.exoplatform.core/exo.core.component.organization.jdbc

/**
* Query( name = "" , standardSQL = "..." oracleSQL = "..." )
*/
public ListAccess<User> findUsersByQuery(Query orgQuery) throws Exception
{
 DBObjectQuery<UserImpl> dbQuery = new DBObjectQuery<UserImpl>(UserImpl.class);
 if (orgQuery.getUserName() != null)
 {
   dbQuery.addLIKE("UPPER(USER_NAME)", addAsterisk(orgQuery.getUserName().toUpperCase()));
 }
 if (orgQuery.getFirstName() != null)
 {
   dbQuery.addLIKE("UPPER(FIRST_NAME)", orgQuery.getFirstName().toUpperCase());
 }
 if (orgQuery.getLastName() != null)
 {
   dbQuery.addLIKE("UPPER(LAST_NAME)", orgQuery.getLastName().toUpperCase());
 }
 dbQuery.addLIKE("EMAIL", orgQuery.getEmail());
 dbQuery.addGT("LAST_LOGIN_TIME", orgQuery.getFromLoginDate());
 dbQuery.addLT("LAST_LOGIN_TIME", orgQuery.getToLoginDate());
 return new JDBCListAccess<User>(this, dbQuery.toQuery(), dbQuery.toCountQuery());
}

代码示例来源:origin: org.exoplatform.core/exo.core.component.organization.jdbc

/**
* {@inheritDoc}
*/
public ListAccess<User> findUsersByQuery(Query q) throws Exception
{
 ObjectQuery oq = new ObjectQuery(UserImpl.class);
 if (q.getUserName() != null)
 {
   oq.addLIKE("UPPER(userName)", addAsterisk(q.getUserName().toUpperCase()));
 }
 if (q.getFirstName() != null)
 {
   oq.addLIKE("UPPER(firstName)", q.getFirstName().toUpperCase());
 }
 if (q.getLastName() != null)
 {
   oq.addLIKE("UPPER(lastName)", q.getLastName().toUpperCase());
 }
 oq.addLIKE("email", q.getEmail());
 oq.addGT("lastLoginTime", q.getFromLoginDate());
 oq.addLT("lastLoginTime", q.getToLoginDate());
 return new HibernateListAccess<User>(service_, oq.getHibernateQueryWithBinding(),
   oq.getHibernateCountQueryWithBinding(), oq.getBindingFields());
}

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

if (q.getUserName() == null && q.getEmail() != null && q.getFirstName() == null && q.getLastName() == null) {
  final User uniqueUser = findUserByUniqueAttribute(USER_EMAIL, q.getEmail(), userStatus);
if (q.getUserName() != null) {
  String username = q.getUserName();
  if(!username.startsWith("*")) {
    username = "*" + username;
if (q.getUserName() == null && q.getEmail() == null && q.getFirstName() == null && q.getLastName() == null) {
  list = new IDMUserListAccess(qb, 20, !countPaginatedUsers(), userStatus);
} else {

相关文章