congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Query.firstOrNull
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.leapframework/leap-orm

/**
 * Returns true if the result has records, or returns false if no records.
 */
default boolean exists() {
  return firstOrNull() != null;
}

origin: org.leapframework/leap-oauth2

protected AuthzClientEntity loadAuthzClientEntity(String clientId){
  AuthzClientEntity entity;
  if(null == loadClientCommand) {
    entity = dao.findOrNull(AuthzClientEntity.class, clientId);
  }else{
    entity = dao.createQuery(AuthzClientEntity.class, loadClientCommand).firstOrNull();
  }
  return entity;
}
origin: org.leapframework/leap-oauth2-server

protected AuthzClientEntity loadAuthzClientEntity(String clientId){
  AuthzClientEntity entity;
  if(null == loadClientCommand) {
    entity = dao.findOrNull(AuthzClientEntity.class, clientId);
  }else{
    entity = dao.createQuery(AuthzClientEntity.class, loadClientCommand).firstOrNull();
  }
  return entity;
}
origin: org.leapframework/leap-oauth2

@Override
public AuthzCode loadAuthorizationCode(String code) {
  AuthzCodeEntity entity;
  if(null == loadAuthorizationCodeCommand) {
    entity = dao.findOrNull(AuthzCodeEntity.class, code);
  }else{
    entity = dao.createQuery(AuthzCodeEntity.class, loadAuthorizationCodeCommand).firstOrNull();
  }
  return null == entity ? null : createAuthzCodeFromEntity(entity);
}
origin: org.leapframework/leap-oauth2-server

@Override
public AuthzCode loadAuthorizationCode(String code) {
  AuthzCodeEntity entity;
  if(null == loadAuthorizationCodeCommand) {
    entity = dao.findOrNull(AuthzCodeEntity.class, code);
  }else{
    entity = dao.createQuery(AuthzCodeEntity.class, loadAuthorizationCodeCommand).firstOrNull();
  }
  return null == entity ? null : createAuthzCodeFromEntity(entity);
}
leap.orm.queryQueryfirstOrNull

Javadoc

Executes this query and return the first row.

Returns null if no result returned.

Popular methods of Query

  • list
    Executes this query and return all the rows as a immutable List object. Returns a empty immutable Li
  • 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

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • setScale (BigDecimal)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JComboBox (javax.swing)
  • JList (javax.swing)
  • JPanel (javax.swing)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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