PageRenderTime 35ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/tests/com/google/appengine/datanucleus/test/SubclassesJDO.java

http://datanucleus-appengine.googlecode.com/
Java | 910 lines | 581 code | 170 blank | 159 comment | 0 complexity | 41892e72d2efa1d310b0b8db4be7a25f MD5 | raw file
Possible License(s): Apache-2.0
  1. /**********************************************************************
  2. Copyright (c) 2009 Google Inc.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. **********************************************************************/
  13. package com.google.appengine.datanucleus.test;
  14. import javax.jdo.annotations.Column;
  15. import javax.jdo.annotations.Embedded;
  16. import javax.jdo.annotations.EmbeddedOnly;
  17. import javax.jdo.annotations.IdGeneratorStrategy;
  18. import javax.jdo.annotations.IdentityType;
  19. import javax.jdo.annotations.Inheritance;
  20. import javax.jdo.annotations.InheritanceStrategy;
  21. import javax.jdo.annotations.PersistenceCapable;
  22. import javax.jdo.annotations.Persistent;
  23. import javax.jdo.annotations.PrimaryKey;
  24. /**
  25. * There is a ton of duplication in these classes. The reason is that the
  26. * runtime enhancer gets unhappy when there are multiple persistent classes
  27. * extending one persistent class. So, in order to get all the permutations
  28. * of inheritance strategies that we want to test, we have to create a large
  29. * number of very narrow trees. Annoying.
  30. *
  31. * @author Max Ross <maxr@google.com>
  32. */
  33. public class SubclassesJDO {
  34. public interface Parent {
  35. Long getId();
  36. void setAString(String val);
  37. String getAString();
  38. }
  39. public interface Child extends Parent {
  40. void setBString(String val);
  41. String getBString();
  42. }
  43. public interface Grandchild extends Child {
  44. void setCString(String val);
  45. String getCString();
  46. }
  47. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  48. @Inheritance(customStrategy = "complete-table")
  49. public static class CompleteTableParentWithCompleteTableChild implements Parent {
  50. @PrimaryKey
  51. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  52. private Long id;
  53. @Persistent
  54. private String aString;
  55. public Long getId() {
  56. return id;
  57. }
  58. public void setAString(String aString) {
  59. this.aString = aString;
  60. }
  61. public String getAString() {
  62. return aString;
  63. }
  64. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  65. @Inheritance(customStrategy = "complete-table")
  66. public static class Child extends CompleteTableParentWithCompleteTableChild
  67. implements SubclassesJDO.Child {
  68. @Persistent
  69. private String bString;
  70. public void setBString(String bString) {
  71. this.bString = bString;
  72. }
  73. public String getBString() {
  74. return bString;
  75. }
  76. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  77. @Inheritance(customStrategy = "complete-table")
  78. public static class Grandchild extends Child implements SubclassesJDO.Grandchild {
  79. @Persistent
  80. private String cString;
  81. public void setCString(String cString) {
  82. this.cString = cString;
  83. }
  84. public String getCString() {
  85. return cString;
  86. }
  87. }
  88. }
  89. }
  90. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  91. @Inheritance(customStrategy = "complete-table")
  92. public static class CompleteTableParentWithNewTableChild implements Parent {
  93. @PrimaryKey
  94. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  95. private Long id;
  96. @Persistent
  97. private String aString;
  98. public Long getId() {
  99. return id;
  100. }
  101. public void setAString(String aString) {
  102. this.aString = aString;
  103. }
  104. public String getAString() {
  105. return aString;
  106. }
  107. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  108. @Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
  109. public static class Child extends CompleteTableParentWithNewTableChild implements SubclassesJDO.Child {
  110. @Persistent
  111. private String bString;
  112. public void setBString(String bString) {
  113. this.bString = bString;
  114. }
  115. public String getBString() {
  116. return bString;
  117. }
  118. }
  119. }
  120. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  121. @Inheritance(customStrategy = "complete-table")
  122. public static class CompleteTableParentWithSubclassTableChild implements Parent {
  123. @PrimaryKey
  124. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  125. private Long id;
  126. @Persistent
  127. private String aString;
  128. public Long getId() {
  129. return id;
  130. }
  131. public void setAString(String aString) {
  132. this.aString = aString;
  133. }
  134. public String getAString() {
  135. return aString;
  136. }
  137. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  138. @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
  139. public static class Child extends CompleteTableParentWithSubclassTableChild
  140. implements SubclassesJDO.Child {
  141. @Persistent
  142. private String bString;
  143. public void setBString(String bString) {
  144. this.bString = bString;
  145. }
  146. public String getBString() {
  147. return bString;
  148. }
  149. }
  150. // Enhancer rejects this
  151. // @PersistenceCapable(identityType = IdentityType.APPLICATION)
  152. // @Inheritance(strategy = InheritanceStrategy.SUPERCLASS_TABLE)
  153. // public static class SuperChild extends CompleteParent {
  154. //
  155. // @Persistent
  156. // private String bString;
  157. //
  158. // public void setBString(String bString) {
  159. // this.bString = bString;
  160. // }
  161. //
  162. // public String getBString() {
  163. // return bString;
  164. // }
  165. // }
  166. }
  167. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  168. @Inheritance(customStrategy = "complete-table")
  169. public static class CompleteTableParentNoChildStrategy implements Parent {
  170. @PrimaryKey
  171. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  172. private Long id;
  173. @Persistent
  174. private String aString;
  175. public Long getId() {
  176. return id;
  177. }
  178. public void setAString(String aString) {
  179. this.aString = aString;
  180. }
  181. public String getAString() {
  182. return aString;
  183. }
  184. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  185. public static class Child
  186. extends CompleteTableParentNoChildStrategy implements SubclassesJDO.Child {
  187. @Persistent
  188. private String bString;
  189. public void setBString(String bString) {
  190. this.bString = bString;
  191. }
  192. public String getBString() {
  193. return bString;
  194. }
  195. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  196. public static class Grandchild extends Child implements SubclassesJDO.Grandchild {
  197. @Persistent
  198. private String cString;
  199. public void setCString(String cString) {
  200. this.cString = cString;
  201. }
  202. public String getCString() {
  203. return cString;
  204. }
  205. }
  206. }
  207. }
  208. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  209. @Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
  210. public static class NewTableParentWithCompleteTableChild implements Parent {
  211. @PrimaryKey
  212. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  213. private Long id;
  214. @Persistent
  215. private String aString;
  216. public Long getId() {
  217. return id;
  218. }
  219. public void setAString(String aString) {
  220. this.aString = aString;
  221. }
  222. public String getAString() {
  223. return aString;
  224. }
  225. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  226. @Inheritance(customStrategy = "complete-table")
  227. public static class Child extends NewTableParentWithCompleteTableChild implements
  228. SubclassesJDO.Child {
  229. @Persistent
  230. private String bString;
  231. public void setBString(String bString) {
  232. this.bString = bString;
  233. }
  234. public String getBString() {
  235. return bString;
  236. }
  237. }
  238. }
  239. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  240. @Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
  241. public static class NewTableParentWithNewTableChild implements Parent {
  242. @PrimaryKey
  243. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  244. private Long id;
  245. @Persistent
  246. private String aString;
  247. public Long getId() {
  248. return id;
  249. }
  250. public void setAString(String aString) {
  251. this.aString = aString;
  252. }
  253. public String getAString() {
  254. return aString;
  255. }
  256. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  257. @Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
  258. public static class Child extends NewTableParentWithNewTableChild implements SubclassesJDO.Child {
  259. @Persistent
  260. private String bString;
  261. public void setBString(String bString) {
  262. this.bString = bString;
  263. }
  264. public String getBString() {
  265. return bString;
  266. }
  267. }
  268. }
  269. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  270. @Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
  271. public static class NewTableParentWithSubclassTableChild implements Parent {
  272. @PrimaryKey
  273. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  274. private Long id;
  275. @Persistent
  276. private String aString;
  277. public Long getId() {
  278. return id;
  279. }
  280. public void setAString(String aString) {
  281. this.aString = aString;
  282. }
  283. public String getAString() {
  284. return aString;
  285. }
  286. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  287. @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
  288. public static class Child extends NewTableParentWithSubclassTableChild implements
  289. SubclassesJDO.Child {
  290. @Persistent
  291. private String bString;
  292. public void setBString(String bString) {
  293. this.bString = bString;
  294. }
  295. public String getBString() {
  296. return bString;
  297. }
  298. }
  299. // enhancer rejects this
  300. // @PersistenceCapable(identityType = IdentityType.APPLICATION)
  301. // @Inheritance(strategy = InheritanceStrategy.SUPERCLASS_TABLE)
  302. // public static class SuperChild extends NewParent {
  303. //
  304. // @Persistent
  305. // private String bString;
  306. //
  307. // public void setBString(String bString) {
  308. // this.bString = bString;
  309. // }
  310. //
  311. // public String getBString() {
  312. // return bString;
  313. // }
  314. // }
  315. }
  316. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  317. @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
  318. public static class SubclassTableParentWithCompleteTableChild implements Parent {
  319. @PrimaryKey
  320. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  321. private Long id;
  322. @Persistent
  323. private String aString;
  324. @SuppressWarnings("unused")
  325. @Persistent
  326. private String overriddenString;
  327. public Long getId() {
  328. return id;
  329. }
  330. public void setAString(String aString) {
  331. this.aString = aString;
  332. }
  333. public String getAString() {
  334. return aString;
  335. }
  336. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  337. @Inheritance(customStrategy = "complete-table")
  338. public static class Child extends SubclassTableParentWithCompleteTableChild
  339. implements SubclassesJDO.Child {
  340. @Persistent
  341. private String bString;
  342. public void setBString(String bString) {
  343. this.bString = bString;
  344. }
  345. public String getBString() {
  346. return bString;
  347. }
  348. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  349. @Inheritance(customStrategy = "complete-table")
  350. public static class Grandchild extends Child implements SubclassesJDO.Grandchild {
  351. @Persistent
  352. private String cString;
  353. public void setCString(String cString) {
  354. this.cString = cString;
  355. }
  356. public String getCString() {
  357. return cString;
  358. }
  359. }
  360. }
  361. }
  362. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  363. @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
  364. public static class SubclassTableParentWithNewTableChild implements Parent {
  365. @PrimaryKey
  366. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  367. private Long id;
  368. @Persistent
  369. private String aString;
  370. public Long getId() {
  371. return id;
  372. }
  373. public void setAString(String aString) {
  374. this.aString = aString;
  375. }
  376. public String getAString() {
  377. return aString;
  378. }
  379. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  380. @Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
  381. public static class Child extends SubclassTableParentWithNewTableChild implements SubclassesJDO.Child {
  382. @Persistent
  383. private String bString;
  384. public void setBString(String bString) {
  385. this.bString = bString;
  386. }
  387. public String getBString() {
  388. return bString;
  389. }
  390. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  391. @Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
  392. public static class Grandchild extends Child implements SubclassesJDO.Grandchild {
  393. @Persistent
  394. private String cString;
  395. public void setCString(String cString) {
  396. this.cString = cString;
  397. }
  398. public String getCString() {
  399. return cString;
  400. }
  401. }
  402. }
  403. }
  404. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  405. @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
  406. public static class SubclassTableParentWithSubclassTableChild implements Parent {
  407. @PrimaryKey
  408. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  409. private Long id;
  410. @Persistent
  411. private String aString;
  412. public Long getId() {
  413. return id;
  414. }
  415. public void setAString(String aString) {
  416. this.aString = aString;
  417. }
  418. public String getAString() {
  419. return aString;
  420. }
  421. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  422. @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
  423. public static class Child extends SubclassTableParentWithSubclassTableChild
  424. implements SubclassesJDO.Child {
  425. @Persistent
  426. private String bString;
  427. public void setBString(String bString) {
  428. this.bString = bString;
  429. }
  430. public String getBString() {
  431. return bString;
  432. }
  433. }
  434. // enhancer rejects this
  435. // @PersistenceCapable(identityType = IdentityType.APPLICATION)
  436. // @Inheritance(strategy = InheritanceStrategy.SUPERCLASS_TABLE)
  437. // public static class SuperChild extends SubParent {
  438. //
  439. // @Persistent
  440. // private String bString;
  441. //
  442. // public void setBString(String bString) {
  443. // this.bString = bString;
  444. // }
  445. //
  446. // public String getBString() {
  447. // return bString;
  448. // }
  449. // }
  450. }
  451. // rejected by enhancer
  452. // @PersistenceCapable(identityType = IdentityType.APPLICATION)
  453. // @Inheritance(strategy = InheritanceStrategy.SUPERCLASS_TABLE)
  454. // public static class SuperParent {
  455. // @PrimaryKey
  456. // @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  457. // private Long id;
  458. //
  459. // @Persistent
  460. // private String aString;
  461. //
  462. // public Long getId() {
  463. // return id;
  464. // }
  465. //
  466. // public void setAString(String aString) {
  467. // this.aString = aString;
  468. // }
  469. //
  470. // public String getAString() {
  471. // return aString;
  472. // }
  473. //
  474. // @PersistenceCapable(identityType = IdentityType.APPLICATION)
  475. // @Inheritance(customStrategy = "complete-table")
  476. // public static class CompleteChild extends SuperParent {
  477. //
  478. // @Persistent
  479. // private String bString;
  480. //
  481. // public void setBString(String bString) {
  482. // this.bString = bString;
  483. // }
  484. //
  485. // public String getBString() {
  486. // return bString;
  487. // }
  488. // }
  489. //
  490. // @PersistenceCapable(identityType = IdentityType.APPLICATION)
  491. // @Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
  492. // public static class NewChild extends SuperParent {
  493. //
  494. // @Persistent
  495. // private String bString;
  496. //
  497. // public void setBString(String bString) {
  498. // this.bString = bString;
  499. // }
  500. //
  501. // public String getBString() {
  502. // return bString;
  503. // }
  504. // }
  505. //
  506. // @PersistenceCapable(identityType = IdentityType.APPLICATION)
  507. // @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
  508. // public static class SubChild extends SuperParent {
  509. //
  510. // @Persistent
  511. // private String bString;
  512. //
  513. // public void setBString(String bString) {
  514. // this.bString = bString;
  515. // }
  516. //
  517. // public String getBString() {
  518. // return bString;
  519. // }
  520. // }
  521. //
  522. // @PersistenceCapable(identityType = IdentityType.APPLICATION)
  523. // @Inheritance(strategy = InheritanceStrategy.SUPERCLASS_TABLE)
  524. // public static class SuperChild extends SuperParent {
  525. //
  526. // @Persistent
  527. // private String bString;
  528. //
  529. // public void setBString(String bString) {
  530. // this.bString = bString;
  531. // }
  532. //
  533. // public String getBString() {
  534. // return bString;
  535. // }
  536. // }
  537. // }
  538. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  539. @Inheritance(customStrategy = "complete-table")
  540. public static class OverrideParent implements Parent {
  541. @PrimaryKey
  542. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  543. private Long id;
  544. @Persistent
  545. private String aString;
  546. @Persistent
  547. private String overriddenString;
  548. public Long getId() {
  549. return id;
  550. }
  551. public void setAString(String aString) {
  552. this.aString = aString;
  553. }
  554. public String getAString() {
  555. return aString;
  556. }
  557. public String getOverriddenString() {
  558. return overriddenString;
  559. }
  560. public void setOverriddenString(String overriddenString) {
  561. this.overriddenString = overriddenString;
  562. }
  563. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  564. public static class Child extends OverrideParent implements SubclassesJDO.Child {
  565. @Persistent
  566. private String bString;
  567. @Persistent(column = "overridden_string")
  568. private String overriddenString;
  569. public void setBString(String bString) {
  570. this.bString = bString;
  571. }
  572. public String getBString() {
  573. return bString;
  574. }
  575. @Override
  576. public String getOverriddenString() {
  577. return overriddenString;
  578. }
  579. @Override
  580. public void setOverriddenString(String overriddenString) {
  581. this.overriddenString = overriddenString;
  582. }
  583. }
  584. }
  585. @PersistenceCapable
  586. @EmbeddedOnly
  587. @Inheritance(customStrategy = "complete-table")
  588. public static class IsEmbeddedOnlyBase {
  589. private String val0;
  590. public String getVal0() {
  591. return val0;
  592. }
  593. public void setVal0(String val0) {
  594. this.val0 = val0;
  595. }
  596. }
  597. @PersistenceCapable
  598. @EmbeddedOnly
  599. public static class IsEmbeddedOnly extends IsEmbeddedOnlyBase {
  600. private String val1;
  601. public String getVal1() {
  602. return val1;
  603. }
  604. public void setVal1(String val1) {
  605. this.val1 = val1;
  606. }
  607. }
  608. @PersistenceCapable
  609. @EmbeddedOnly
  610. @Inheritance(customStrategy = "complete-table")
  611. public static class IsEmbeddedOnlyBase2 {
  612. private String val2;
  613. public String getVal2() {
  614. return val2;
  615. }
  616. public void setVal2(String val2) {
  617. this.val2 = val2;
  618. }
  619. }
  620. @PersistenceCapable
  621. @EmbeddedOnly
  622. public static class IsEmbeddedOnly2 extends IsEmbeddedOnlyBase2 {
  623. private String val3;
  624. public String getVal3() {
  625. return val3;
  626. }
  627. public void setVal3(String val3) {
  628. this.val3 = val3;
  629. }
  630. }
  631. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  632. @Inheritance(customStrategy = "complete-table")
  633. public static class CompleteTableParentWithEmbedded implements Parent {
  634. @PrimaryKey
  635. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  636. private Long id;
  637. @Persistent
  638. @Embedded
  639. private IsEmbeddedOnly embedded;
  640. @Persistent
  641. @Embedded(members={
  642. @Persistent(name="val0", columns=@Column(name="VAL0"))
  643. })
  644. private IsEmbeddedOnlyBase embeddedBase;
  645. private String aString;
  646. public Long getId() {
  647. return id;
  648. }
  649. public IsEmbeddedOnly getEmbedded() {
  650. return embedded;
  651. }
  652. public void setEmbedded(IsEmbeddedOnly embedded) {
  653. this.embedded = embedded;
  654. }
  655. public String getAString() {
  656. return aString;
  657. }
  658. public void setAString(String aString) {
  659. this.aString = aString;
  660. }
  661. public IsEmbeddedOnlyBase getEmbeddedBase() {
  662. return embeddedBase;
  663. }
  664. public void setEmbeddedBase(IsEmbeddedOnlyBase embeddedBase) {
  665. this.embeddedBase = embeddedBase;
  666. }
  667. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  668. public static class Child extends CompleteTableParentWithEmbedded {
  669. @Persistent
  670. private String bString;
  671. @Persistent
  672. @Embedded(members={
  673. @Persistent(name="val2", columns=@Column(name="VAL2"))
  674. })
  675. private IsEmbeddedOnlyBase2 embeddedBase2;
  676. @Persistent
  677. @Embedded
  678. private IsEmbeddedOnly2 embedded2;
  679. public void setBString(String bString) {
  680. this.bString = bString;
  681. }
  682. public String getBString() {
  683. return bString;
  684. }
  685. public IsEmbeddedOnly2 getEmbedded2() {
  686. return embedded2;
  687. }
  688. public void setEmbedded2(IsEmbeddedOnly2 embedded2) {
  689. this.embedded2 = embedded2;
  690. }
  691. public IsEmbeddedOnlyBase2 getEmbeddedBase2() {
  692. return embeddedBase2;
  693. }
  694. public void setEmbeddedBase2(IsEmbeddedOnlyBase2 embeddedBase2) {
  695. this.embeddedBase2 = embeddedBase2;
  696. }
  697. }
  698. }
  699. public static class NondurableParent {
  700. private Long id;
  701. private String str;
  702. public Long getId() {
  703. return id;
  704. }
  705. public void setId(Long id) {
  706. this.id = id;
  707. }
  708. public String getStr() {
  709. return str;
  710. }
  711. public void setStr(String str) {
  712. this.str = str;
  713. }
  714. }
  715. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  716. public static class DurableChild extends NondurableParent {
  717. @Override
  718. @PrimaryKey
  719. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  720. public Long getId() {
  721. return super.getId();
  722. }
  723. @Override
  724. @Persistent
  725. public String getStr() {
  726. return super.getStr();
  727. }
  728. @Override
  729. public void setId(Long id) {
  730. super.setId(id);
  731. }
  732. @Override
  733. public void setStr(String str) {
  734. super.setStr(str);
  735. }
  736. }
  737. }