com.mysema.query.sql
Class MetaDataExporter
java.lang.Object
com.mysema.query.sql.MetaDataExporter
public class MetaDataExporter
- extends Object
MetadataExporter exports JDBC metadata to Querydsl query types
- Version:
- $Id$
- Author:
- tiwe
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetaDataExporter
public MetaDataExporter()
createEntityType
protected EntityType createEntityType(String tableName,
String className)
createProperty
protected Property createProperty(EntityType classModel,
String columnName,
String propertyName,
com.mysema.codegen.model.Type typeModel)
export
public void export(DatabaseMetaData md)
throws SQLException
- Throws:
SQLException
getClasses
public Set<String> getClasses()
setSchemaPattern
public void setSchemaPattern(String schemaPattern)
- Parameters:
schemaPattern
- a schema name pattern; must match the schema name
as it is stored in the database; "" retrieves those without a schema;
null
means that the schema name should not be used to narrow
the search (default: null)
setTableNamePattern
public void setTableNamePattern(String tableNamePattern)
- Parameters:
tableNamePattern
- a table name pattern; must match the
table name as it is stored in the database (default: null)
setConfiguration
public void setConfiguration(Configuration configuration)
- Parameters:
configuration
- override configuration for custom type mappings etc
setCreateScalaSources
public void setCreateScalaSources(boolean createScalaSources)
- Parameters:
createScalaSources
- whether to create Scala sources (default: false)
setTargetFolder
public void setTargetFolder(File targetFolder)
- Parameters:
targetFolder
- target source folder to create the sources into (e.g. target/generated-sources/java)
setPackageName
public void setPackageName(String packageName)
- Parameters:
packageName
- package name for sources
setNamePrefix
public void setNamePrefix(String namePrefix)
- Parameters:
namePrefix
- name prefix for Q-types (default: Q)
setNamingStrategy
public void setNamingStrategy(NamingStrategy namingStrategy)
- Parameters:
namingStrategy
- namingstrategy to override (default: new DefaultNamingStrategy())
setSerializer
public void setSerializer(Serializer serializer)
- Parameters:
serializer
- serializer to override (default: new MetaDataSerializer(namePrefix, namingStrategy))
setBeanSerializer
public void setBeanSerializer(Serializer beanSerializer)
- Parameters:
beanSerializer
- serializer for JavaBeans (default: null)
Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.