[英]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.