Customer类中有一个Set类型的orders属性,用来存放Order订单对象,在Customer.hbm.xml文件中,用哪个元素映射orders属性?()A、<set>B、<one-to-many>C、<many-to-one>D、<property>

题目

Customer类中有一个Set类型的orders属性,用来存放Order订单对象,在Customer.hbm.xml文件中,用哪个元素映射orders属性?()

  • A、<set>
  • B、<one-to-many>
  • C、<many-to-one>
  • D、<property>

相似考题

2.阅读下列说明、图以及Java程序。[说明]某订单管理系统的部分UML类图如下图所示。上图中,Product表示产品,ProductList表示所销售产品的列表,Order表示产品订单,Orderltem表示产品订单中的一个条目,OrderList表示订单列表,SalesSystem提供订单管理系统的操作接口。各个类的部分属性和方法说明如下表所示。可以使用类java.util.ArrayList<E>米实现对象的聚集关系,如上图中OrderList与 Order之间的聚集关系。for-each循环提供了一种遍历对象集合的简单方法。在for-each循环中,可以指定需要遍历的对象集合以及用来接收集合中每个元素的变量,其语法如下:for(用来接收集合中元素的变量:需要遍历的对象集合)如果要使用for-each循环来遍历对象集合,那么包含该对象集合的类必须实现接口 java.util.Iterable<T>。Java程序7-1和Java程序7-2分别给出了类OrderList和方法statistic的Java代码[Java程序7-1]import java.util.*;public class OrderList (1) {private ArrayList<Order> orders;public OrderList0 {this.orders = new ArrayList<Order>();}public void addOrder(Order orde0this.orders.add(order);}public Iterator<Order> iterator() {return (2);}public iht getNumberOfOrders0 {return this.orders.size();}}[Java程序7-21]import java.u61.*;public class SalesSystem {private ProductList catalog;private OrderList sales;private static PrintWriter stdOut = new PrintWriter(System.out, true);public void statistic() {for (Product product: (3)) {iht number = 0;for (Order order: (4)) {for ((5): order) {if (produet.equals(item.getProduct()))number += item. getQuantity();}}stdOut.println(product .getCode() +" "+ product.getDescription() +" "+ number +" "+ number * product.getPrice());}}//其余的方法末列出}

更多“Customer类中有一个Set类型的orders属性,用来存放Order订单对象,在Customer.hbm.xml文件中,用哪个元素映射orders属性?()A、<set>B、<one-to-many>C、<many-to-one>D、<property>”相关问题
  • 第1题:

    在Hibernate的映射文件中,id节点的property元素的()表示指定类的属性映射的表的字段名。

    • A、name
    • B、type
    • C、column
    • D、lazy

    正确答案:C

  • 第2题:

    <set>元素有一个cascade属性,如果希望Hibernate级联保存集合中的对象,casecade属性应该取()值

    • A、none
    • B、save
    • C、delete
    • D、save-update

    正确答案:D

  • 第3题:

    在Hibernate中,Customer类中有一个Set类型的orders属性,用于存放Order订单对象,在Customer.hbm.xml文件中,可以用()元素映射orders属性。

    • A、<set>
    • B、<one-to-many>
    • C、<many-to-one>
    • D、<property>

    正确答案:A

  • 第4题:

    Customer类中有一个Set类型的orders属性,用来存放Order订单对象,在Customer.hbm.xml文件中,用哪个元素映射orders属性()

    • A、<set>
    • B、<one-to-many>
    • C、<many-to-one>
    • D、<property>

    正确答案:A

  • 第5题:

    Which statement accomplish this? ()

    • A、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);
    • B、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
    • C、CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
    • D、CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);
    • E、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);
    • F、CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);

    正确答案:B

  • 第6题:

    You are creating a Windows Communication Foundation (WCF) service to process orders.The data contract for the order is defined as follows:[DataContract]public class Order{ [DataMember] public string CardHolderName { get; set; } [DataMember] public string CreditCardNumber { get; set; }}You have the following requirements: Enable the transmission of the contents of Order from the clients to the service. Ensure that the contents of CreditCardNumber are not sent across the network in clear text. Ensure that the contents of CreditCardNumber are accessible by the service to process the order.You need to implement the service to meet these requirements. What should you do?()

    • A、Add a DataProtectionPermission attribute to the CreditCardNumber property and set the ProtectData property to true.
    • B、Convert the DataContract to a MessageContract and set the ProtectionLevel property to SignAndEncrypt.
    • C、Change the data type of CreditCardNumber from string to SecureString.
    • D、Implement the CreditCardNumber property getter and setter In the setter, run the value of the CreditCardNumber through the MD5CryptoServiceProvider class TransformBlock method.

    正确答案:B

  • 第7题:

    多选题
    在Hibernate映射文件中,关于标签说法正确的是()。
    A

    <component>标签用来映射组件类

    B

    <component>标签通过<parent>指定组件类所属的整体类

    C

    <component>标签通过<property>指定组件类的属性

    D

    <component>标签有id、name、class属性


    正确答案: A,C
    解析: 暂无解析

  • 第8题:

    单选题
    在Hibernate关系映射配置中,inverse属性的含义是()。
    A

    定义在<one-to-many>节点上,声明要负责关联的维护

    B

    声明在<set>节点上,声明要对方负责关联的维护

    C

    定义在<one-to-many>节点上,声明对方要负责关联的维护

    D

    声明在<set>节点上,声明要负责关联的维护


    正确答案: C
    解析: 暂无解析

  • 第9题:

    单选题
    You are creating a Windows Communication Foundation (WCF) service to process orders.The data contract for the order is defined as follows:[DataContract]public class Order{ [DataMember] public string CardHolderName { get; set; } [DataMember] public string CreditCardNumber { get; set; }}You have the following requirements: Enable the transmission of the contents of Order from the clients to the service. Ensure that the contents of CreditCardNumber are not sent across the network in clear text. Ensure that the contents of CreditCardNumber are accessible by the service to process the order.You need to implement the service to meet these requirements. What should you do?()
    A

    Add a DataProtectionPermission attribute to the CreditCardNumber property and set the ProtectData property to true.

    B

    Convert the DataContract to a MessageContract and set the ProtectionLevel property to SignAndEncrypt.

    C

    Change the data type of CreditCardNumber from string to SecureString.

    D

    Implement the CreditCardNumber property getter and setter In the setter, run the value of the CreditCardNumber through the MD5CryptoServiceProvider class TransformBlock method.


    正确答案: A
    解析: 暂无解析

  • 第10题:

    单选题
    Which statement accomplish this? ()
    A

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);

    B

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);

    C

    CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);

    D

    CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);

    E

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);

    F

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);


    正确答案: D
    解析: 暂无解析

  • 第11题:

    多选题
    你正在创建一个订单输入应用程序。你设置Ordraspx页为起始页。你希望用户提供一个用户名和密码才能够登陆Order.aspx页。你创建一个Login.aspx页来验证用户的名字和密码。你想确保用户在允许使用Order0aspx页之前要使用Login.aspx页登陆。你该用哪两个步骤?()
    A

    在Weconfig文件的authentication节中,设置authentication元素的mode属性为Forms,设置Forms元素的name属性为Login.aspx

    B

    在Machinconfig文件的credentials节中,设置deny元素的users属性为*

    C

    在Machinconfig文件的authorization节中,设置authentication元素的mode属性为Forms,设置trust元素的policyFile属性为Login.aspx

    D

    在Orders.aspx创建页面指令以登陆Login.aspx页

    E

    在Weconfig文件的authentication节中,设置authentication元素的mode属性为Forms,设置Forms元素的loginUrl属性为Login.aspx(正确答案)

    F

    在Weconfig文件的authorization节中,设置deny元素的users属性为?(正确答案)


    正确答案: E,F
    解析: 暂无解析

  • 第12题:

    多选题
    The ORDERS table has these columns: ORDER_ID NUMBER(4) NOT NULL CUSTOMER_ID NUMBER(12) NOT NULL ORDER_TOTAL NUMBER(10,2) The ORDERS table tracks the Order number, the order total, and the customer to whom the Order belongs. Which two statements retrieve orders with an inclusive total that ranges between 100.00 and 2000.00 dollars? ()
    A

    SELECT customer_id, order_id, order_total FROM orders RANGE ON order _ total (100 AND 2000) INCLUSIVE;

    B

    SELECT customer_id, order_id, order_total FROM orders HAVING order _ total BETWEEN 100 and 2000;

    C

    SELECT customer_id, order_id, order_total FROM orders WHERE order _ total BETWEEN 100 and 2000;

    D

    SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and <= 2000;

    E

    SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and order_total <= 2000;


    正确答案: A,E
    解析: 暂无解析

  • 第13题:

    在Hibernate映射文件中,关于标签说法正确的是()。

    • A、<component>标签用来映射组件类
    • B、<component>标签通过<parent>指定组件类所属的整体类
    • C、<component>标签通过<property>指定组件类的属性
    • D、<component>标签有id、name、class属性

    正确答案:A,B,C

  • 第14题:

    在Hibernate映射文件中,关于inverse属性说法正确的是()。

    • A、inverse属性有两个值:true、false
    • B、<many-to-one>标签有inverse属性
    • C、<set>标签有inverse属性
    • D、inverse属性用于指定维护关联关系的那一方

    正确答案:A,C,D

  • 第15题:

    在Hibernate关系映射配置中,inverse属性的含义是()。

    • A、定义在<one-to-many>节点上,声明要负责关联的维护
    • B、声明在<set>节点上,声明要对方负责关联的维护
    • C、定义在<one-to-many>节点上,声明对方要负责关联的维护
    • D、声明在<set>节点上,声明要负责关联的维护

    正确答案:B

  • 第16题:

    Flash中设置属性的命令是()。

    • A、Set Polity
    • B、Polity
    • C、Property
    • D、Set Property

    正确答案:D

  • 第17题:

    The ORDERS table has these columns: ORDER_ID NUMBER(4) NOT NULL CUSTOMER_ID NUMBER(12) NOT NULL ORDER_TOTAL NUMBER(10,2) The ORDERS table tracks the Order number, the order total, and the customer to whom the Order belongs. Which two statements retrieve orders with an inclusive total that ranges between 100.00 and 2000.00 dollars? ()

    • A、SELECT customer_id, order_id, order_total FROM orders RANGE ON order _ total (100 AND 2000) INCLUSIVE;
    • B、SELECT customer_id, order_id, order_total FROM orders HAVING order _ total BETWEEN 100 and 2000;
    • C、SELECT customer_id, order_id, order_total FROM orders WHERE order _ total BETWEEN 100 and 2000;
    • D、SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and <= 2000;
    • E、SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and order_total <= 2000;

    正确答案:C,E

  • 第18题:

    多选题
    The ORDERS table has these columns: ORDER_ID NUMBER(4) NOT NULL CUSTOMER_ID NUMBER(12) NOT NULL ORDER_TOTAL NUMBER(10,2) The ORDERS table tracks the Order number, the order total, and the customer to whom the Order belongs. Which two statements retrieve orders with an inclusive total that ranges between 100.00 and 2000.00 dollars? ()
    A

    SELECT customer_id, order_id, order_total FROM orders RANGE ON order _ total (100 AND 2000) INCLUSIVE;

    B

    SELECT customer_id, order_id, order_total FROM orders HAVING order _ total BETWEEN 100 and 2000;

    C

    SELECT customer_id, order_id, order_total FROM orders WHERE order _ total BETWEEN 100 and 2000;

    D

    SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and <= 2000;

    E

    SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and order_total <= 2000;


    正确答案: E,D
    解析: 暂无解析

  • 第19题:

    多选题
    在Hibernate映射文件中,关于inverse属性说法正确的是()。
    A

    inverse属性有两个值:true、false

    B

    <many-to-one>标签有inverse属性

    C

    <set>标签有inverse属性

    D

    inverse属性用于指定维护关联关系的那一方


    正确答案: D,C
    解析: 暂无解析

  • 第20题:

    单选题
    在Hibernate中,Customer类中有一个Set类型的orders属性,用于存放Order订单对象,在Customer.hbm.xml文件中,可以用()元素映射orders属性。
    A

    <set>

    B

    <one-to-many>

    C

    <many-to-one>

    D

    <property>


    正确答案: D
    解析: 暂无解析

  • 第21题:

    多选题
    在Hibernate映射文件中,关于延迟加载配置说法错误的是()
    A

    <class>标签中lazy属性可选值:true、false

    B

    <set>标签中lazy属性可选值:true、proxy和no-proxy

    C

    <set>标签中lazy属性可选值:true、extra和false

    D

    <many-to-one>标签中lazy属性可选值:proxy、true和false


    正确答案: C,B
    解析: 暂无解析

  • 第22题:

    单选题
    Customer类中有一个Set类型的orders属性,用来存放Order订单对象,在Customer.hbm.xml文件中,用哪个元素映射orders属性()
    A

    <set>

    B

    <one-to-many>

    C

    <many-to-one>

    D

    <property>


    正确答案: D
    解析: 暂无解析

  • 第23题:

    单选题
    你开发了一个命令登陆应用程序TestKingOrder.TestKingOrder.用一个DataSet方法来命名CurrentOrders来维护当用户修改数据时内存中的数据。在CurrentOrders中,你添加了DataTable对象命名为Orders和OrderDetails.OrderDetails用来容纳关于命令行中的数据。用户经常发现一行命令不被包含在OrderDetails里面.在这种情况下,他们删除了Orders中的order。你必须确保用户不能删除任何关于order在OrderDetails中的数据。你应该怎么做?()
    A

    添加一个UniqueConstraint对象到CurrentOrders中

    B

    添加一个ForeignKeyConstraint对象到CurrentOrders中

    C

    添加一个DataRelation对象到CurrentOrders中,并且设置ChildKeyConstraint的属性为指向theappropriate行

    D

    添加一个DataRelation对象到CurrentOrders中,并且设置ParentKeyConstraint的属性为指向适当的行


    正确答案: B
    解析: 暂无解析

  • 第24题:

    单选题
    在Hibernate的映射文件中,id节点的property元素的()表示指定类的属性映射的表的字段名。
    A

    name

    B

    type

    C

    column

    D

    lazy


    正确答案: C
    解析: 暂无解析