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 String |
SPEEDMENT_VERSION |
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. |
static Project |
deepCopy(Project existing)
Creates and returns a mutable deep-copy of the specified 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 Optional<String> |
getSpeedmentVersion()
Returns the version of Speedment that was used to generate the code.
|
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 SPEEDMENT_VERSION
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
static Project deepCopy(Project existing)
existing
- the existing projectdefault String getCompanyName()
default String getPackageLocation()
default Optional<String> getSpeedmentVersion()
The version has the following structure:
speedment:3.0.21-SNAPSHOT
First comes the name of the edition (simply speedment
for the
open-source edition) followed by a comma and the Maven version.
If this value is not present, it should be read as the generated version
being unknown. This probably means that it was generated with an older
version of Speedment than 3.0.21
in the case of the open-source
edition.
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 © 2018 Speedment, Inc.. All rights reserved.