Java 类org.jooq.util.Definition 实例源码

项目:InComb    文件:InCombGeneratorStrategy.java   
/**
 * Tables are in the <code>tables</code> package. <br />
 * Daos are in the <code>dao.internal</code> package. <br />
 * Records are in the <code>records</code> package. <br />
 */
@Override
public String getJavaPackageName(final Definition definition, final Mode mode) {
    final StringBuilder sb = new StringBuilder(getTargetPackage());

    if (mode == Mode.DEFAULT) {
        sb.append(".tables");
    }
    else if (mode == Mode.DAO) {
        sb.append(".dao.internal");
    }
    else if (mode == Mode.RECORD) {
        sb.append(".records");
    }

    return sb.toString();
}
项目:sandbox-query-benchmark-jooq-hibernate-jdbc    文件:CustomGeneratorStrategy.java   
@Override
public String getJavaClassName(Definition definition, Mode mode) {
    StringBuilder result = new StringBuilder();

    if (mode == Mode.RECORD) {
        result.append('R');
    } else if (mode == Mode.DEFAULT) {
        result.append('T');
    } else if (mode == Mode.INTERFACE) {
        result.append('I');
    }

    result.append(StringUtils.toCamelCase(definition.getOutputName()));

    if (mode == Mode.RECORD) {
        result.append("Record");
    } else if (mode == Mode.DAO) {
        result.append("Dao");
    }

    return result.toString();

}
项目:InComb    文件:InCombGeneratorStrategy.java   
/**
 * Daos start with "Internal". e.g. NewsDao -> InternalNewsDao
 * Tables end with "Table". e.g. News -> NewsTable
 */
