com.cloudera.sqoop.orm
Class TableClassName
java.lang.Object
com.cloudera.sqoop.orm.TableClassName
public class TableClassName
- extends java.lang.Object
Reconciles the table name being imported with the class naming information
specified in SqoopOptions to determine the actual package and class name to
use for a table.
Field Summary |
static org.apache.commons.logging.Log |
LOG
|
Method Summary |
java.lang.String |
getClassForTable(java.lang.String tableName)
|
java.lang.String |
getPackageForTable()
Taking into account --class-name and --package-name, return the actual
package-part which will be used for a class. |
java.lang.String |
getShortClassForTable(java.lang.String tableName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
TableClassName
public TableClassName(SqoopOptions opts)
getPackageForTable
public java.lang.String getPackageForTable()
- Taking into account --class-name and --package-name, return the actual
package-part which will be used for a class. The actual table name being
generated-for is irrelevant; so not an argument.
- Returns:
- the package where generated ORM classes go. Will be null for
top-level.
getClassForTable
public java.lang.String getClassForTable(java.lang.String tableName)
- Parameters:
tableName
- the name of the table being imported.
- Returns:
- the full name of the class to generate/use to import a table.
getShortClassForTable
public java.lang.String getShortClassForTable(java.lang.String tableName)
- Returns:
- just the last spegment of the class name -- all package info
stripped.
Copyright © 2010 Cloudera, Inc.