org.xerial.db.sql.sqlite
Class SQLiteCatalog
java.lang.Object
org.xerial.db.sql.sqlite.SQLiteCatalog
public class SQLiteCatalog
- extends Object
SQLiteCatalog holds the information of table shamas of a given database.
- Author:
- leo
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLiteCatalog
public SQLiteCatalog(SQLiteAccess query)
throws DBException
- Throws:
DBException
reflesh
public void reflesh()
throws DBException
- Throws:
DBException
getTableNameSet
public Set<String> getTableNameSet()
toJSON
public String toJSON()
createValueTupleFromBean
public String createValueTupleFromBean(String tableName,
Object bean)
throws DBException,
BeanException
- Align the content of a bean object so that it matches with the
corresponding relation (table schema)
For example, give a bean class, e.g.
class Person { int id; String name; (getters are ommited) }
and a table named person with a schema 'id, name', the
createValueTupleFromBean("person", (a Person object)) will give a tuple
representation of the Person object (id=1, name="leo"), that is
'1,"leo"'.
This returned string can be used as it is within an insert statement of
the SQL, i.e., insert into person values(1, "leo")
- Parameters:
tableName - bean -
- Returns:
-
- Throws:
DBException
InvalidBeanException
BeanException
getKeyAttributeName
public List<SQLiteDataTypeInfo> getKeyAttributeName(String tableName)
throws DBException
- Throws:
DBException

This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.