|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectru.sstu.tables.Mapping<T>
T - Java Bean typepublic abstract class Mapping<T>
Mapping class is used for mapping between Java Bean properties
and columns of table.
| Constructor Summary | |
|---|---|
Mapping()
|
|
| Method Summary | |
|---|---|
protected void |
addField(int index,
Field field)
Adds mapping. |
protected void |
addField(int index,
Field field,
String value)
Adds mapping. |
protected void |
checkIndex(int index)
Checks if given index is the greatest. |
protected T |
createObject()
Creates new mapped object instance. |
protected int |
getMaxIndex()
|
int |
getSkipRows()
|
int |
getTableIndex()
|
protected TableReader |
getTableReader()
Provides table reader. |
protected Class<T> |
getType()
|
protected void |
setClass(Class<T> type)
|
void |
setSkipRows(int skipRows)
|
void |
setTableIndex(int tableIndex)
|
protected void |
setTableReader(TableReader reader)
Sets current table reader. |
protected void |
setValue(T object,
int index,
Object value)
Sets value to the Java Bean field. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Mapping()
| Method Detail |
|---|
public int getTableIndex()
public void setTableIndex(int tableIndex)
tableIndex - the tableIndex to setpublic int getSkipRows()
public void setSkipRows(int skipRows)
skipRows - the skipRows to setprotected TableReader getTableReader()
protected void setTableReader(TableReader reader)
reader - table reader
protected T createObject()
throws TableException
TableException - if cannot create object
protected void setValue(T object,
int index,
Object value)
throws TableException
object - Java Bean objectindex - table column indexvalue - value to be set
TableException - if cannot set valueprotected int getMaxIndex()
protected Class<T> getType()
protected void setClass(Class<T> type)
type - class type
protected void addField(int index,
Field field)
index - column indexfield - field
protected void addField(int index,
Field field,
String value)
index - column indexfield - fieldvalue - default valueprotected void checkIndex(int index)
index - index
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||