Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Use findByPrimaryKey method in EO

AlfreNetMay 27 2015 — edited May 27 2015

Hi guys,

I've a entity object with compite key. I've implemented a method in EOImpl:

    public void findByPrimaryKey(String cekcoo, BigDecimal cedoco, String cedcto){

        EntityDefImpl ceImpl = F5543S07_ControlEntregas_EOImpl.getDefinitionObject();

        Key ceKey = F5543S07_ControlEntregas_EOImpl.createPrimaryKey(cekcoo, cedoco, cedcto);

        F5543S07_ControlEntregas_EOImpl controlEntrega = (F5543S07_ControlEntregas_EOImpl)ceImpl.findByPrimaryKey(getDBTransaction(), ceKey);

        if (controlEntrega==null){

            throw new JboException("Control de Calidad No Encontrado");

        }

This method should works fine. But I don't know how I can publish this method in AM for use in TF. Because in VO the method is possible publish in AM but not EO method.

Finally I used a view criteria method, but I'd like know this for the future if is possible because I think could be best practice. I've searched but I've not found this solution.

Thanks.

This post has been answered by Timo Hahn on May 27 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2015
Added on May 27 2015
4 comments
110 views