Author: mdryakhlenkov
Date: 2007-07-17 12:33:46 -0400 (Tue, 17 Jul 2007)
New Revision: 2480
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/MSSQLGeneratedPropertyEntity.hbm.xml
Log:
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.hbm.xml 2007-07-17
16:33:46 UTC (rev 2480)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.generated">
+
+ <class name="ComponentOwner" table="part_gen_comp">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="name" />
+ <component name="component"
class="ComponentOwner$Component">
+ <property name="generated" type="int"
generated="always" column="GENED"/>
+ </component>
+ </class>
+
+ <database-object>
+ <create>
+ <![CDATA[CREATE OR REPLACE TRIGGER t_iu_part_gen_comp
+ BEFORE INSERT OR UPDATE ON part_gen_comp
+ FOR EACH ROW
+ BEGIN
+ IF INSERTING THEN
+ :new.gened := 1;
+ ELSE
+ :new.gened := :old.gened + 1;
+ END IF;
+ END;]]>
+ </create>
+ <drop>
+ <![CDATA[DROP TRIGGER t_iu_part_gen_comp]]>
+ </drop>
+ <dialect-scope name="org.hibernate.dialect.Oracle9Dialect"/>
+ <dialect-scope name="org.hibernate.dialect.OracleDialect"/>
+ </database-object>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/ComponentOwner.java 2007-07-17
16:33:46 UTC (rev 2480)
@@ -0,0 +1,55 @@
+package mapping.generated;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class ComponentOwner {
+ private Long id;
+ private String name;
+ private Component component;
+
+ public ComponentOwner() {
+ }
+
+ public ComponentOwner(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Component getComponent() {
+ return component;
+ }
+
+ public void setComponent(Component component) {
+ this.component = component;
+ }
+
+ public static class Component {
+ private int generated;
+
+ public int getGenerated() {
+ return generated;
+ }
+
+ public void setGenerated(int generated) {
+ this.generated = generated;
+ }
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.hbm.xml 2007-07-17
16:33:46 UTC (rev 2480)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.generated">
+
+ <class name="GeneratedPropertyEntity" table="gen_prop">
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="name"/>
+ <property name="lastModified" generated="always"
type="binary">
+ <column name="lastModified" length="8"/>
+ </property>
+
+ </class>
+
+ <database-object>
+ <create>
+ <![CDATA[CREATE OR REPLACE TRIGGER t_iu_gen_prop
+ BEFORE INSERT OR UPDATE ON gen_prop
+ FOR EACH ROW
+ BEGIN
+ IF INSERTING THEN
+ :new.lastModified := HEXTORAW( '1' );
+ ELSE
+ :new.lastModified := HEXTORAW(
+ TO_NUMBER( RAWTOHEX( :old.lastModified ) ) + 1
+ );
+ END IF;
+ END;]]>
+ </create>
+ <drop>
+ <![CDATA[DROP TRIGGER t_iu_gen_prop]]>
+ </drop>
+ <dialect-scope name="org.hibernate.dialect.Oracle9Dialect"/>
+ <dialect-scope name="org.hibernate.dialect.OracleDialect"/>
+ </database-object>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/GeneratedPropertyEntity.java 2007-07-17
16:33:46 UTC (rev 2480)
@@ -0,0 +1,37 @@
+// $Id: GeneratedPropertyEntity.java 7800 2005-08-10 12:13:00Z steveebersole $
+package mapping.generated;
+
+/**
+ * Implementation of GeneratedPropertyEntity.
+ *
+ * @author Steve Ebersole
+ */
+public class GeneratedPropertyEntity {
+ private Long id;
+ private String name;
+ private byte[] lastModified;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public byte[] getLastModified() {
+ return lastModified;
+ }
+
+ public void setLastModified(byte[] lastModified) {
+ this.lastModified = lastModified;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/MSSQLGeneratedPropertyEntity.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/MSSQLGeneratedPropertyEntity.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/generated/MSSQLGeneratedPropertyEntity.hbm.xml 2007-07-17
16:33:46 UTC (rev 2480)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="mapping.generated">
+
+ <class name="GeneratedPropertyEntity" table="gen_prop">
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="name"/>
+ <property name="lastModified" generated="always"
type="binary">
+ <column name="lastModified" length="8"
sql-type="TIMESTAMP"/>
+ </property>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file