Search in sources :

Example 21 with DfLanguageGrammar

use of org.dbflute.logic.generate.language.grammar.DfLanguageGrammar in project dbflute-core by dbflute.

the class DfGapileProcess method createReflector.

protected DfGapileClassReflector createReflector(String gapileDirectory) {
    final DfBasicProperties prop = getBasicProperties();
    final String outputDirectory = prop.getGenerateOutputDirectory();
    final String packageBase = prop.getPackageBase();
    final DfLanguageDependency lang = prop.getLanguageDependency();
    final DfLanguageClassPackage classPackage = lang.getLanguageClassPackage();
    final DfLanguageGrammar grammar = lang.getLanguageGrammar();
    return new DfGapileClassReflector(outputDirectory, packageBase, classPackage, grammar, gapileDirectory);
}
Also used : DfLanguageGrammar(org.dbflute.logic.generate.language.grammar.DfLanguageGrammar) DfLanguageDependency(org.dbflute.logic.generate.language.DfLanguageDependency) DfLanguageClassPackage(org.dbflute.logic.generate.language.pkgstyle.DfLanguageClassPackage) DfBasicProperties(org.dbflute.properties.DfBasicProperties)

Example 22 with DfLanguageGrammar

use of org.dbflute.logic.generate.language.grammar.DfLanguageGrammar in project dbflute-core by dbflute.

the class Column method isJavaNativeUtilList.

public boolean isJavaNativeUtilList() {
    // only for array type
    final String javaNative = getJavaNative();
    final DfLanguageGrammar grammar = getLanguageDependency().getLanguageGrammar();
    final String beginMark = grammar.getGenericBeginMark();
    final String endMark = grammar.getGenericEndMark();
    return javaNative.equals("java.util.List") || (Srl.startsWith(javaNative, "List" + beginMark) && Srl.endsWith(javaNative, endMark));
}
Also used : DfLanguageGrammar(org.dbflute.logic.generate.language.grammar.DfLanguageGrammar)

Example 23 with DfLanguageGrammar

use of org.dbflute.logic.generate.language.grammar.DfLanguageGrammar in project dbflute-core by dbflute.

the class Column method getJavaNativeTypeLiteral.

public String getJavaNativeTypeLiteral() {
    final String javaNative = getJavaNative();
    final DfLanguageGrammar grammar = getLanguageDependency().getLanguageGrammar();
    // for example, List<String>
    final String pureNative = Srl.substringFirstFront(javaNative, "<");
    return grammar.buildClassTypeLiteral(pureNative);
}
Also used : DfLanguageGrammar(org.dbflute.logic.generate.language.grammar.DfLanguageGrammar)

Example 24 with DfLanguageGrammar

use of org.dbflute.logic.generate.language.grammar.DfLanguageGrammar in project dbflute-core by dbflute.

the class ForeignKey method doGetForeignPropertyEntityDefinitionType.

protected String doGetForeignPropertyEntityDefinitionType(String extendedEntityClassName, String propertyAccessType) {
    if (propertyAccessType != null) {
        // needs import definition
        final String simpleName = Srl.substringLastRear(propertyAccessType, ".");
        final DfLanguageGrammar grammar = getBasicProperties().getLanguageDependency().getLanguageGrammar();
        return simpleName + grammar.buildGenericOneClassHint(extendedEntityClassName);
    }
    return extendedEntityClassName;
}
Also used : DfLanguageGrammar(org.dbflute.logic.generate.language.grammar.DfLanguageGrammar)

Aggregations

DfLanguageGrammar (org.dbflute.logic.generate.language.grammar.DfLanguageGrammar)24 DfLanguageDependency (org.dbflute.logic.generate.language.DfLanguageDependency)3 DfLanguageImplStyle (org.dbflute.logic.generate.language.implstyle.DfLanguageImplStyle)2 DfBasicProperties (org.dbflute.properties.DfBasicProperties)2 BufferedReader (java.io.BufferedReader)1 BufferedWriter (java.io.BufferedWriter)1 FileInputStream (java.io.FileInputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 OutputStreamWriter (java.io.OutputStreamWriter)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 Time (java.sql.Time)1 Timestamp (java.sql.Timestamp)1 List (java.util.List)1 Map (java.util.Map)1 Column (org.apache.torque.engine.database.model.Column)1 ExceptionMessageBuilder (org.dbflute.helper.message.ExceptionMessageBuilder)1 DfArrangeQueryTable (org.dbflute.logic.doc.arrqy.DfArrangeQueryTable)1