|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IColumnDataAccessor
IColumnDataAccessor defines the interface to access data stored in a given table column. This interface is currently used for the table data editor but could be extended to be used with the Extract/Load feature. It provides methods to read from and write to the database through the JDBC driver. It also provides methods to serialize or deserialize a value as a string. These methodes are used to edit some data in the table editor, when supportsInlineEdit() is true. The value can be represented by an aribitrary Object. The object is usually the one returned by the JDBC driver but it could be a custom object, to handle any specific need.
Method Summary | |
---|---|
java.lang.Object |
deserialize(java.lang.String val,
int type)
Deserializes a string to an object (for inline editing). |
java.lang.String |
getLabel(java.lang.Object val,
int type)
Returns a short text to represent the provided object. |
java.lang.String |
getSelectExpr()
Returns the SELECT expression corresponding to the column. |
java.lang.String |
getSetAss(java.lang.Object val)
Returns the SQL assignment (including optional '?'), to be used in the SET clause. |
java.lang.String |
getValuesExpr(java.lang.Object val)
Returns the SQL expression (including optional '?'), to be used in the VALUES clause. |
java.lang.String |
getWhereCond(java.lang.Object val)
Returns the SQL condition (including optional '?'), to be used in the WHERE clause. |
void |
initialize(Column sqlCol)
Initialize the object after its creation. |
boolean |
isSnippet(java.lang.Object val,
int type)
Return true if the supplyied value is a snippet and not the full value as stored in the database |
java.lang.Object |
read(java.sql.ResultSet rs,
int col,
int type,
boolean snippet)
Reads a value from the result set and return in as an Object. |
java.lang.String |
serialize(java.lang.Object val,
int type)
Serializes an object as a string (for inline editing). |
boolean |
supportsInlineEdit()
Returns true if the provided value can be edited inline using the serialization methods. |
java.lang.String[] |
writeSetAssArgs(java.sql.PreparedStatement pst,
int start,
java.lang.Object val,
int type)
Writes the prepared statement arguments, corresponding to getSetAss(). |
java.lang.String[] |
writeValuesExprArgs(java.sql.PreparedStatement pst,
int start,
java.lang.Object val,
int type)
Writes the prepared statement arguments, corresponding to getValuesExpr(). |
java.lang.String[] |
writeWhereCondArgs(java.sql.PreparedStatement pst,
int start,
java.lang.Object val,
int type)
Writes the prepared statement arguments, corresponding to getWhereCond(). |
Method Detail |
---|
void initialize(Column sqlCol)
java.lang.String getSelectExpr()
java.lang.Object read(java.sql.ResultSet rs, int col, int type, boolean snippet) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
boolean isSnippet(java.lang.Object val, int type)
java.lang.String getValuesExpr(java.lang.Object val)
java.lang.String[] writeValuesExprArgs(java.sql.PreparedStatement pst, int start, java.lang.Object val, int type) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
java.lang.String getSetAss(java.lang.Object val)
java.lang.String[] writeSetAssArgs(java.sql.PreparedStatement pst, int start, java.lang.Object val, int type) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
java.lang.String getWhereCond(java.lang.Object val)
java.lang.String[] writeWhereCondArgs(java.sql.PreparedStatement pst, int start, java.lang.Object val, int type) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
java.lang.String serialize(java.lang.Object val, int type)
java.lang.Object deserialize(java.lang.String val, int type)
java.lang.String getLabel(java.lang.Object val, int type)
boolean supportsInlineEdit()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |