All pastes #276987 Raw Edit

Untitled

public text v1 · immutable
·published 2006-12-12 20:50 UTC
rendered paste body

<?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="com.dayspringTech.jgabler.hypersonicHibernateSpringExample" default-access="field">
	
	<class name="Book">
		<id name="id" column="book_id">
			<generator class="native"/>
		</id>
		<property name="title" column="title"/>
		<property name="dewey" column="dewey"/>
		<property name="categoryId" column="category_id"/>
		<property name="out" column="out"/>
	</class>
</hibernate-mapping>

################

package com.dayspringTech.jgabler.hypersonicHibernateSpringExample;

public class Book {

		private Integer id;
		private String dewey;
		private String title;
		private Integer categoryId;
		private boolean out;
		
		public Book() {}
		
		public Book(String title, String dewey, Integer categoryId) {
			this.dewey = dewey;
			this.title = title;
			this.categoryId = categoryId;
			this.out = false;
		}

		public Integer getcategoryId() {
			return categoryId;
		}

		public String getDewey() {
			return dewey;
		}

		public String getTitle() {
			return title;
		}

		public boolean isOut() {
			return out;
		}

		public void setOut(boolean out) {
			this.out = out;
		}

		public Integer getId() {
			return id;
		}

		public void setcategoryId(Integer categoryId) {
			this.categoryId = categoryId;
		}

		public void setDewey(String dewi) {
			this.dewey = dewi;
		}

		public void setId(Integer id) {
			this.id = id;
		}

		public void setTitle(String title) {
			this.title = title;
		}
}