Codota Logo
Query.list
Code IndexAdd Codota to your IDE (free)

How to use
list
method
in
leap.orm.query.Query

Best Java code snippets using leap.orm.query.Query.list (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: org.leapframework/jmms-core

public List<Record> queryList(String sql, Map<String, Object> params) {
  return createQuery(sql, params).list();
}
origin: org.leapframework/leap-oauth2-server

@Override
public List<AuthzSSOLogin> loadLoginsInSession(AuthzSSOSession session) {
  List<AuthzSSOLoginEntity> entities = null;
  if(null != loadLoginsInSessionCommand) {
    entities = dao.createQuery(AuthzSSOLoginEntity.class, loadLoginsInSessionCommand).list();
  }else{
    entities = dao.createCriteriaQuery(AuthzSSOLoginEntity.class).where("session_id = ?", session.getId()).list();
  }
  List<AuthzSSOLogin> logins = new ArrayList<>();
  for(AuthzSSOLoginEntity entity : entities) {
    logins.add(createLoginFromEntity(entity));
  }
  return logins;
}
origin: org.leapframework/leap-oauth2

@Override
public List<AuthzSSOLogin> loadLoginsInSession(AuthzSSOSession session) {
  List<AuthzSSOLoginEntity> entities = null;
  if(null != loadLoginsInSessionCommand) {
    entities = dao.createQuery(AuthzSSOLoginEntity.class, loadLoginsInSessionCommand).list();
  }else{
    entities = dao.createCriteriaQuery(AuthzSSOLoginEntity.class).where("session_id = ?", session.getId()).list();
  }
  List<AuthzSSOLogin> logins = new ArrayList<>();
  for(AuthzSSOLoginEntity entity : entities) {
    logins.add(createLoginFromEntity(entity));
  }
  return logins;
}
origin: org.leapframework/leap-webapi

@Override
public Object apply(ActionParams params) {
  Map<String,Object> map = params.toMap();
  Object result;
  if(command.getMetadata().isSelect()) {
    //todo: page query, total count
    Query query = dao.createQuery(command).params(map);
    if(null != returnType) {
      if(returnType.isSimpleType()) {
        result = Converts.convert(query.scalarValueOrNull(), returnType.asSimpleType().getJavaType());
      }else if(returnType.isCollectionType() && returnType.asCollectionType().getElementType().isSimpleType()) {
        result = query.scalars().list(returnType.asCollectionType().getElementType().asSimpleType().getJavaType());
      }else {
        result = query.list();
      }
    }else {
      result = query.list();
    }
  }else{
    //todo: the return type must be simple type
    result = dao.executeUpdate(command, map);
    if(null != returnType) {
      result = Converts.convert(result, returnType.asSimpleType().getJavaType());
    }
  }
  return ApiResponse.of(result);
}
leap.orm.queryQuerylist

Javadoc

Executes this query and return all the rows as a immutable List object.

Returns a empty immutable List if no result returned.

Popular methods of Query

  • firstOrNull
    Executes this query and return the first row. Returns null if no result returned.
  • params
    Sets a ArrayParams for jdbc placeholders in this query.
  • singleOrNull
    Executes this query and return the first row. Returns null if no result returned.
  • result
    Executes this query and return the query result.
  • scalarOrNull
    Returns the Scalar value in this query result or null if no records returned.
  • scalars
    Returns all the scalar values of the first column in this query result.
  • count
    Executes a count(*) query and returns the total count of records.
  • pageResult
  • param
  • scalar
    Returns the Scalar value in this query result.
  • scalarValueOrNull
    Returns the scalar value or null if n o records returned.
  • scalarValueOrNull

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • findViewById (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Menu (java.awt)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • JFileChooser (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now