Select Stuinfo from stuinfo
就可以,在QL语言没有*
就可以,在QL语言没有*
解决方案 »
- 关于Hibernate与Oracle10g中的触发器问题
- 用hibernate的dao方法保存
- j2ee安装与servlet包的问题
- javamail问题(急),解决马上给分
- 小弟有个Weblogic+EJB的客户端程序问题想请教各位!!!很急!!!!!
- 用jsp可以实现国际化吗?
- 为什么中文显示的都是乱码在weblogic 7.5中
- 新手的问题--数据库联接出错(java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource)--在线 恭候。
- struts执行完action.do后,URL仍然保留为最新的*.do,这样不好吧?!
- 那里有《think in java》2中源代码的下载?
- 加载到weblogic startup class 的线程如何关闭?
- 请问 为什么我的j2ee包里没有persistence包呀?
scott是一个实体bean映射的名称。有stuinfo属性
Select scottBean.stuinfo from scott as scottBean
<ejb-name>CustomerEJB</ejb-name>
<local-home>com.titan.customer.CustomerHomeLocal</local-home>
<local>com.titan.customer.CustomerLocal</local>
<ejb-class>com.titan.customer.CustomerBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>false</reentrant>
<cmp-version>2.x</cmp-version>
<!--QL语句中间引用的名称,必须唯一-->
<abstract-schema-name>Customer</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>lastName</field-name>
</cmp-field>
<cmp-field>
<field-name>firstName</field-name>
</cmp-field>
<cmp-field>
<field-name>hasGoodCredit</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<security-identity>
<use-caller-identity />
</security-identity>
<query>
<query-method>
<method-name>findAllCustomersWithReservations</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT OBJECT( cust ) FROM Reservation res, IN (res.customers) cust</ejb-ql>
</query>
<query>
<query-method>
<method-name>findDistinctCustomersWithReservations</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT DISTINCT OBJECT( cust ) FROM Reservation res,
IN (res.customers) cust</ejb-ql>
</query>
<query>
<query-method>
<method-name>findByAmericanExpress</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT OBJECT(c) FROM Customer AS c
WHERE c.creditCard.organization = 'American Express'</ejb-ql>
</query>
<query>
<query-method>
<method-name>findByGoodCredit</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT OBJECT(c) FROM Customer AS c
WHERE c.hasGoodCredit = TRUE</ejb-ql>
</query>
<query>
<query-method>
<method-name>ejbSelectByCity</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT OBJECT( c ) FROM Customer AS c
WHERE c.homeAddress.state = ?2
AND c.homeAddress.city = ?1</ejb-ql>
</query>
<query>
<query-method>
<method-name>findInStates</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT OBJECT( c ) FROM Customer c
WHERE c.homeAddress.state IN ('GA', 'MA')</ejb-ql>
</query>
<query>
<query-method>
<method-name>findNotInStates</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT OBJECT( c ) FROM Customer c
WHERE c.homeAddress.state NOT IN ('GA', 'MA')</ejb-ql>
</query>
<query>
<query-method>
<method-name>findHomeAddressIsNull</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT OBJECT( c ) FROM Customer c
WHERE c.homeAddress IS NULL</ejb-ql>
</query>
<query>
<query-method>
<method-name>findHomeAddressIsNotNull</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT OBJECT( c ) FROM Customer c
WHERE c.homeAddress IS NOT NULL</ejb-ql>
</query>
<query>
<query-method>
<method-name>findHyphenatedLastNames</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT OBJECT( c ) FROM Customer c
WHERE c.lastName LIKE '%-%'</ejb-ql>
</query>
<query>
<query-method>
<method-name>findByLastNameLength</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT OBJECT( c ) FROM Customer c
WHERE LENGTH(c.lastName) > 6 AND
LOCATE('Monson', c.lastName) > 0</ejb-ql>
</query>
<query>
<query-method>
<method-name>ejbSelectGeneric</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.Object[]</method-param>
</method-params>
</query-method>
<ejb-ql />
</query>
<query>
<query-method>
<method-name>ejbSelectCountOfBostonZips</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT DISTINCT COUNT(c.homeAddress.zip)
FROM Customer AS c
WHERE c.homeAddress.zip LIKE '0211%'</ejb-ql>
</query>
<query>
<query-method>
<method-name>findByOrderedLastName</method-name>
<method-params />
</query-method>
<ejb-ql>SELECT OBJECT( c ) FROM Customer AS c
ORDER BY c.lastName DESC</ejb-ql>
</query>
</entity>