public final class JdbcRepositories extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JdbcRepositories.CreateTableResult
createTableResult model for view to show.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
existTable(String tableName)
Checks whether a table specified by the given table name exists.
|
static String |
getDefaultKeyName()
Gets the default key name.
|
static List<FieldDefinition> |
getKeys(String repositoryName)
Gets keys of the repository specified by the given repository name.
|
static List<RepositoryDefinition> |
getRepositoryDefinitions()
Gets the repository definitions,lazy load.
|
static List<JdbcRepositories.CreateTableResult> |
initAllTables()
Initializes all tables from repository.json.
|
static void |
initRepositoryJSON(String tablePrefix,
Set<String> tableNames,
String destPath)
Generates repository.json from databases.
|
static void |
setDefaultKeyName(String keyName)
Sets the default key name.
|
static void |
setRepositoryDefinitions(List<RepositoryDefinition> repositoryDefinitions)
Sets the repository definitions.
|
public static void setDefaultKeyName(String keyName)
keyName - the specified key namepublic static String getDefaultKeyName()
public static List<FieldDefinition> getKeys(String repositoryName)
repositoryName - the given repository namepublic static List<RepositoryDefinition> getRepositoryDefinitions()
public static boolean existTable(String tableName)
tableName - the given table nametrue if it exists, returns false otherwisepublic static List<JdbcRepositories.CreateTableResult> initAllTables()
public static void initRepositoryJSON(String tablePrefix, Set<String> tableNames, String destPath)
tablePrefix - the specified table prefix, for example "symphony_". An empty string "" means no table prefixtableNames - the specified table names for generationdestPath - the specified path of repository.json file to generatepublic static void setRepositoryDefinitions(List<RepositoryDefinition> repositoryDefinitions)
repositoryDefinitions - repositoryDefinitionsCopyright © 2009–2019 B3log. All rights reserved.