db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Fox (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TORQUE-346) Introduce abstract layer for peer impl to reduce the amount of generated code
Date Sat, 30 Jul 2016 02:22:20 GMT

    [ https://issues.apache.org/jira/browse/TORQUE-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15400381#comment-15400381
] 

Thomas Fox commented on TORQUE-346:
-----------------------------------

I'm not sure what you mena by "availability of a primary key". 
If you mean that the object is already in dthe database and thus has a primary key, the answer
is no (see e.g. org.apache.torque.test.dbobject.base.BaseExt in the test project, which has
a primitive primary key which always is set and thus obj.getPrimaryKey() will never return
null). 
If you mean whether the table has a PK at all, this will probably work currently, although
it is not documented. However, for me it would be cleaner to store this information in the
table map instead of relying on the obj.getPrimaryKey() method.

> Introduce abstract layer for peer impl to reduce the amount of generated code
> -----------------------------------------------------------------------------
>
>                 Key: TORQUE-346
>                 URL: https://issues.apache.org/jira/browse/TORQUE-346
>             Project: Torque
>          Issue Type: Improvement
>          Components: Runtime, Templates
>    Affects Versions: 4.0
>            Reporter: Thomas Vandahl
>            Assignee: Thomas Vandahl
>             Fix For: 4.1
>
>
> Several methods in PeerImpl rely on buildCriteria() and buildColumnValues() respectively.
An intermediate layer of AbstractPeerImpl can be used to concentrate these methods in a central
class and reduce the amount of generated code duplication.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message