alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Hibernate example source code file (inheritance_mapping.po)

This example Hibernate source code file (inheritance_mapping.po) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Hibernate tags/keywords

cashpayment, chequepayment, credit_payment, creditcardpayment, hibernate, hibernate, payment, payment, payment_id, payment_id, polymorphic, table, tag, tag

The Hibernate inheritance_mapping.po source code

# translation of Collection_Mapping.po to
# Xi Huang <xhuang@redhat.com>, 2006.
# Xi HUANG <xhuang@redhat.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-02-11T05:38:15\n"
"PO-Revision-Date: 2010-03-15 09:06+1000\n"
"Last-Translator: Xi HUANG <xhuang@redhat.com>\n"
"Language-Team:  <en@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"

#. Tag: title
#, no-c-format
msgid "Inheritance mapping"
msgstr "继承映射(Inheritance Mapping) "

#. Tag: title
#, no-c-format
msgid "The three strategies"
msgstr "三种策略 "

#. Tag: para
#, no-c-format
msgid "Hibernate supports the three basic inheritance mapping strategies:"
msgstr "Hibernate 支持三种基本的继承映射策略:"

#. Tag: para
#, no-c-format
msgid "table per class hierarchy"
msgstr "每个类分层结构一张表(table per class hierarchy)"

#. Tag: para
#, no-c-format
msgid "table per subclass"
msgstr "每个子类一张表(Table per subclass) "

#. Tag: para
#, no-c-format
msgid "table per concrete class"
msgstr "每个具体类一张表(table per concrete class)"

#. Tag: para
#, no-c-format
msgid "In addition, Hibernate supports a fourth, slightly different kind of polymorphism:"
msgstr "此外,Hibernate 还支持第四种稍有不同的多态映射策略:"

#. Tag: para
#, no-c-format
msgid "implicit polymorphism"
msgstr "隐式多态(implicit polymorphism)"

#. Tag: para
#, no-c-format
msgid "It is possible to use different mapping strategies for different branches of the same inheritance hierarchy. You can then make use of implicit polymorphism to achieve polymorphism across the whole hierarchy. However, Hibernate does not support mixing <literal><subclass>, <joined-subclass> and <union-subclass> mappings under the same root <class> element. It is possible to mix together the table per hierarchy and table per subclass strategies under the the same <class> element, by combining the <subclass> and <join> elements (see below for an example)."
msgstr "对于同一个继承层次内的不同分支,可以采用不同的映射策略,然后用隐式多 态来完成跨越整个层次的多态。但是在同一个 <literal><class> 根元素下,Hibernate 不支持混合了元素 <subclass><joined-subclass><union-subclass> 的映射。在同一个 <class> 元素下,可以混合使用“每个类分层结构一张表”(table per hierarchy)和“每个子类一张表”(table per subclass) 这两种映射策略,这是通过结合元素 <subclass><join> 来实现的(见后)。 "

#. Tag: para
#, no-c-format
msgid "It is possible to define <literal>subclass, union-subclass, and joined-subclass mappings in separate mapping documents directly beneath hibernate-mapping. This allows you to extend a class hierarchy by adding a new mapping file. You must specify an extends attribute in the subclass mapping, naming a previously mapped superclass. Previously this feature made the ordering of the mapping documents important. Since Hibernate3, the ordering of mapping files is irrelevant when using the extends keyword. The ordering inside a single mapping file still needs to be defined as superclasses before subclasses."
msgstr "在多个映射文件中,可以直接在 <literal>hibernate-mapping 根下定义 subclassunion-subclassjoined-subclass。也就是说,你可以仅加入一个新的映射文件来扩展类层次。你必须在 subclass 的映射中指明 extends 属性,给出一个之前定义的超类的名字。注意,在以前,这一功能对映射文件的顺序有严格的要求,从 Hibernate 3 开始,使用 extends 关键字的时侯,对映射文件的顺序不再有要求;但在每个映射文件里,超类必须在子类之前定义。 "

#. Tag: title
#, no-c-format
msgid "Table per class hierarchy"
msgstr "每个类分层结构一张表(Table per class hierarchy)"

#. Tag: para
#, no-c-format
msgid "Suppose we have an interface <literal>Payment with the implementors CreditCardPayment, CashPayment, and ChequePayment. The table per hierarchy mapping would display in the following way:"
msgstr "假设我们有接口<literal>Payment和它的几个实现类: CreditCardPayment, CashPaymentChequePayment。则“每个类分层结构一张表”(Table per class hierarchy)的映射代码如下所示: "

#. Tag: para
#, no-c-format
msgid "Exactly one table is required. There is a limitation of this mapping strategy: columns declared by the subclasses, such as <literal>CCTYPE, cannot have NOT NULL constraints."
msgstr "采用这种策略只需要一张表即可。它有一个很大的限制:要求那些由子类定义的字段, 如 <literal>CCTYPE,不能有非空(NOT NULL)约束。 "

#. Tag: title
#, no-c-format
msgid "Table per subclass"
msgstr "每个子类一张表(Table per subclass)"

#. Tag: para
#, no-c-format
msgid "A table per subclass mapping looks like this:"
msgstr " 对于上例中的几个类而言,采用“每个子类一张表”的映射策略,代码如下所示:"

#. Tag: para
#, no-c-format
msgid "Four tables are required. The three subclass tables have primary key associations to the superclass table so the relational model is actually a one-to-one association."
msgstr "需要四张表。三个子类表通过主键关联到超类表(因而关系模型实际上是一对一关联)。 "

#. Tag: title
#, no-c-format
msgid "Table per subclass: using a discriminator"
msgstr "每个子类一张表(Table per subclass),使用辨别标志(Discriminator)  "

#. Tag: para
#, no-c-format
msgid "Hibernate's implementation of table per subclass does not require a discriminator column. Other object/relational mappers use a different implementation of table per subclass that requires a type discriminator column in the superclass table. The approach taken by Hibernate is much more difficult to implement, but arguably more correct from a relational point of view. If you want to use a discriminator column with the table per subclass strategy, you can combine the use of <literal><subclass> and <join>, as follows:"
msgstr "注意,对“每个子类一张表”的映射策略,Hibernate 的实现不需要辨别字段,而其他的对象/关系映射工具使用了一种不同于Hibernate的实现方法,该方法要求在超类表中有一个类型辨别字段(type discriminator column)。Hibernate 采用的方法更难实现,但从关系(数据库)的角度来看,按理说它更正确。若你愿意使用带有辨别字段的“每个子类一张表”的策略,你可以结合使用 <literal><subclass> 与<join>,如下所示: "

#. Tag: para
#, no-c-format
msgid "The optional <literal>fetch=\"select\" declaration tells Hibernate not to fetch the ChequePayment subclass data using an outer join when querying the superclass."
msgstr "可选的声明 <literal>fetch=\"select\",是用来告诉 Hibernate,在查询超类时,不要使用外部连接(outer join)来抓取子类 ChequePayment 的数据。"

#. Tag: title
#, no-c-format
msgid "Mixing table per class hierarchy with table per subclass"
msgstr "混合使用“每个类分层结构一张表”和“每个子类一张表”"

#. Tag: para
#, no-c-format
msgid "You can even mix the table per hierarchy and table per subclass strategies using the following approach:"
msgstr "你甚至可以采取如下方法混和使用“每个类分层结构一张表”和“每个子类一张表”这两种策略: "

#. Tag: para
#, no-c-format
msgid "For any of these mapping strategies, a polymorphic association to the root <literal>Payment class is mapped using <many-to-one>."
msgstr "对上述任何一种映射策略而言,指向根类 <literal>Payment 的关联是使用 <many-to-one> 进行映射的。"

#. Tag: title
#, no-c-format
msgid "Table per concrete class"
msgstr "每个具体类一张表(Table per concrete class)"

#. Tag: para
#, no-c-format
msgid "There are two ways we can map the table per concrete class strategy. First, you can use <literal><union-subclass>."
msgstr "对于“每个具体类一张表”的映射策略,可以采用两种方法。第一种方法是使用  <literal><union-subclass>。 "

#. Tag: para
#, no-c-format
msgid "Three tables are involved for the subclasses. Each table defines columns for all properties of the class, including inherited properties."
msgstr "这里涉及三张与子类相关的表。每张表为对应类的所有属性(包括从超类继承的属性)定义相应字段。"

#. Tag: para
#, no-c-format
msgid "The limitation of this approach is that if a property is mapped on the superclass, the column name must be the same on all subclass tables. The identity generator strategy is not allowed in union subclass inheritance. The primary key seed has to be shared across all unioned subclasses of a hierarchy."
msgstr "这种方式的局限在于,如果一个属性在超类中做了映射,其字段名必须与所有子类表中定义的相同。(我们可能会在 Hibernate 的后续发布版本中放宽此限制。)不允许在联合子类(union subclass)的继承层次中使用标识生成器策略(identity generator strategy),实际上,主键的种子(primary key seed)不得不为同一继承层次中的全部被联合子类所共用。 "

#. Tag: para
#, no-c-format
msgid "If your superclass is abstract, map it with <literal>abstract=\"true\". If it is not abstract, an additional table (it defaults to PAYMENT in the example above), is needed to hold instances of the superclass."
msgstr "假若超类是抽象类,请使用 <literal>abstract=\"true\"。当然,假若它不是抽象的,需要一个额外的表(上面的例子中,默认是 PAYMENT),来保存超类的实例。 "

#. Tag: title
#, no-c-format
msgid "Table per concrete class using implicit polymorphism"
msgstr "每个具体类一张表,使用隐式多态 "

#. Tag: para
#, no-c-format
msgid "An alternative approach is to make use of implicit polymorphism:"
msgstr "另一种可供选择的方法是采用隐式多态:"

#. Tag: para
#, no-c-format
msgid "Notice that the <literal>Payment interface is not mentioned explicitly. Also notice that properties of Payment are mapped in each of the subclasses. If you want to avoid duplication, consider using XML entities (for example, [ <!ENTITY allproperties SYSTEM \"allproperties.xml\"> ] in the DOCTYPE declaration and &allproperties; in the mapping)."
msgstr "请注意,这里没有显性地提及 <literal>Payment 接口。Payment 的属性映射到每个子类。如果你想避免重复,请考虑使用 XML 实体(如:DOCTYPE 声明里的  [ <!ENTITY allproperties SYSTEM \"allproperties.xml\"> ] 和映射里的 &allproperties;)。 "

#. Tag: para
#, no-c-format
msgid "The disadvantage of this approach is that Hibernate does not generate SQL <literal>UNIONs when performing polymorphic queries."
msgstr "这种方法的缺陷在于,在 Hibernate 执行多态查询时(polymorphic queries)无法生成带 <literal>UNION 的 SQL 语句。 "

#. Tag: para
#, no-c-format
msgid "For this mapping strategy, a polymorphic association to <literal>Payment is usually mapped using <any>."
msgstr "对于这种映射策略而言,通常用 <literal><any> 来实现到  Payment 的多态关联映射。"

#. Tag: title
#, no-c-format
msgid "Mixing implicit polymorphism with other inheritance mappings"
msgstr "隐式多态和其他继承映射混合使用"

#. Tag: para
#, no-c-format
msgid "Since the subclasses are each mapped in their own <literal><class> element, and since Payment is just an interface), each of the subclasses could easily be part of another inheritance hierarchy. You can still use polymorphic queries against the Payment interface."
msgstr "对这一映射还有一点需要注意。因为每个子类都在各自独立的元素 <literal><class> 中映射(并且 Payment 只是一个接口),每个子类可以很容易的成为另一个继承体系中的一部分!(你仍然可以对接口 Payment 使用多态查询。) "

#. Tag: para
#, no-c-format
msgid "Once again, <literal>Payment is not mentioned explicitly. If we execute a query against the Payment interface, for example from Payment, Hibernate automatically returns instances of CreditCardPayment (and its subclasses, since they also implement Payment), CashPayment and ChequePayment, but not instances of NonelectronicTransaction."
msgstr "我们还是没有明确的提到 <literal>Payment。如果我们针对接口 Payment 执行查询 — 如 from Payment — Hibernate 自动返回 CreditCardPayment(和它的子类,因为 它们也实现了接口 Payment)、CashPaymentChequepayment 的实例,但不返回 NonelectronicTransaction 的实例。 "

#. Tag: title
#, no-c-format
msgid "Limitations"
msgstr "限制"

#. Tag: para
#, no-c-format
msgid "There are limitations to the \"implicit polymorphism\" approach to the table per concrete-class mapping strategy. There are somewhat less restrictive limitations to <literal><union-subclass> mappings."
msgstr "对“每个具体类映射一张表”(table per concrete-class)的映射策略而言,隐式多态的方式有一定的限制。而 <literal><union-subclass> 映射的限制则没有那么严格。 "

#. Tag: para
#, no-c-format
msgid "The following table shows the limitations of table per concrete-class mappings, and of implicit polymorphism, in Hibernate."
msgstr "下面表格中列出了在 Hibernte 中“每个具体类一张表”的策略和隐式多态的限制。"

#. Tag: title
#, no-c-format
msgid "Features of inheritance mappings"
msgstr "继承映射特性(Features of inheritance mappings)"

#. Tag: entry
#, no-c-format
msgid "Inheritance strategy"
msgstr "继承策略(Inheritance strategy)"

#. Tag: entry
#, no-c-format
msgid "Polymorphic many-to-one"
msgstr "多态多对多 "

#. Tag: entry
#, no-c-format
msgid "Polymorphic one-to-one"
msgstr "多态一对一"

#. Tag: entry
#, no-c-format
msgid "Polymorphic one-to-many"
msgstr "多态一对多"

#. Tag: entry
#, no-c-format
msgid "Polymorphic many-to-many"
msgstr "多态多对多"

#. Tag: entry
#, no-c-format
msgid "Polymorphic <literal>load()/get()"
msgstr "Polymorphic <literal>load()/get()"

#. Tag: entry
#, no-c-format
msgid "Polymorphic queries"
msgstr "多态查询"

#. Tag: entry
#, no-c-format
msgid "Polymorphic joins"
msgstr "多态连接(join)"

#. Tag: entry
#, no-c-format
msgid "Outer join fetching"
msgstr "支持外连接(Outer join)读取。 "

#. Tag: entry
#, no-c-format
msgid "table per class-hierarchy"
msgstr "每个类分层结构一张表(table per class hierarchy) "

#. Tag: entry
#, no-c-format
msgid "<literal><many-to-one>"
msgstr "<literal><many-to-one>"

#. Tag: entry
#, no-c-format
msgid "<literal><one-to-one>"
msgstr "<literal><one-to-one>"

#. Tag: entry
#, no-c-format
msgid "<literal><one-to-many>"
msgstr "<literal><one-to-many>"

#. Tag: entry
#, no-c-format
msgid "<literal><many-to-many>"
msgstr "<literal><many-to-many>"

#. Tag: entry
#, no-c-format
msgid "<literal>s.get(Payment.class, id)"
msgstr "<literal>s.get(Payment.class, id)"

#. Tag: entry
#, no-c-format
msgid "<literal>from Payment p"
msgstr "<literal>from Payment p"

#. Tag: entry
#, no-c-format
msgid "<literal>from Order o join o.payment p"
msgstr "<literal>from Order o join o.payment p"

#. Tag: entry
#, no-c-format
msgid "<emphasis>supported"
msgstr "<emphasis>所支持的"

#. Tag: entry
#, no-c-format
msgid "table per concrete-class (union-subclass)"
msgstr "每个具体类一张表(union-subclass)"

#. Tag: entry
#, no-c-format
msgid "<literal><one-to-many> (for inverse=\"true\" only)"
msgstr "<literal><one-to-many> (仅适用于 inverse=\"true\")"

#. Tag: entry
#, no-c-format
msgid "table per concrete class (implicit polymorphism)"
msgstr "每个具体类一张表(隐式多态)  "

#. Tag: entry
#, no-c-format
msgid "<literal><any>"
msgstr "<literal><any>"

#. Tag: entry
#, no-c-format
msgid "<emphasis>not supported"
msgstr "<emphasis>不支持的"

#. Tag: entry
#, no-c-format
msgid "<literal><many-to-any>"
msgstr "<literal><many-to-any>"

#. Tag: entry
#, no-c-format
msgid "<literal>s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"
msgstr "<literal>s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"

#~ msgid "table per class-heirarchy"
#~ msgstr "每个类分层结构一张表 "

#~ msgid "Polymorphic many-to-one: <code><many-to-one>"
#~ msgstr "多态性多对一:<code><many-to-one>"

#~ msgid "Polymorphic one-to-one: <code><one-to-one>"
#~ msgstr "多态性一对一:<code><one-to-one>"

#~ msgid "Polymorphic one-to-many: <code><one-to-many>"
#~ msgstr "多态性一对多:<code><one-to-many>"

#~ msgid "Polymorphic many-to-many: <code><many-to-many>"
#~ msgstr "多态性多对多:<code><many-to-many>"

#~ msgid ""
#~ "Polymorphic <literal>load() or get(): "
#~ "<code>s.get(Payment.class, id)"
#~ msgstr ""
#~ "多态性 <literal>load() 或 get()s.get"
#~ "(Payment.class, id)</code>"

#~ msgid "Polymorphic queries: <code>from Payment p"
#~ msgstr "多态性查询:<code>from Payment p"

#~ msgid "Polymorphic many-to-one: <code><any>"
#~ msgstr "多态多对一:<code><any>"

#~ msgid ""
#~ "Polymorphic one-to-one, polymorphic one-to-many, polymorphic joins, and "
#~ "outer join fetching are not supported."
#~ msgstr ""
#~ "多态性一对一、多态性一对多,不支持多态性 join 和 outer join fetching。"

#~ msgid "<para>table per subclass"
#~ msgstr "<para>每个子类一张表"

#, fuzzy
#~ msgid ""
#~ "<![CDATA[\n"
#~ " <hibernate-mapping>\n"
#~ "     <subclass name=\"DomesticCat\" extends=\"Cat\" discriminator-value="
#~ "\"D\">\n"
#~ "          <property name=\"name\" type=\"string\"/>\n"
#~ "     </subclass>\n"
#~ " </hibernate-mapping>]]>"
#~ msgstr ""
#~ "<hibernate-mapping>\n"
#~ "     <subclass name=\"DomesticCat\" extends=\"Cat\" discriminator-"
#~ "value=\"D\">\n"
#~ "          <property name=\"name\" type=\"string\"/>\n"
#~ "     </subclass>\n"
#~ " </hibernate-mapping>"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"Payment\" table=\"PAYMENT\">\n"
#~ "    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
#~ "        <generator class=\"native\"/>\n"
#~ "    </id>\n"
#~ "    <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"
#~ "    <property name=\"amount\" column=\"AMOUNT\"/>\n"
#~ "    ...\n"
#~ "    <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT"
#~ "\">\n"
#~ "        <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
#~ "        ...\n"
#~ "    </subclass>\n"
#~ "    <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"
#~ "        ...\n"
#~ "    </subclass>\n"
#~ "    <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE"
#~ "\">\n"
#~ "        ...\n"
#~ "    </subclass>\n"
#~ "</class>"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"Payment\" table=\"PAYMENT\">\n"
#~ "    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
#~ "        <generator class=\"native\"/>\n"
#~ "    </id>\n"
#~ "    <property name=\"amount\" column=\"AMOUNT\"/>\n"
#~ "    ...\n"
#~ "    <joined-subclass name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT"
#~ "\">\n"
#~ "        <key column=\"PAYMENT_ID\"/>\n"
#~ "        <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
#~ "        ...\n"
#~ "    </joined-subclass>\n"
#~ "    <joined-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
#~ "        <key column=\"PAYMENT_ID\"/>\n"
#~ "        ...\n"
#~ "    </joined-subclass>\n"
#~ "    <joined-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT"
#~ "\">\n"
#~ "        <key column=\"PAYMENT_ID\"/>\n"
#~ "        ...\n"
#~ "    </joined-subclass>\n"
#~ "</class>"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"Payment\" table=\"PAYMENT\">\n"
#~ "    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
#~ "        <generator class=\"native\"/>\n"
#~ "    </id>\n"
#~ "    <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"
#~ "    <property name=\"amount\" column=\"AMOUNT\"/>\n"
#~ "    ...\n"
#~ "    <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT"
#~ "\">\n"
#~ "        <join table=\"CREDIT_PAYMENT\">\n"
#~ "            <key column=\"PAYMENT_ID\"/>\n"
#~ "            <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
#~ "            ...\n"
#~ "        </join>\n"
#~ "    </subclass>\n"
#~ "    <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"
#~ "        <join table=\"CASH_PAYMENT\">\n"
#~ "            <key column=\"PAYMENT_ID\"/>\n"
#~ "            ...\n"
#~ "        </join>\n"
#~ "    </subclass>\n"
#~ "    <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE"
#~ "\">\n"
#~ "        <join table=\"CHEQUE_PAYMENT\" fetch=\"select\">\n"
#~ "            <key column=\"PAYMENT_ID\"/>\n"
#~ "            ...\n"
#~ "        </join>\n"
#~ "    </subclass>\n"
#~ "</class>"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"Payment\" table=\"PAYMENT\">\n"
#~ "    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
#~ "        <generator class=\"native\"/>\n"
#~ "    </id>\n"
#~ "    <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"
#~ "    <property name=\"amount\" column=\"AMOUNT\"/>\n"
#~ "    ...\n"
#~ "    <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT"
#~ "\">\n"
#~ "        <join table=\"CREDIT_PAYMENT\">\n"
#~ "            <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
#~ "            ...\n"
#~ "        </join>\n"
#~ "    </subclass>\n"
#~ "    <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"
#~ "        ...\n"
#~ "    </subclass>\n"
#~ "    <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE"
#~ "\">\n"
#~ "        ...\n"
#~ "    </subclass>\n"
#~ "</class>"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<many-to-one name=\"payment\" column=\"PAYMENT_ID\" class=\"Payment\"/"
#~ ">"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"Payment\">\n"
#~ "    <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"
#~ "        <generator class=\"sequence\"/>\n"
#~ "    </id>\n"
#~ "    <property name=\"amount\" column=\"AMOUNT\"/>\n"
#~ "    ...\n"
#~ "    <union-subclass name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT"
#~ "\">\n"
#~ "        <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"
#~ "        ...\n"
#~ "    </union-subclass>\n"
#~ "    <union-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
#~ "        ...\n"
#~ "    </union-subclass>\n"
#~ "    <union-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT"
#~ "\">\n"
#~ "        ...\n"
#~ "    </union-subclass>\n"
#~ "</class>"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"
#~ "    <id name=\"id\" type=\"long\" column=\"CREDIT_PAYMENT_ID\">\n"
#~ "        <generator class=\"native\"/>\n"
#~ "    </id>\n"
#~ "    <property name=\"amount\" column=\"CREDIT_AMOUNT\"/>\n"
#~ "    ...\n"
#~ "</class>\n"
#~ "\n"
#~ "<class name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
#~ "    <id name=\"id\" type=\"long\" column=\"CASH_PAYMENT_ID\">\n"
#~ "        <generator class=\"native\"/>\n"
#~ "    </id>\n"
#~ "    <property name=\"amount\" column=\"CASH_AMOUNT\"/>\n"
#~ "    ...\n"
#~ "</class>\n"
#~ "\n"
#~ "<class name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"
#~ "    <id name=\"id\" type=\"long\" column=\"CHEQUE_PAYMENT_ID\">\n"
#~ "        <generator class=\"native\"/>\n"
#~ "    </id>\n"
#~ "    <property name=\"amount\" column=\"CHEQUE_AMOUNT\"/>\n"
#~ "    ...\n"
#~ "</class>"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<any name=\"payment\" meta-type=\"string\" id-type=\"long\">\n"
#~ "    <meta-value value=\"CREDIT\" class=\"CreditCardPayment\"/>\n"
#~ "    <meta-value value=\"CASH\" class=\"CashPayment\"/>\n"
#~ "    <meta-value value=\"CHEQUE\" class=\"ChequePayment\"/>\n"
#~ "    <column name=\"PAYMENT_CLASS\"/>\n"
#~ "    <column name=\"PAYMENT_ID\"/>\n"
#~ "</any>"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"
#~ "    <id name=\"id\" type=\"long\" column=\"CREDIT_PAYMENT_ID\">\n"
#~ "        <generator class=\"native\"/>\n"
#~ "    </id>\n"
#~ "    <discriminator column=\"CREDIT_CARD\" type=\"string\"/>\n"
#~ "    <property name=\"amount\" column=\"CREDIT_AMOUNT\"/>\n"
#~ "    ...\n"
#~ "    <subclass name=\"MasterCardPayment\" discriminator-value=\"MDC\"/"
#~ ">\n"
#~ "    <subclass name=\"VisaPayment\" discriminator-value=\"VISA\"/>\n"
#~ "</class>\n"
#~ "\n"
#~ "<class name=\"NonelectronicTransaction\" table=\"NONELECTRONIC_TXN"
#~ "\">\n"
#~ "    <id name=\"id\" type=\"long\" column=\"TXN_ID\">\n"
#~ "        <generator class=\"native\"/>\n"
#~ "    </id>\n"
#~ "    ...\n"
#~ "    <joined-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"
#~ "        <key column=\"PAYMENT_ID\"/>\n"
#~ "        <property name=\"amount\" column=\"CASH_AMOUNT\"/>\n"
#~ "        ...\n"
#~ "    </joined-subclass>\n"
#~ "    <joined-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT"
#~ "\">\n"
#~ "        <key column=\"PAYMENT_ID\"/>\n"
#~ "        <property name=\"amount\" column=\"CHEQUE_AMOUNT\"/>\n"
#~ "        ...\n"
#~ "    </joined-subclass>\n"
#~ "</class>"

#, fuzzy
#~ msgid "<term>table per subclass"
#~ msgstr "<entry>每个子类一张表"

#~ msgid "from Payment p"
#~ msgstr "from Payment p"

#~ msgid "supported"
#~ msgstr "支持"

#~ msgid "<any>"
#~ msgstr "<any>"

#~ msgid "not supported"
#~ msgstr "不支持"

Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate inheritance_mapping.po source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.