public interface Project extends Document, HasEnabled, HasId, HasName, HasPackageName, HasChildren, HasMainInterface, HasMutator<ProjectMutator<? extends Project>>
Document
that represents a database project. A
Project
is the root of the document tree and can have multiple
Dbmses
as children.Modifier and Type | Field and Description |
---|---|
static String |
APP_ID |
static String |
COMPANY_NAME |
static String |
CONFIG_PATH |
static String |
DBMSES |
static String |
DEFAULT_COMPANY_NAME |
static String |
DEFAULT_PACKAGE_LOCATION |
static String |
DEFAULT_PACKAGE_NAME |
static String |
DEFAULT_PROJECT_NAME |
static String |
PACKAGE_LOCATION |
static Pattern |
SPLIT_PATTERN |
ENABLED, ENABLED_DEFAULT
PACKAGE_NAME
Modifier and Type | Method and Description |
---|---|
Stream<? extends Dbms> |
dbmses()
Return a
Stream of all dbmses that exists in this Project. |
default Table |
findTableByName(String fullName)
Locates the table with the specified full name in this project.
|
default String |
getAppId()
Returns the unique id for this application.
|
default String |
getCompanyName()
Returns the name of the company that should be used in generated code.
|
default Optional<Path> |
getConfigPath()
Returns the path to the configuration file for this project.
|
default String |
getPackageLocation()
Returns where the code generated for this project will be located.
|
default Class<Project> |
mainInterface()
Returns the
Class of the interface of this node. |
default ProjectMutator<? extends Project> |
mutator()
Returns a
DocumentMutator for this Document. |
isEnabled, of, test
ancestors, children, children, get, getAsBoolean, getAsDouble, getAsInt, getAsLong, getAsString, getData, getParent, put
getPackageName, of
defaultNameFor
static final String COMPANY_NAME
static final String PACKAGE_LOCATION
static final String CONFIG_PATH
static final String DBMSES
static final String APP_ID
static final String DEFAULT_COMPANY_NAME
static final String DEFAULT_PACKAGE_NAME
static final String DEFAULT_PACKAGE_LOCATION
static final String DEFAULT_PROJECT_NAME
static final Pattern SPLIT_PATTERN
default String getCompanyName()
default String getPackageLocation()
default String getAppId()
UUID
.default Optional<Path> getConfigPath()
empty
.Stream<? extends Dbms> dbmses()
Stream
of all dbmses that exists in this Project.default Class<Project> mainInterface()
HasMainInterface
Class
of the interface of this node.
This should not be overridden by implementing classes!
mainInterface
in interface HasMainInterface
default ProjectMutator<? extends Project> mutator()
HasMutator
DocumentMutator
for this Document. A DocumentMutator
allows a Document to be updated in a type safe way.mutator
in interface HasMutator<ProjectMutator<? extends Project>>
default Table findTableByName(String fullName)
Dbms
, the name of the Schema
and the name of the
Table
. If the inputed name is malformed, an
IllegalArgumentException
will be thrown.
Example of a valid name: db0.socialnetwork.image
If no table matching the specified name was found, an exception is also thrown.
fullName
- the full name of the tableCopyright © 2017 Speedment, Inc.. All rights reserved.