|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jora.Table
Table class is used to establish mapping between corteges of database tables and Java classes. This class is responsible for constructing SQL statements for extracting, updating and deleting records of the database table.
Field Summary | |
static java.lang.String |
fieldSeparator
Spearator of name components of compound field. |
Constructor Summary | |
Table(java.lang.String className)
Constructor of table with "key" and "session" parameters inherited from base table. |
|
Table(java.lang.String className,
Session s)
Constructor of table without explicit key specification. |
|
Table(java.lang.String className,
Session s,
java.lang.String key)
Constructor for table object. |
|
Table(java.lang.String className,
Session s,
java.lang.String[] keys)
Constructor for table object. |
|
Table(java.lang.String className,
java.lang.String tableName,
Session s,
java.lang.String key)
Constructor for table object. |
|
Table(java.lang.String className,
java.lang.String tableName,
Session s,
java.lang.String[] keys)
Constructor for table object. |
Method Summary | |
void |
delete(java.lang.Object obj)
Delete record with specified value of primary key from the table. |
void |
delete(java.lang.Object obj,
Session session)
Delete record with specified value of primary key from the table. |
void |
insert(java.lang.Object obj)
Insert new record in the table. |
void |
insert(java.lang.Object obj,
Session session)
Insert new record in the table. |
Cursor |
queryAllByExample(java.lang.Object obj)
Select records from specified and derived database tables using obj object as template for selection. |
Cursor |
queryAllByExample(java.lang.Object obj,
Session session)
Select records from specified and derived database tables using obj object as template for selection. |
Cursor |
queryByExample(java.lang.Object obj)
Select records from database table using obj object as template for selection. |
Cursor |
queryByExample(java.lang.Object obj,
Session session)
Select records from database table using obj object as template for selection. |
Cursor |
select(java.lang.String condition)
Select records from database table according to search condition |
Cursor |
select(java.lang.String condition,
Session session)
Select records from database table according to search condition |
Cursor |
selectAll(java.lang.String condition)
Select records from specified and derived database tables |
Cursor |
selectAll(java.lang.String condition,
Session session)
Select records from specified and derived database tables |
void |
update(java.lang.Object obj)
Update record in the table using table's primary key to locate record in the table and values of fields of specified object obj to alter record fields. |
void |
update(java.lang.Object obj,
Session session)
Update record in the table using table's primary key to locate record in the table and values of fields of specified object obj to alter record fields. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static java.lang.String fieldSeparator
Constructor Detail |
public Table(java.lang.String className, java.lang.String tableName, Session s, java.lang.String key)
tclassName
- name of Java classtableName
- name of database table mapped on this Java classkey
- table primary key. This parameter is used in UPDATE/DELETE
operations to locate record in the table.public Table(java.lang.String className, java.lang.String tableName, Session s, java.lang.String[] keys)
tclassName
- name of Java classtableName
- name of database table mapped on this Java classkeys
- table primary keys. This parameter is used in UPDATE/DELETE
operations to locate record in the table.public Table(java.lang.String className, Session s, java.lang.String[] keys)
className
- name of Java class, which should be (without
package prefix) be the same as the name of database table.keys
- table primary keys. This parameter is used in UPDATE/DELETE
operations to locate record in the table.public Table(java.lang.String className, Session s, java.lang.String key)
className
- name of Java class, which should be (without
package prefix) be the same as the name of database table.key
- table primary key. This parameter is used in UPDATE/DELETE
operations to locate record in the table.public Table(java.lang.String className, Session s)
public Table(java.lang.String className)
Method Detail |
public final Cursor select(java.lang.String condition)
condition
- valid SQL condition expression started with WHERE
or empty string if all records should be fetched.public final Cursor select(java.lang.String condition, Session session)
condition
- valid SQL condition expression started with WHERE
or empty string if all records should be fetched.session
- user database sessionpublic final Cursor selectAll(java.lang.String condition)
condition
- valid SQL condition expression started with WHERE
or empty string if all records should be fetched.public final Cursor selectAll(java.lang.String condition, Session session)
condition
- valid SQL condition expression started with WHERE
or empty string if all records should be fetched.session
- user database sessionpublic final Cursor queryByExample(java.lang.Object obj)
obj
- object for construction search condition: selected objects
should match all non-null fields of specified object.public final Cursor queryByExample(java.lang.Object obj, Session session)
obj
- object for construction search condition: selected objects
should match all non-null fields of specified object.session
- user database sessionpublic final Cursor queryAllByExample(java.lang.Object obj)
obj
- object for construction search condition: selected objects
should match all non-null fields of specified object.public final Cursor queryAllByExample(java.lang.Object obj, Session session)
obj
- object for construction search condition: selected objects
should match all non-null fields of specified object.session
- user database sessionpublic void insert(java.lang.Object obj)
obj
- object specifing values of inserted record fieldspublic void insert(java.lang.Object obj, Session session)
obj
- object specifing values of inserted record fieldssession
- user database sessionpublic void update(java.lang.Object obj)
obj
- object specifing value of primary key and new values of
updated record fieldspublic void update(java.lang.Object obj, Session session)
obj
- object specifing value of primary key and new values of
updated record fieldssession
- user database sessionpublic void delete(java.lang.Object obj)
obj
- object containing value of primary key.public void delete(java.lang.Object obj, Session session)
obj
- object containing value of primary key.session
- user database session
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |