简体   繁体   English

如何在Oracle ADF中获取实体对象实例

[英]How to get entity object instance in Oracle ADF

Type of application: ADF Fusion Web 应用程序类型:ADF Fusion Web

I'm in the java file of Entity foo in a method I'm coding within that class. 我在该类中编码的方法中,位于Entity foo的java文件中。 I want to access the instance of the bar Entity to get some value and ultimately build a business rule for the foo entity 我想访问bar实体的实例以获得一些价值,并最终为foo实体建立业务规则

How do I get the entity object instance? 如何获得实体对象实例?

1.You need an association between Entity Foo and Entity Bar. 1.您需要在Entity Foo和Entity Bar之间建立关联。

2.Then, you need to make sure the association exposes the Entity Bar accessors from within Entity Foo. 2.然后,你需要确保该协会公开实体酒吧从实体美孚内访问器。

3.From Entity Foo, you can then: this.getEntityBar().callWhatever() 3.从Entity Foo中,您可以:this.getEntityBar()。callWhatever()

In the method setidfoo() 在方法setidfoo()

setattributeyouwanttoset(this.getbar().gettheattributeyouaregettingtheinfofrom());

hope this helps, obvsiouly make sure you are using the same type (number) and it should be working fine 希望这会有所帮助,过时地确保您使用的是相同的类型(数字),并且应该工作正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Oracle ADF 11g在提交更改之前验证每个实体隐含 - Oracle ADF 11g Validate each entity impl before commiting changes 如何从Oracle 11g中的另一个实例获取一个实例的sysdate - How to get sysdate of one instance from another instance in oracle 11g 你调用的对象是空的。 与oracle DB连接时出错 - Object reference not set to an instance of an object. error in connection to oracle DB 如何获取xml格式的Oracle数据库实例的模式信息/转储(无数据)? - How to get the schema informataion/dump (without data) for an oracle database instance in xml format? Oracle 数据库SqlPlus - 如何切换实例 - Oracle database SqlPlus - how to switch instance 如何将 VARRAY 添加到 Oracle 对象 - How to add a VARRAY to an Oracle object 如何使用C#获取Oracle,SQL Server,postgres,mysql或任何其他数据库的数据库实例和架构详细信息? - How to get the database instance and schema details of Oracle , SQL Server, postgres, mysql or any other database using C#? 如何在Oracle中获取子字符串索引 - How to get substring index in Oracle Object 引用未设置为 object 的实例。 在 datagridview 实体框架中使用 LinQ 添加两个表 - Object reference not set to an instance of an object. Adding Two Table using LinQ in datagridview Entity Framework 带有Oracle数据库的实体框架 - Entity framework with oracle database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM