|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sormula.translator.ColumnsTranslator<R> org.sormula.translator.RowTranslator<R>
R
- row classpublic class RowTranslator<R>
Translates a row to prepared statement and from result set. ColumnTranslator
objects
are created for each column based upon annotations on row class. If no annotation exists for a member then
column name is same as member name and StandardColumnTranslator
is used.
Constructor Summary | |
---|---|
RowTranslator(Table<R> table)
Constructs for a table. |
Method Summary | |
---|---|
ColumnTranslator<R> |
getIdentityColumnTranslator()
Column translator used to set the value of a row column that is the identity column for row. |
NameTranslator |
getNameTranslator()
Deprecated. |
PrimaryKeyWhereTranslator<R> |
getPrimaryKeyWhereTranslator()
Gets primary key translator for use in where clause. |
java.lang.String |
getUnusedColumnInsertNamesSql()
Gets names of unused columns for insert statement. |
java.lang.String |
getUnusedColumnInsertValuesSql()
Gets values for unused columns for insert statement. |
java.lang.String |
getUnusedColumnUpdateSql()
Gets column=value for all unused columns for update statement. |
protected void |
initColumnTranslators()
Process Transient and Cascade annotations. |
protected void |
initUnusedColumnSql(java.lang.Class<R> rowClass)
Process UnusedColumns annotations. |
R |
newInstance()
Deprecated. |
protected TypeTranslator<?> |
readimplicitType(java.lang.reflect.AnnotatedElement... annotatedElements)
Deprecated. |
protected TypeTranslator<?> |
readImplicitType(java.lang.reflect.AnnotatedElement... annotatedElements)
Deprecated. |
Methods inherited from class org.sormula.translator.ColumnsTranslator |
---|
addColumnTranslator, createColumnParameterPhrase, createColumnPhrase, createParameterPhrase, getColumnTranslator, getColumnTranslatorList, getRowClass, initColumnTranslatorList, isIncludeIdentityColumns, read, setIncludeIdentityColumns, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RowTranslator(Table<R> table) throws TranslatorException
table
- table associated with this row translator
TranslatorException
- if errorMethod Detail |
---|
public ColumnTranslator<R> getIdentityColumnTranslator()
Column.identity()
.
Column.identity()
protected void initColumnTranslators() throws TranslatorException
Transient
and Cascade
annotations.
Versions prior to 1.9.2 did not allow type translators to be replaced. Starting with
version 1.9.2 and 2.3.2, this method will replace existing type translator with new
one ImplicitType.translator()
is different from existing.
TranslatorException
- if error@Deprecated protected TypeTranslator<?> readimplicitType(java.lang.reflect.AnnotatedElement... annotatedElements) throws TranslatorException
ImplicitTypeAnnotationReader
.
TranslatorException
@Deprecated protected TypeTranslator<?> readImplicitType(java.lang.reflect.AnnotatedElement... annotatedElements) throws TranslatorException
ImplicitTypeAnnotationReader
.
Searches any ImplicitType
annotations and returns new instance of ImplicitType.translator()
for the first one found.
annotatedElements
- objects that may contain an ImplicitType
annotation
TypeTranslator
or null if no ImplicitType
annotations
TranslatorException
- if error creating new instance of type translatorprotected void initUnusedColumnSql(java.lang.Class<R> rowClass) throws TranslatorException
UnusedColumns
annotations.
rowClass
-
TranslatorException
@Deprecated public NameTranslator getNameTranslator()
Row.nameTranslator()
.
Use Table.getNameTranslators()
instead of this method.
@Deprecated public R newInstance() throws TranslatorException
Table
.
TranslatorException
- if new row instance cannot be createdpublic PrimaryKeyWhereTranslator<R> getPrimaryKeyWhereTranslator()
public java.lang.String getUnusedColumnInsertNamesSql()
public java.lang.String getUnusedColumnInsertValuesSql()
public java.lang.String getUnusedColumnUpdateSql()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |