public interface Project extends Document, HasEnabled, HasDeepCopy, 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 | Method and Description |
---|---|
Stream<Dbms> |
dbmses()
Return a
Stream of all dbmses that exists in this Project. |
default Project |
deepCopy()
Returns a mutable copy of this document.
|
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 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<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 tabledefault Project deepCopy()
HasDeepCopy
deepCopy
in interface HasDeepCopy
Copyright © 2019 Speedment, Inc.. All rights reserved.