T - Indicates the OrmObject instance.public interface EntityHelper<T>
OrmObject objects.
The ORM annotation processor automatically generates a helper class inherited from EntityHelper
for each entity class that is inherited from OrmObject and annotated with @Entity.
In this case, your application does not need to implement and invoke this method.
SystemCapability.Data#DATA_APPDATAMGR| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
bindValue(Statement statement,
T object) |
Binds attribute values of an inserted
OrmObject object to the database declaration statement. |
void |
bindValue(Statement statement,
T object,
long id) |
Binds attribute values of an updated
OrmObject object to the database declaration statement. |
T |
createInstance(ResultSet resultSet) |
Creates an
OrmObject instance. |
String |
getDeleteStatement() |
Obtains the declaration statement of the table that maps to a deleted
OrmObject instance
in the relational database. |
String |
getInsertStatement() |
Obtains the declaration statement of the table that maps to an inserted
OrmObject instance
in the relational database. |
String |
getTableName() |
Obtains the name of the table that maps to an
OrmObject instance in the relational database. |
String |
getUpdateStatement() |
Obtains the declaration statement of the table that maps to an updated
OrmObject instance
in the relational database. |
void |
setPrimaryKeyValue(T object,
long value) |
Sets the value for the primary key of an
OrmObject instance. |
void bindValue(Statement statement, T object)
OrmObject object to the database declaration statement.
This method is used to bind attribute values of an OrmObject object to the database declaration statement
when inserting the object into the database. Your application does not need to implement and invoke this method.
statement - Indicates the database declaration statement.object - Indicates the OrmObject object.void bindValue(Statement statement, T object, long id)
OrmObject object to the database declaration statement.
This method is used to bind attribute values of an OrmObject object to the database declaration statement
when updating the object in the database. Your application does not need to implement and invoke this method.
statement - Indicates the database declaration statement.object - Indicates the OrmObject object.id - Indicates the ID of the row where the object is updated.T createInstance(ResultSet resultSet)
OrmObject instance.
This method is used to convert a result set obtained from the relational database into
an OrmObject instance. Your application does not need to implement and invoke this method.
resultSet - Indicates the result set obtained from the relational database.OrmObject instance.void setPrimaryKeyValue(T object, long value)
OrmObject instance.
Your application does not need to implement and invoke this method.
String getTableName()
OrmObject instance in the relational database.
Your application does not need to implement and invoke this method.
String getInsertStatement()
OrmObject instance
in the relational database.
Your application does not need to implement and invoke this method.
String getUpdateStatement()
OrmObject instance
in the relational database.
Your application does not need to implement and invoke this method.