@Override
public String getJavaClassName(final Definition definition, final Mode mode) {
    String className = super.getJavaClassName(definition, mode);

    if(mode == Mode.DAO) {
        className = "Internal" + className;
    }
    else if (mode == Mode.DEFAULT) {
        className += "Table";
    }

    return className;
}
项目:vertx-jooq-async    文件:VertxGeneratorStrategy.java   
@Override
public List<String> getJavaClassImplements(Definition definition, Mode mode) {
    List<String> javaClassImplements = super.getJavaClassImplements(definition, mode);
    if(mode.equals(Mode.DAO)){
        final String tableRecord = getFullJavaClassName(definition, Mode.RECORD);
        final String pType = getFullJavaClassName(definition, Mode.POJO);
        javaClassImplements.add(String.format("%s<%s,%s,%s>",daoClassName,tableRecord,pType, VertxJavaWriter.PLACEHOLDER_DAO_TYPE));
    }else if(mode.equals(Mode.INTERFACE)){
        javaClassImplements.add(VertxPojo.class.getName());
    }
    return javaClassImplements;
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public List<String> getJavaClassImplements(Definition definition, Mode mode) {
    List<String> javaClassImplements = delegate.getJavaClassImplements(definition, mode);
    if(mode.equals(Mode.DAO)){
        final String tableRecord = getFullJavaClassName(definition, Mode.RECORD);
        final String pType = getFullJavaClassName(definition, Mode.POJO);
        javaClassImplements.add(String.format("%s<%s,%s,%s>",daoClassName,tableRecord,pType, VertxJavaWriter.PLACEHOLDER_DAO_TYPE));
    }
    return javaClassImplements;
}
项目:vertx-jooq    文件:ClassicAsInDBVertxGenerator.java   
@Override
public String getJavaMemberName(Definition definition, Mode mode) {
    if(mode==Mode.POJO){
        return definition.getName();
    }
    return super.getJavaMemberName(definition, mode);
}
项目:cattle    文件:ModelStrategy.java   
@Override
public String getJavaSetterName(Definition definition, Mode mode) {
    String result = super.getJavaSetterName(definition, mode);
    switch (result) {
    case "setEnvironmentId":
        return "setStackId";
    case "setParentEnvironmentId":
        return "setParentStackId";
    case "setFolder":
        return "setGroup";
    }
    return result;
}
项目:cattle    文件:ModelStrategy.java   
@Override
public String getJavaGetterName(Definition definition, Mode mode) {
    String result = super.getJavaGetterName(definition, mode);
    switch (result) {
    case "getEnvironmentId":
        return "getStackId";
    case "getParentEnvironmentId":
        return "getParentStackId";
    case "getFolder":
        return "getGroup";
    }
    return result;
}
项目:cattle    文件:ModelStrategy.java   
@Override
public String getJavaIdentifier(Definition definition) {
    String result = super.getJavaIdentifier(definition);
    switch (result) {
    case "ENVIRONMENT":
        return "STACK";
    case "ENVIRONMENT_ID":
        return "STACK_ID";
    case "FOLDER":
        return "GROUP";
    }
    return result;
}
项目:cattle    文件:ModelStrategy.java   
@Override
public String getJavaClassName(Definition definition, Mode mode) {
    String result = getJavaClassName0(definition, mode);
    switch (result) {
    case "Environment":
        return "Stack";
    case "EnvironmentRecord":
        return "StackRecord";
    case "EnvironmentTable":
        return "StackTable";
    }
    return result;
}
项目:cattle    文件:ModelStrategy.java   
protected String getJavaClassName0(Definition definition, Mode mode) {
    if (mode == Mode.INTERFACE) {
        String result = super.getJavaClassName(definition, mode);
        return StringUtils.removeStart(result, "I");
    } else if (mode == Mode.DEFAULT) {
        return super.getJavaClassName(definition, mode) + "Table";
    }
    return super.getJavaClassName(definition, mode);
}
项目:cattle    文件:ModelStrategy.java   
@Override
public String getJavaPackageName(Definition definition, Mode mode) {
    if (mode == Mode.INTERFACE) {
        String result = super.getJavaPackageName(definition, mode);
        return StringUtils.replace(result, ".tables.interfaces", "");
    }
    return super.getJavaPackageName(definition, mode);
}
项目:cattle    文件:ModelStrategy.java   
@Override
public List<String> getJavaClassImplements(Definition definition, Mode mode) {
    List<String> result = super.getJavaClassImplements(definition, mode);
    if (mode == Mode.RECORD) {
        result.add(TableRecordJaxb.class.getName());
    }
    return result;
}
项目:cloud-cattle    文件:ModelStrategy.java   
@Override
public String getJavaClassName(Definition definition, Mode mode) {
    if ( mode == Mode.INTERFACE ) {
        String result = super.getJavaClassName(definition, mode);
        return StringUtils.removeStart(result, "I");
    } else if ( mode == Mode.DEFAULT ) {
        return super.getJavaClassName(definition, mode) + "Table";
    }
    return super.getJavaClassName(definition, mode);
}
项目:cloud-cattle    文件:ModelStrategy.java   
@Override
public String getJavaPackageName(Definition definition, Mode mode) {
    if ( mode == Mode.INTERFACE ) {
        String result = super.getJavaPackageName(definition, mode);
        return StringUtils.replace(result, ".tables.interfaces", "");
    }
    return super.getJavaPackageName(definition, mode);
}
项目:cloud-cattle    文件:ModelStrategy.java   
@Override
public List<String> getJavaClassImplements(Definition definition, Mode mode) {
    List<String> result = super.getJavaClassImplements(definition, mode);
    if ( mode == Mode.RECORD ) {
        result.add(TableRecordJaxb.class.getName());
    }
    return result;
}
项目:dstack    文件:ModelStrategy.java   
@Override
public String getJavaClassName(Definition definition, Mode mode) {
    if ( mode == Mode.INTERFACE ) {
        String result = super.getJavaClassName(definition, mode);
        return StringUtils.removeStart(result, "I");
    } else if ( mode == Mode.DEFAULT ) {
        return super.getJavaClassName(definition, mode) + "Table";
    }
    return super.getJavaClassName(definition, mode);
}
项目:dstack    文件:ModelStrategy.java   
@Override
public String getJavaPackageName(Definition definition, Mode mode) {
    if ( mode == Mode.INTERFACE ) {
        String result = super.getJavaPackageName(definition, mode);
        return StringUtils.replace(result, ".tables.interfaces", "");
    }
    return super.getJavaPackageName(definition, mode);
}
项目:dstack    文件:ModelStrategy.java   
@Override
public List<String> getJavaClassImplements(Definition definition, Mode mode) {
    List<String> result = super.getJavaClassImplements(definition, mode);
    if ( mode == Mode.RECORD ) {
        result.add(TableRecordJaxb.class.getName());
    }
    return result;
}
项目:jooq-flyway-typesafe-migration    文件:PrefixingGeneratorStrategy.java   
@Override
public String getJavaClassName(final Definition definition, final Mode mode) {
    return getVersion(definition) + "_" + super.getJavaClassName(definition, mode);
}
项目:jooq-flyway-typesafe-migration    文件:PrefixingGeneratorStrategy.java   
@Override
public String getJavaIdentifier(Definition definition) {
    return getVersion(definition) + "_" + super.getJavaIdentifier(definition);
}
项目:jooq-flyway-typesafe-migration    文件:PrefixingGeneratorStrategy.java   
private String getVersion(Definition definition) {
    return ((AbstractDatabase) definition.getDatabase()).getProperties().getProperty(ModelSynchronizer.VERSION_PROPERTY_KEY);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:TangleFreeGeneratorStrategy.java   
@Override
public String getJavaPackageName(Definition definition, Mode mode) {
    return getTargetPackage();
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getFileName(Definition definition) {
    return delegate.getFileName(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getFileName(Definition definition, Mode mode) {
    return delegate.getFileName(definition, mode);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public File getFile(Definition definition) {
    return delegate.getFile(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public File getFile(Definition definition, Mode mode) {
    return delegate.getFile(definition, mode);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getFileHeader(Definition definition) {
    return delegate.getFileHeader(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getFullJavaIdentifier(Definition definition) {
    return delegate.getFullJavaIdentifier(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getJavaSetterName(Definition definition) {
    return delegate.getJavaSetterName(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getJavaGetterName(Definition definition) {
    return delegate.getJavaGetterName(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getJavaMethodName(Definition definition) {
    return delegate.getJavaMethodName(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getJavaClassExtends(Definition definition) {
    return delegate.getJavaClassExtends(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public List<String> getJavaClassImplements(Definition definition) {
    return delegate.getJavaClassImplements(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getJavaClassName(Definition definition) {
    return delegate.getJavaClassName(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getJavaPackageName(Definition definition) {
    return delegate.getJavaPackageName(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getJavaMemberName(Definition definition) {
    return delegate.getJavaMemberName(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getFullJavaClassName(Definition definition) {
    return delegate.getFullJavaClassName(definition);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public String getFullJavaClassName(Definition definition, Mode mode) {
    return delegate.getFullJavaClassName(definition, mode);
}
项目:vertx-jooq    文件:VertxGeneratorStrategy.java   
@Override
public List<String> getJavaIdentifiers(Collection<? extends Definition> definitions) {
    return delegate.getJavaIdentifiers(definitions);
}