$jdbc

( documentation for Telosys generator version 4.0.0 )


Object providing the JDBC SQL requests for a given entity


Since : 2.1.1

Attributes and methods
.attributesForInsert : List

Returns the list of all the attributes required for the SQL INSERT
All the attributes required to populate the PreparedStatement from a bean instance

Example :
   $jdbc.attributesForInsert

Since : 2.1.1

.attributesForPrimaryKey : List

Returns the list of all the attributes required for the Primary Key


Example :
   $jdbc.attributesForPrimaryKey

Since : 2.1.1

.attributesForSelect : List

Returns the list of all the attributes required for the SQL SELECT
All the attributes required to populate the bean instance from the result set

Example :
   $jdbc.attributesForSelect

Since : 2.1.1

.attributesForUpdate : List

Returns the list of all the attributes required for the SQL UPDATE


Example :
   $jdbc.attributesForUpdate

Since : 2.1.1

.preparedStatementSetter(AttributeInContext attribute) : String

Returns PreparedStatement setter according to the attribute type
e.g. : 'setInt', 'setString', 'setBoolean', etc


Parameters :
   attribute : the attribute

Example :
   $jdbc.preparedStatementSetter($attribute)

Since : 2.1.1

.resultSetGetter(AttributeInContext attribute) : String

Returns ResultSet getter according to the attribute type
e.g. : 'getInt', 'getString', 'getBoolean', etc


Parameters :
   attribute : the attribute

Example :
   $jdbc.resultSetGetter($attribute)

Since : 2.1.1

.sqlDelete : String

Returns the JDBC SQL DELETE request


Example :
   $jdbc.sqlDelete

Since : 2.1.1

.sqlInsert : String

Returns the JDBC SQL INSERT request


Example :
   $jdbc.sqlInsert

Since : 2.1.1

.sqlSelect : String

Returns the JDBC SQL 'SELECT xxx FROM xxx' request


Example :
   $jdbc.sqlSelect

Since : 3.0.0

.sqlSelectCount : String

Returns the JDBC SQL 'SELECT COUNT(*) FROM xxx' request


Example :
   $jdbc.sqlSelectCount

Since : 3.0.0

.sqlSelectCountWherePK : String

Returns the JDBC SQL 'SELECT COUNT(*) FROM xxx WHERE pk = xxx' request
Can be used to check the existence of a record for the given PK

Example :
   $jdbc.sqlSelectCountWherePK

Since : 3.0.0

.sqlSelectWherePK : String

Returns the JDBC SQL 'SELECT xxx FROM xxx WHERE pk = xxx' request


Example :
   $jdbc.sqlSelectWherePK

Since : 3.0.0

.sqlUpdate : String

Returns the JDBC SQL UPDATE request


Example :
   $jdbc.sqlUpdate

Since : 2.1.1

.valueForPreparedStatement(AttributeInContext attribute, String name) : String

Returns the attribute's value to be set in the PreparedStatement
e.g. : 'getFirstName', 'getCode', etc


Parameters :
   attribute : the attribute
   name : the variable name to be used to identify the attribute ( eg

Example :
   $jdbc.valueForPreparedStatement($attribute, 'book')

Since : 2.1.1