Tabnine Logo
DbPlatforms
Code IndexAdd Tabnine to your IDE (free)

How to use
DbPlatforms
in
leap.db

Best Java code snippets using leap.db.DbPlatforms (Showing top 7 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 all the registered {@link DbPlatform} objects.
 */
public static Iterable<DbPlatform> all(){
  return currentPlatforms().values();
}

origin: org.leapframework/leap-db

for(DbPlatform platform : DbPlatforms.all()){
  if((db = platform.tryCreateDbInstance(name,ds,connection,dm)) != null){
    break;
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-db

/**
 * Returns the {@link DbPlatform} matched the given db type name.
 * 
 * <p>
 * Returns <code>null</code> if the given db type name not found.
 * 
 * <p>
 * The type name is case sensitive.
 */
public static DbPlatform tryGet(String name) throws ObjectNotFoundException {
  if(null == name){
    return null;
  }
  return currentPlatforms().get(name.toLowerCase());
}
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;
  }
}
origin: org.leapframework/leap-db

private static Map<String,DbPlatform> currentPlatforms(){
  return currentPlatforms(AppContext.current());
}

leap.dbDbPlatforms

Most used methods

  • tryGet
    Returns the DbPlatform matched the given db type name. Returns null if the given db type name not fo
  • all
    Returns all the registered DbPlatform objects.
  • currentPlatforms

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
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