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

How to use
tryGet
method
in
leap.db.DbPlatforms

Best Java code snippets using leap.db.DbPlatforms.tryGet (Showing top 3 results out of 315)

origin: org.leapframework/leap-db

/**
 * Checks is the db type aleady registered. the name compares ignore case.
 */
public static boolean exists(String name){
  return tryGet(name) != null;
}
origin: org.leapframework/leap-db

/**
 * Returns the {@link DbPlatform} matched the given db type name.
 * 
 * <p>
 * The type name is case sensitive.
 * 
 * @throws ObjectNotFoundException if the given type name not exists.
 */
public static DbPlatform get(String name) throws ObjectNotFoundException {
  DbPlatform p = tryGet(name);
  if(null == p){
    throw new ObjectNotFoundException("No db platform '" + name + "' exists");	
  }
  return p;
}

origin: org.leapframework/leap-orm

  protected String resolveDbType(Resource r) {
    String filename = r.getFilename();
    if(null != filename){
      String filenameWithoutExt = Paths.getFileNameWithoutExtension(filename);
      int lastIndexOfUnderscore = filenameWithoutExt.lastIndexOf('_');
      if(lastIndexOfUnderscore > 0){
        String dbType = filenameWithoutExt.substring(lastIndexOfUnderscore + 1);
        if(DbPlatforms.tryGet(dbType) != null){
          return dbType;
        }
      }
    }
    return null;
  }
}
leap.dbDbPlatformstryGet

Javadoc

Returns the DbPlatform matched the given db type name.

Returns null if the given db type name not found.

The type name is case sensitive.

Popular methods of DbPlatforms

  • all
    Returns all the registered DbPlatform objects.
  • currentPlatforms

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • 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
  • JFrame (javax.swing)
  • Top 17 Free Sublime Text Plugins
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