congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Query.list
Code IndexAdd Tabnine 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)

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

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JTextField (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now