Package org.n52.series.db.generator
Class AbstractGenerator
- java.lang.Object
-
- org.n52.series.db.generator.AbstractGenerator
-
- Direct Known Subclasses:
SQLScriptGenerator,TableMetadataGenerator
public abstract class AbstractGenerator extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractGenerator.ColumnMetadata(package private) static classAbstractGenerator.Concept(package private) static classAbstractGenerator.DialectSelector(package private) static classAbstractGenerator.Featurestatic interfaceAbstractGenerator.Meta(package private) static classAbstractGenerator.Profilestatic classAbstractGenerator.TableMetadata
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractGenerator()protectedAbstractGenerator(boolean print)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddConceptDirectories(AbstractGenerator.Concept concept, AbstractGenerator.Profile profile, AbstractGenerator.Feature feature, org.hibernate.cfg.Configuration configuration, org.hibernate.boot.MetadataSources metadataSources)protected StringcreateFileName(String prefix, String ending, Enum... values)protected intgetConceptSelection()protected org.hibernate.dialect.DialectgetDialect(AbstractGenerator.DialectSelector selection, boolean comments)protected intgetDialectSelection()protected FilegetDirectory(String path)protected List<String>getFeatureConceptDirectories(AbstractGenerator.Feature concept, org.hibernate.cfg.Configuration configuration, org.hibernate.boot.MetadataSources metadataSources)protected intgetFeatureConceptSelection()protected intgetModelSelection()protected Collection<String>getProfileDirectories(String p, AbstractGenerator.Profile profile)protected static voidprintEnterYourSelection()protected static voidprintToScreen(String lineToPrint)protected voidprintToSysout(String lineToPrint)protected intreadSelectionFromStdIo()protected intreadSelectionFromStdIoWithDefault(int defaultValue)protected voidsetDirectoriesForModelSelection(AbstractGenerator.Concept concept, AbstractGenerator.Profile profile, AbstractGenerator.Feature feature, org.hibernate.cfg.Configuration configuration, org.hibernate.boot.MetadataSources metadataSources)
-
-
-
Field Detail
-
NEW_LINE
protected static final String NEW_LINE
- See Also:
- Constant Field Values
-
PIPE
protected static final String PIPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDialect
protected org.hibernate.dialect.Dialect getDialect(AbstractGenerator.DialectSelector selection, boolean comments) throws Exception
- Throws:
Exception
-
getDialectSelection
protected int getDialectSelection() throws IOException- Throws:
IOException
-
getModelSelection
protected int getModelSelection() throws IOException- Throws:
IOException
-
getConceptSelection
protected int getConceptSelection() throws IOException- Throws:
IOException
-
getFeatureConceptSelection
protected int getFeatureConceptSelection() throws IOException- Throws:
IOException
-
setDirectoriesForModelSelection
protected void setDirectoriesForModelSelection(AbstractGenerator.Concept concept, AbstractGenerator.Profile profile, AbstractGenerator.Feature feature, org.hibernate.cfg.Configuration configuration, org.hibernate.boot.MetadataSources metadataSources) throws Exception
- Throws:
Exception
-
addConceptDirectories
protected void addConceptDirectories(AbstractGenerator.Concept concept, AbstractGenerator.Profile profile, AbstractGenerator.Feature feature, org.hibernate.cfg.Configuration configuration, org.hibernate.boot.MetadataSources metadataSources) throws Exception
- Throws:
Exception
-
getFeatureConceptDirectories
protected List<String> getFeatureConceptDirectories(AbstractGenerator.Feature concept, org.hibernate.cfg.Configuration configuration, org.hibernate.boot.MetadataSources metadataSources) throws Exception
- Throws:
Exception
-
getProfileDirectories
protected Collection<String> getProfileDirectories(String p, AbstractGenerator.Profile profile)
-
getDirectory
protected File getDirectory(String path) throws URISyntaxException
- Throws:
URISyntaxException
-
printToScreen
protected static void printToScreen(String lineToPrint)
-
printEnterYourSelection
protected static void printEnterYourSelection()
-
printToSysout
protected void printToSysout(String lineToPrint)
-
readSelectionFromStdIo
protected int readSelectionFromStdIo() throws IOException- Throws:
IOException
-
readSelectionFromStdIoWithDefault
protected int readSelectionFromStdIoWithDefault(int defaultValue) throws IOException- Throws:
IOException
-
-