public class TableBuilder extends Object
| Constructor and Description |
|---|
TableBuilder(Class contractClass) |
| Modifier and Type | Method and Description |
|---|---|
TableBuilder |
addConstraint(String columnName,
String constraintType,
String constraintConflictClause)
Adds the specified constraint to the created table.
|
void |
createTable(android.database.sqlite.SQLiteDatabase database)
Creates the table in the database.
|
String |
getSQL() |
public TableBuilder(Class contractClass)
contractClass - The contract class for which a table will be created.public TableBuilder addConstraint(String columnName, String constraintType, String constraintConflictClause)
columnName - The name of the column on which the constraint is applied.constraintType - The type of constraint to apply.
One of
constraintConflictClause - The conflict clause to apply in case of constraint violation.
One of
TableBuilder instance to allow chaining.public String getSQL()
TableBuilder.public void createTable(android.database.sqlite.SQLiteDatabase database)
database - The database in which the table need to be created.Copyright © 2012–2014. All rights reserved.